Fixed the a11y errors on Pa11y dashboard results and add new url page (#285)

* Fixed the a11y errors on Pa11y dashboard results page and add new url page.

* Removed few more unnecessary roles along with Holli's suggestions implemented.

* Added close button ARIA label

Co-authored-by: Hollie Kay <1948361+hollsk@users.noreply.github.com>

Co-authored-by: Hollie Kay <1948361+hollsk@users.noreply.github.com>
This commit is contained in:
Sangita Mane
2021-05-26 16:38:38 +02:00
committed by GitHub
parent 6d4b8c9676
commit 4c0bd924ab
13 changed files with 67 additions and 54 deletions

View File

@@ -112,7 +112,7 @@ function getStandards() {
description: 'The heading structure is not logically nested. This [Node name, eg. h2] element appears to be the primary document heading, so should be an h1 element.'
},
{
name: 'Section508.D.HeadingOrder',
name: 'Section508.D.HeadingOrder ',
description: 'The heading structure is not logically nested. This [Node name, eg. h4] element should be an [Expected heading node name, eg. h2] to be properly nested.'
},
{
@@ -922,7 +922,7 @@ function getStandards() {
description: 'This element\'s text is placed on a background image. Ensure the contrast ratio between the text and all covered parts of the image are at least 4.5:1.'
},
{
name: 'WCAG2AA.Principle1.Guideline1_4.1_4_3.G145',
name: 'WCAG2AA.Principle1.Guideline1_4.1_4_3.G145 ',
description: 'This element\'s text is placed on a background image. Ensure the contrast ratio between the text and all covered parts of the image are at least 3:1.'
},
{
@@ -1427,11 +1427,11 @@ function getStandards() {
description: 'This element has insufficient contrast at this conformance level. Expected a contrast ratio of at least 4.5:1, but text in this element has a contrast ratio of /{value/}. Recommendation: /{colour recommendations/}.'
},
{
name: 'WCAG2AAA.Principle1.Guideline1_4.1_4_6.G17',
name: 'WCAG2AAA.Principle1.Guideline1_4.1_4_6.G17 ',
description: 'This element\'s text is placed on a background image. Ensure the contrast ratio between the text and all covered parts of the image are at least 7:1.'
},
{
name: 'WCAG2AAA.Principle1.Guideline1_4.1_4_6.G18',
name: 'WCAG2AAA.Principle1.Guideline1_4.1_4_6.G18 ',
description: 'This element\'s text is placed on a background image. Ensure the contrast ratio between the text and all covered parts of the image are at least 4.5:1.'
},
{

File diff suppressed because one or more lines are too long

View File

@@ -175,7 +175,6 @@
text-transform: uppercase;
display: block;
line-height: 1.4;
.opacity(.8);
}
// Stats box colours
@@ -753,3 +752,11 @@ ul.date-links {
border-top-right-radius: 0;
}
}
/*close button on success alert*/
.alert-success {
.close {
color: #fff;
opacity: 1;
};
}

View File

@@ -18,9 +18,9 @@
// -------------------------
@brand-primary: #2C3E50;
@brand-success: #00806F;
@brand-warning: #A86700;
@brand-danger: #D83D2D;
@brand-success: #006053;
@brand-warning: #b24d04;
@brand-danger: #c92a2a;
@brand-info: #177BBE;
// Scaffolding

View File

@@ -40,7 +40,7 @@ along with Pa11y Dashboard. If not, see <http://www.gnu.org/licenses/>.
{{#deleted}}
<div class="col-md-12 clearfix" data-test="alert">
<div class="alert alert-info">
<button aria-hidden="true" data-dismiss="alert" class="close" type="button">×</button>
<button data-dismiss="alert" class="close" type="button" aria-label="Close">×</button>
<strong>Bye Bye URL</strong>
<p>The URL you selected and its associated results have been deleted.</p>
</div>

View File

@@ -19,7 +19,7 @@ along with Pa11y Dashboard. If not, see <http://www.gnu.org/licenses/>.
Add a new URL
{{/content}}
<form role="form" class="col-md-12" action="/new" method="post" data-test="new-url-form">
<form class="col-md-12" action="/new" method="post" data-test="new-url-form">
<div class="legend">
<h1 class="h2 crunch-top">Add a new URL</h1>

View File

@@ -15,7 +15,7 @@ You should have received a copy of the GNU General Public License
along with Pa11y Dashboard. If not, see <http://www.gnu.org/licenses/>.
}}
<footer>
<div class="footer" role="contentinfo">
<div class="footer">
<div class="container">
<div class="col-md-5">
<small>&copy; 2013{{year}} Team Pa11y.<br/>Pa11y Dashboard is licensed under the GNU General Public License 3.0.<br/>Version {{version}}</small>

View File

@@ -15,7 +15,7 @@ You should have received a copy of the GNU General Public License
along with Pa11y Dashboard. If not, see <http://www.gnu.org/licenses/>.
}}
<header>
<div role="banner" class="header">
<div class="header">
<div class="container">
{{#if isHomePage}}<h1>{{else}}<div class="h1">{{/if}}
<a href="/">Pa11y Dashboard</a> -

View File

@@ -40,12 +40,14 @@ along with Pa11y Dashboard. If not, see <http://www.gnu.org/licenses/>.
<h2 class="h4">
<span class="glyphicon glyphicon-calendar" aria-hidden="true"></span>&nbsp;&nbsp;{{date-format task.lastResult.date format="DD MMM YYYY"}}
</h2>
<h3 class="h5 show-stats">Select a date to show stats for:</h3>
<ul role="navigation" class="dates-list">
{{#results}}
<li><a class="" href="{{href}}">{{date-format date format="DD MMM YYYY"}}</a></li>
{{/results}}
</ul>
<h3 class="h5 show-stats" id="dates-navigation">Select a date to show stats for:</h3>
<nav aria-labelledby="dates-navigation">
<ul class="dates-list">
{{#results}}
<li><a class="" href="{{href}}">{{date-format date format="DD MMM YYYY"}}</a></li>
{{/results}}
</ul>
</nav>
</div>
</div>
</div>
@@ -61,7 +63,7 @@ along with Pa11y Dashboard. If not, see <http://www.gnu.org/licenses/>.
</div>
</div>
<div class="col-md-9" role="main">
<div class="col-md-9">
<ul class="nav nav-tabs category-list" role="tablist">
<li class="category-list__item category-list__item_type_error active" role="presentation">
<a class="category-list__link" id="errors" href="#errors-list" aria-controls="errors-list" role="tab" data-toggle="tab" data-test="task-errors">
@@ -116,10 +118,10 @@ along with Pa11y Dashboard. If not, see <http://www.gnu.org/licenses/>.
<div class="task-details collapse" id="error-index-{{@index}}">
{{#if solutions.length}}
<div class="subtitle" id="error-solutions">Solutions:</div>
<ul class="list-unstyled solutions-list" role="list" aria-labelledby="error-solutions">
<div class="subtitle">Solutions:</div>
<ul class="list-unstyled solutions-list">
{{#each solutions}}
<li class="list-unstyled__item" role="listitem">
<li class="list-unstyled__item">
<a class="link" href="{{url}}" target="_blank">
<span class="glyphicon glyphicon-share" aria-hidden="true"></span>&nbsp;{{title}}
</a>
@@ -129,10 +131,10 @@ along with Pa11y Dashboard. If not, see <http://www.gnu.org/licenses/>.
{{/if}}
{{#if items.length}}
<div class="subtitle" id="error-selectors">Selectors:</div>
<ul class="list-unstyled selectors-list" role="list" aria-labelledby="error-selectors">
<div class="subtitle">Selectors:</div>
<ul class="list-unstyled selectors-list">
{{#each items}}
<li class="list-unstyled__item" role="listitem">
<li class="list-unstyled__item">
<span title="Context" data-role="context-popover" data-toggle="popover" data-content="{{context}}">
<code class="code">{{selector}}</code>
</span>
@@ -182,10 +184,10 @@ along with Pa11y Dashboard. If not, see <http://www.gnu.org/licenses/>.
<div class="task-details collapse" id="warning-index-{{@index}}">
{{#if solutions.length}}
<div class="subtitle" id="warning-solutions">Solutions:</div>
<ul class="list-unstyled solutions-list" role="list" aria-labelledby="warning-solutions">
<div class="subtitle">Solutions:</div>
<ul class="list-unstyled solutions-list">
{{#each solutions}}
<li class="list-unstyled__item" role="listitem">
<li class="list-unstyled__item">
<a class="link" href="{{url}}" target="_blank">
<span class="glyphicon glyphicon-share" aria-hidden="true"></span>&nbsp;{{title}}
</a>
@@ -195,10 +197,10 @@ along with Pa11y Dashboard. If not, see <http://www.gnu.org/licenses/>.
{{/if}}
{{#if items.length}}
<div class="subtitle" id="warning-selectors">Selectors:</div>
<ul class="list-unstyled selectors-list" role="list" aria-labelledby="warning-selectors">
<div class="subtitle">Selectors:</div>
<ul class="list-unstyled selectors-list">
{{#each items}}
<li class="list-unstyled__item" role="listitem">
<li class="list-unstyled__item">
<span title="Context" data-role="context-popover" data-toggle="popover" data-content="{{context}}">
<code class="code">{{selector}}</code>
</span>
@@ -248,10 +250,10 @@ along with Pa11y Dashboard. If not, see <http://www.gnu.org/licenses/>.
<div class="task-details collapse" id="notice-index-{{@index}}">
{{#if solutions.length}}
<div class="subtitle" id="notice-solutions">Solutions:</div>
<ul class="list-unstyled solutions-list" role="list" aria-labelledby="notice-solutions">
<div class="subtitle">Solutions:</div>
<ul class="list-unstyled solutions-list">
{{#each solutions}}
<li class="list-unstyled__item" role="listitem">
<li class="list-unstyled__item">
<a class="link" href="{{url}}" target="_blank">
<span class="glyphicon glyphicon-share" aria-hidden="true"></span>&nbsp;{{title}}
</a>
@@ -261,10 +263,10 @@ along with Pa11y Dashboard. If not, see <http://www.gnu.org/licenses/>.
{{/if}}
{{#if items.length}}
<div class="subtitle" id="notice-selectors">Selectors:</div>
<ul class="list-unstyled selectors-list" role="list" aria-labelledby="notice-selectors">
<div class="subtitle">Selectors:</div>
<ul class="list-unstyled selectors-list">
{{#each items}}
<li class="list-unstyled__item" role="listitem">
<li class="list-unstyled__item">
<span title="Context" data-role="context-popover" data-toggle="popover" data-content="{{context}}">
<code class="code">{{selector}}</code>
</span>

View File

@@ -24,11 +24,13 @@ along with Pa11y Dashboard. If not, see <http://www.gnu.org/licenses/>.
<div class="run-details task-header clearfix">
<div class="col-md-12 clearfix">
{{#unless readonly}}
<ul class="inline-list" role="menu">
<li><a href="/{{task.id}}/edit">Edit this task</a></li>
<li><a href="/{{task.id}}/delete">Delete this task</a></li>
<li><a href="{{task.hrefRun}}" data-test="run-task">Run Pa11y</a></li>
</ul>
<nav aria-label="task tools">
<ul class="inline-list">
<li><a href="/{{task.id}}/edit">Edit this task</a></li>
<li><a href="/{{task.id}}/delete">Delete this task</a></li>
<li><a href="{{task.hrefRun}}" data-test="run-task">Run Pa11y</a></li>
</ul>
</nav>
{{/unless}}
{{#if mainResult}}
<div class="date">Last run: <strong>{{date-format mainResult.date format="DD MMM YYYY"}}</strong></div>

View File

@@ -56,12 +56,14 @@ along with Pa11y Dashboard. If not, see <http://www.gnu.org/licenses/>.
{{#unless ../readonly}}
<div class="btn-group options-button text-right">
<button type="button" class="btn btn-info btn-xs dropdown-toggle" data-toggle="dropdown"><span class="sr-only">Options</span><span class="glyphicon glyphicon-cog"></span></button>
<ul class="dropdown-menu pull-right" role="menu">
<li><a href="{{href}}/edit">Edit this task</a></li>
<li><a href="{{href}}/delete">Delete this task</a></li>
<li class="divider"></li>
<li><a href="{{href}}/run" data-test="run-task">Run Pa11y</a></li>
</ul>
<nav aria-label="task tools">
<ul class="dropdown-menu pull-right">
<li><a href="{{href}}/edit">Edit this task</a></li>
<li><a href="{{href}}/delete">Delete this task</a></li>
<li class="divider"></li>
<li><a href="{{href}}/run" data-test="run-task">Run Pa11y</a></li>
</ul>
</nav>
</div>
{{/unless}}
</li>

View File

@@ -29,7 +29,7 @@ along with Pa11y Dashboard. If not, see <http://www.gnu.org/licenses/>.
</div>
{{/edited}}
<form role="form" class="col-md-12" action="/{{task.id}}/edit" method="post" data-test="edit-url-form">
<form class="col-md-12" action="/{{task.id}}/edit" method="post" data-test="edit-url-form">
<div class="legend">
<h1 class="h2 crunch-top">Edit URL</h1>

View File

@@ -22,7 +22,7 @@ along with Pa11y Dashboard. If not, see <http://www.gnu.org/licenses/>.
{{#added}}
<div class="col-md-12 clearfix" data-test="alert">
<div class="alert alert-success">
<button aria-hidden="true" data-dismiss="alert" class="close" type="button">×</button>
<button data-dismiss="alert" class="close" type="button">×</button>
<strong>Whoop whoop!</strong>
<p>Your new URL has been added.</p>
</div>
@@ -32,7 +32,7 @@ along with Pa11y Dashboard. If not, see <http://www.gnu.org/licenses/>.
{{#running}}
<div class="col-md-12 clearfix" data-test="alert">
<div class="alert alert-success">
<button aria-hidden="true" data-dismiss="alert" class="close" type="button">×</button>
<button data-dismiss="alert" class="close" type="button">×</button>
<strong>New results incoming!</strong>
<p>
New results are being generated for this URL in the background.
@@ -45,7 +45,7 @@ along with Pa11y Dashboard. If not, see <http://www.gnu.org/licenses/>.
{{#ruleIgnored}}
<div class="col-md-12 clearfix" data-test="alert">
<div class="alert alert-success">
<button aria-hidden="true" data-dismiss="alert" class="close" type="button">×</button>
<button data-dismiss="alert" class="close" type="button">×</button>
<strong>Rule ignored!</strong>
<p>
You've ignored an accessibility rule for this URL.
@@ -58,7 +58,7 @@ along with Pa11y Dashboard. If not, see <http://www.gnu.org/licenses/>.
{{#ruleUnignored}}
<div class="col-md-12 clearfix" data-test="alert">
<div class="alert alert-success">
<button aria-hidden="true" data-dismiss="alert" class="close" type="button">×</button>
<button data-dismiss="alert" class="close" type="button">×</button>
<strong>Rule unignored!</strong>
<p>
You've removed an ignored accessibility rule for this URL.