diff --git a/README.md b/README.md index 9e7ca26..e413faa 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,10 @@ # axe-html-reporter -Creates an HTML report from axe results object with list of violations, passes and incomplete results. +Creates an HTML report from axe-core library AxeResults object listing violations, passes, incomplete and incompatible results. -Allows specifying `url`, `projectKey` and `outputDir`. +Allows specifying report creation options: `reportFileName`, `outputDir`, `projectKey` and `customSummary`. + +`customSummary` allows having html parameters. Please check [sample report output.](https://lpelypenko.github.io/axe-html-reporter/) @@ -16,8 +18,7 @@ npm i axe-html-reporter ### Example usage in TestCafe - -To run TestCafe tests with axe-core, install testcafe, axe-core and [@testcafe-community/axe](https://www.npmjs.com/package/@testcafe-community/axe): +To run TestCafe tests with axe-core, install testcafe, axe-core and [@testcafe-community/axe](https://www.npmjs.com/package/@testcafe-community/axe): ```shell script npm i -D axe-html-reporter testcafe axe-core @testcafe-community/axe @@ -27,15 +28,15 @@ For TestCafe example add the following clientScript in your `.testcaferc.json` c ```json { - "clientScripts":[{"module":"axe-core/axe.min.js"}] + "clientScripts": [{ "module": "axe-core/axe.min.js" }] } ``` -In the example bellow `fileName` is not passed. In this case html report with default name `accessibilityReport.html` will be created in `artifacts` directory. -See full TestCafe test example is bellow: +In the example bellow `fileName` is not passed. If `fileName` is not passed, HTML report will be created with default name `accessibilityReport.html` in `artifacts` directory. -```javascript +See full TestCafe test example is bellow: +```javascript import { runAxe } from '@testcafe-community/axe'; import { createHtmlReport } from 'axe-html-reporter'; @@ -43,19 +44,24 @@ fixture('TestCafe tests with Axe').page('http://example.com'); test('Automated accessibility testing', async (t) => { const axeContext = { exclude: [['select']] }; - const axeOptions = { rules: rulesMap() }; + const axeOptions = { + rules: { + 'object-alt': { enabled: true }, + 'role-img-alt': { enabled: true }, + 'input-image-alt': { enabled: true }, + 'image-alt': { enabled: true }, + }, + }; const { error, results } = await runAxe(axeContext, axeOptions); - await t.expect(error).eql(null, `axe check failed with an error: ${error.message}`); + await t.expect(error).notOk(`axe check failed with an error: ${error.message}`); // creates html report with the default file name `accessibilityReport.html` createHtmlReport({ - violations: results.violations, - passes: results.passes, - incomplete: results.incomplete, - url: results.url, - projectKey: 'EXAMPLE', + results, + options: { + projectKey: 'EXAMPLE', + }, }); }); - ``` Run TestCafe test: @@ -77,36 +83,26 @@ HTML report was saved into the following directory /Users/axe-demos/artifacts/ac ### Example usage in any JS framework ```javascript - import { axeHtmlReporter } from 'axe-html-reporter'; (() => { - const results = { violations: [], passes: [], incomplete: [], inapplicable: [], url: 'http://example.com' }; // creates html report with the default name `accessibilityReport.html` file - axeHtmlReporter({ - violations: results.violations, - passes: results.passes, - incomplete: results.incomplete, - inapplicable: results.inapplicable, - url: results.url - }); + axeHtmlReporter({ results: 'AxeResults' }); // full AxeResults object + // creates html report with the default name `accessibilityReport.html` file and all supported AxeResults values + axeHtmlReporter({ results: { violations: 'Result[]' } }); // passing only violations from axe.run output // creates html report with the default name `accessibilityReport.html` file and adds url and projectKey axeHtmlReporter({ - violations: results.violations, - passes: results.passes, - incomplete: results.incomplete, - projectKey: 'JIRA_PROJECT_KEY', - url: results.url, + results: 'AxeResults', + options: { projectKey: 'JIRA_PROJECT_KEY' }, }); - // creates html report with the name `exampleReport.html` in 'axe-reports' directory and adds url and projectKey to the header + // creates html report with the name `exampleReport.html` in 'axe-reports' directory and adds projectKey to the header axeHtmlReporter({ - violations: results.violations, - passes: results.passes, - incomplete: results.incomplete, - projectKey: 'JIRA_PROJECT_KEY', - outputDir: 'axe-reports', - url: results.url, - fileName: 'exampleReport.html', + results: 'AxeResults', + options: { + projectKey: 'JIRA_PROJECT_KEY', + outputDir: 'axe-reports', + fileName: 'exampleReport.html', + }, }); // creates html report with all optional parameters, saving the report into 'docs' directory with report file name 'index.html' const customSummary = `Test Case: Full page analysis @@ -116,15 +112,13 @@ import { axeHtmlReporter } from 'axe-html-reporter';
1 | -Buttons must have discernible text | -button-name | -WCAG 2.0 Level A | -critical | -1 | -||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2 | -Elements must have sufficient color contrast | -color-contrast | -WCAG 2.0 Level AA | -serious | -11 | -||||||||||||||||||||||||||||||||||||||||
3 | -IDs of active elements must be unique | -duplicate-id-active | -WCAG 2.0 Level A | -serious | -1 | -||||||||||||||||||||||||||||||||||||||||
4 | -id attribute value must be unique | -duplicate-id | -WCAG 2.0 Level A | -minor | -10 | -||||||||||||||||||||||||||||||||||||||||
5 | -Frames must have title attribute | -frame-title | -WCAG 2.0 Level A | -serious | -2 | -||||||||||||||||||||||||||||||||||||||||
6 | <html> element must have a lang attribute | html-has-lang | WCAG 2.0 Level A | @@ -133,63 +93,23 @@1 | |||||||||||||||||||||||||||||||||||||||||
7 | -Images must have alternate text | -image-alt | -WCAG 2.0 Level A | -critical | -4 | -||||||||||||||||||||||||||||||||||||||||
8 | -Form elements must have labels | -label | -WCAG 2.0 Level A | -critical | -1 | -||||||||||||||||||||||||||||||||||||||||
9 | +2 | Document must have one main landmark | landmark-one-main | Best practice | moderate | -4 | -|||||||||||||||||||||||||||||||||||||||
10 | -Ensures landmarks are unique | -landmark-unique | -Best practice | -moderate | -1 | -||||||||||||||||||||||||||||||||||||||||
11 | -Links must be distinguished from surrounding text in a way that does not rely on color | -link-in-text-block | -WCAG 2.0 Level A | -serious | 1 | ||||||||||||||||||||||||||||||||||||||||
12 | -Links must have discernible text | -link-name | -WCAG 2.0 Level A | -serious | -8 | -||||||||||||||||||||||||||||||||||||||||
13 | +3 | All page content must be contained by landmarks | region | Best practice | moderate | -37 | +1 | ||||||||||||||||||||||||||||||||||||||
14 | +4 | Elements should not have tabindex greater than zero | tabindex | Best practice | @@ -202,67 +122,22 @@
# | -Source Code | -Selector | -
---|---|---|
1 | -<button class="ui-datepicker-trigger" type="button"> -<!-- <img title="..." alt="..." src="/redesign/assets/demo-sites/mars/images/calendar.png"> --> -</button> | -".departure-date > .ui-datepicker-trigger:nth-child(4)" | -
Ensures the contrast between foreground and background colors meets WCAG 2 AA contrast ratio thresholds
+Ensures every HTML document has a lang attribute
Ensures every id attribute value of active elements is unique
+Ensures the document has a main landmark
Ensures every id attribute value is unique
+Ensures all page content is contained by landmarks
Ensures <iframe> and <frame> elements contain a non-empty title attribute
-# | -Source Code | -Selector | -|
---|---|---|---|
1 | -<iframe width="365" height="205" name="player" id="player" src="https://www.youtube.com/embed/OagLGti_hTE?controls=1&showinfo=1&modestbranding=0&wmode=opaque&enablejsapi=1" frameborder="0" allowfullscreen=""></iframe> | -"#player" | -|
2 | -<iframe id="fafbba78" name="f2bc5e72d" scrolling="no" style="border: none; overflow: hidden; height: 62px; width: 292px;" class="fb_ltr" src="/assets/demo-sites/mars/js/likebox.html"></iframe> | -"#fafbba78" | +"div" |
Ensures every HTML document has a lang attribute
+Ensures tabindex attribute values are not greater than 0
Ensures <img> elements have alternate text or a role of none or presentation
-# | -Source Code | -Selector | -||
---|---|---|---|---|
1 | -<img src="/assets/demo-sites/mars/js/seg" width="1" height="1"> | -"img[src$="seg"]" | +<input type="text" value="" class="city-input ac_input ui-autocomplete-input" autocomplete="off" id="from0" name="from0" tabindex="1" role="textbox" aria-autocomplete="list" aria-haspopup="true"> | +"#from0" |
2 | -<img src="/assets/demo-sites/mars/images/mars-spaceman.jpg" class="" width="210" height="120"> | -":root > img[width="\32 10"][height="\31 20"]" | +<input type="text" value="" class="city-input ac_input ui-autocomplete-input" autocomplete="off" id="to0" name="to0" tabindex="1" role="textbox" aria-autocomplete="list" aria-haspopup="true"> | +"#to0" |
3 | -<img src="/assets/demo-sites/mars/images/mars-spaceman.jpg" class="" width="210" height="120"> | -":root > img[width="\32 10"][height="\31 20"]" | -||
4 | -<img src="/assets/demo-sites/mars/images/mars-spaceman.jpg" class="" width="210" height="120"> | -":root > img[width="\32 10"][height="\31 20"]" | -
Ensures every form element has a label
-# | -Source Code | -Selector | -
---|---|---|
1 | -<input type="text" class="search" name="query" placeholder="search"> | -":root > .search[name="query"][placeholder="search"]" | -
Ensures the document has a main landmark
-# | -Source Code | -Selector | -
---|---|---|
1 | -<html class=" js no-flexbox flexbox-legacy canvas canvastext webgl no-touch geolocation postmessage websqldatabase indexeddb hashchange history draganddrop websockets rgba hsla multiplebgs backgroundsize borderimage borderradius boxshadow textshadow opacity cssanimations csscolumns cssgradients cssreflections csstransforms csstransforms3d csstransitions fontface generatedcontent video audio localstorage sessionstorage webworkers applicationcache svg inlinesvg smil svgclippaths js no-flexbox flexbox-legacy canvas canvastext webgl no-touch geolocation postmessage websqldatabase indexeddb hashchange history draganddrop websockets rgba hsla multiplebgs backgroundsize borderimage borderradius boxshadow textshadow opacity cssanimations csscolumns cssgradients cssreflections csstransforms csstransforms3d csstransitions fontface generatedcontent video audio localstorage sessionstorage webworkers no-applicationcache svg inlinesvg smil svgclippaths"> | -"html" | -
2 | -<html lang="en" dir="ltr" data-cast-api-enabled="true"> | -"#player", "html" | -
3 | -<html lang="en" id="facebook" class=""> | -"#fafbba78", "#facebook" | -
4 | -<html lang="en" class=" xl en"> | -".twitter-follow-button", "html" | -
Landmarks must have a unique role or role/label/title (i.e. accessible name) combination
-# | -Source Code | -Selector | -
---|---|---|
1 | -<nav id="left-control-nav" class="pull-left"> | -".loginnow > .container-fluid-full > .container > .span5.pull-left.left-first > .pull-left:nth-child(1)" | -
Links can be distinguished without relying on color
-# | -Source Code | -Selector | -
---|---|---|
1 | -<a href="mars2.html?a=last_will">prepare your last will and testament</a> | -"a[href="mars2\.html\?a\=last_will"]" | -
Ensures links have discernible text
-# | -Source Code | -Selector | -
---|---|---|
1 | -<a class="link" href="demo/mars/#"><i class="icon-menu-home"></i> </a> | -".link[href$="mars\/\#"]" | -
2 | -<a href="mars2.html?a=crater_adventure"> -<img src="/assets/demo-sites/mars/images/mars-spaceman.jpg" class="" width="210" height="120"></a> | -":root > a[href="mars2\.html\?a\=crater_adventure"]" | -
3 | -<a href="mars2.html?a=crater_adventure"> -<img src="/assets/demo-sites/mars/images/mars-spaceman.jpg" class="" width="210" height="120"></a> | -":root > a[href="mars2\.html\?a\=crater_adventure"]" | -
4 | -<a href="mars2.html?a=crater_adventure"> -<img src="/assets/demo-sites/mars/images/mars-spaceman.jpg" class="" width="210" height="120"></a> | -":root > a[href="mars2\.html\?a\=crater_adventure"]" | -
5 | -<a href="mars2.html?a="></a> | -":root > a[href="mars2\.html\?a\="]" | -
6 | -<a target="player" data-text="Life was possible on Mars" class="fader first active" href="http://www.youtube.com/embed/OagLGti_hTE?controls=1&showinfo=1&modestbranding=0&wmode=opaque&enablejsapi=1" id="default"></a> | -".active" | -
7 | -<a target="player" data-text="Why Mars died" class="fader first" href="http://www.youtube.com/embed/oC31pqk9sak?controls=1&showinfo=1&modestbranding=0&wmode=opaque&enablejsapi=1" id="default"></a> | -"a[data-text="Why\ Mars\ died"]" | -
8 | -<a target="player" data-text="The world that never was" class="fader first" href="http://www.youtube.com/embed/JgMXPXdqJn8?controls=1&showinfo=1&modestbranding=0&wmode=opaque&enablejsapi=1" id="default"></a> | -"a[data-text="The\ world\ that\ never\ was"]" | -
Ensures all page content is contained by landmarks
-# | -Source Code | -Selector | -
---|---|---|
1 | -<div style="width: 1px; height: 1px; display: inline;"> | -"body > div:nth-child(1)" | -
2 | -<div id="purposeDisclaimer">This web page is for demonstration purposes, to show common accessibility errors.</div> | -"#purposeDisclaimer" | -
3 | -<input type="text" class="search" name="query" placeholder="search"> | -":root > .search[name="query"][placeholder="search"]" | -
4 | -<input type="submit" class="control-search"> | -":root > .control-search[type="submit"]" | -
5 | -<div class="span7 left-first pull-left" id="left-column"> | -"#left-column" | -
6 | -<div id="widget-controls" class="widget-container head"> | -"#widget-controls" | -
7 | -<h3>Book your Trip</h3> | -"#route-select > .interior-container > h3" | -
8 | -<div id="route-type-radio-group" class=""> | -"#route-type-radio-group" | -
9 | -<div id="route-type"> | -"#route-type" | -
10 | -<div id="pass-question-radio-group" class=""> | -"#pass-question-radio-group" | -
11 | -<h3>Who Is Traveling?</h3> | -".middle.widget-container:nth-child(13) > .interior-container > h3" | -
12 | -<span class="wrapper"> -<span class="traveler-label">Traveler</span> -</span> | -"#passenger0 > .wrapper:nth-child(1)" | -
13 | -<span class="wrapper age-range"> -<select id="traveler0" class="traveler-type"> -<option value="0">Adult (26+)</option> -<option value="1">Youth (12-25)</option> -<option value="2">Child (4-11)</option> -<option value="3">Senior (60+)</option> -</select> -</span> | -"#passenger0 > .age-range.wrapper" | -
14 | -<div class="add-buttons" id="add-traveler"> | -"#add-traveler" | -
15 | -<div id="booking-box-submit" class="widget-container footer"> | -"#booking-box-submit" | -
16 | -<div class="interior-container"> | -"#video-box > .interior-container" | -
17 | -<div id="social-bar" class="container-fluid-full"> | -"#social-bar" | -
18 | -<h4>Book Your Trip</h4> | -"#footer-book > h4" | -
19 | -<ul> | -"#footer-book > ul" | -
20 | -<h4>Mars Shuttles</h4> | -"#footer-trains > h4" | -
21 | -<ul> | -"#footer-trains > ul" | -
22 | -<h4>Mars Tourist Passes</h4> | -"#footer-passes > h4" | -
23 | -<ul> | -"#footer-passes > ul" | -
24 | -<h4>Mars Adventures</h4> | -"#footer-plan > h4" | -
25 | -<ul> | -"#footer-plan > ul" | -
26 | -<h4>FAQs</h4> | -"#footer-faq > h4" | -
27 | -<ul> | -"#footer-faq > ul" | -
28 | -<h4>Connect With Us</h4> | -"#footer-connect > h4" | -
29 | -<ul> | -"#footer-connect > ul" | -
30 | -<div id="copyright" class="container"> | -"#copyright" | -
31 | -<div id="player" style="width: 100%; height: 100%;"> | -"#player", "#player" | -
32 | -<tr><td><span class="fsl fwb"><a href="../mars2.html" target="_blank">Mars Commuter Express</a></span></td></tr> | -"#fafbba78", "._8m > table > tbody > tr:nth-child(1)" | -
33 | -<div class="pluginButton pluginConnectButtonDisconnected" title=""><div><button type="submit"><i class="pluginButtonIcon img sp_like sx_like_thumb"></i>Like</button></div></div> | -"#fafbba78", ".pluginConnectButtonDisconnected" | -
34 | -<span id="u_0_2">378,121</span> | -"#fafbba78", "#u_0_2" | -
35 | -<div class="btn-o" contextmenu="menu"><a id="follow-button" target="_blank" class="btn" title="Follow MarsCommuter on Twitter" href="mars2.html"><i></i><span class="label" id="l">Follow @MarsTrip1</span></a></div> | -".twitter-follow-button", ".btn-o" | -
36 | -<img src="../images/f.gif" alt="" style="position: absolute; height: 1px; width: 1px; top: -9999px; left: -9999px;"> | -".twitter-follow-button", "img[src="\.\.\/images\/f\.gif"]" | -
37 | -<img src="jot" alt="" style="position: absolute; height: 1px; width: 1px; top: -9999px; left: -9999px;"> | -".twitter-follow-button", "img[src$="jot"]" | -
Ensures tabindex attribute values are not greater than 0
-# | -Source Code | -Selector | -||
---|---|---|---|---|
1 | -<input type="text" value="" class="city-input ac_input ui-autocomplete-input" autocomplete="off" id="from0" name="from0" tabindex="1" role="textbox" aria-autocomplete="list" aria-haspopup="true"> | -"#from0" | -||
2 | -<input type="text" value="" class="city-input ac_input ui-autocomplete-input" autocomplete="off" id="to0" name="to0" tabindex="1" role="textbox" aria-autocomplete="list" aria-haspopup="true"> | -"#to0" | -||
3 | -<input size="10" id="deptDate0" name="deptDate0" placeholder="mm/dd/yyyy" value="" tabindex="3" class="hasDatepicker input-dept"> | -"#deptDate0" | +<input size="10" id="deptDate0" name="deptDate0" placeholder="mm/dd/yyyy" value="" tabindex="3" class="hasDatepicker input-dept"> | +"#deptDate0" |
What 'incomplete' axe checks means?
++ Incomplete results were aborted and require further testing. This + can happen either because of technical restrictions to what the rule + can test, or because a javascript error occurred. +
++ Visit axe API Documentation + to learn more. +
+What 'inapplicable' axe checks means?
++ The inapplicable array lists all the rules for which no matching + elements were found on the page. +
++ Visit axe API Documentation + to learn more. +
+# | +Description | +Axe rule ID | +WCAG | +|||||
---|---|---|---|---|---|---|---|---|
1 | +accesskey attribute value must be unique | +accesskeys | +Best practice | +|||||
2 | +Active <area> elements must have alternate text | +area-alt | +WCAG 2.0 Level A | +|||||
3 | +Elements must only use allowed ARIA attributes | +aria-allowed-attr | +WCAG 2.0 Level A | +|||||
4 | +ARIA role must be appropriate for the element | +aria-allowed-role | +Best practice | +|||||
5 | ARIA hidden element must not contain focusable elements | aria-hidden-focus | WCAG 2.0 Level A | -2 | ||||
5 | +6 | +ARIA input fields must have an accessible name | +aria-input-field-name | +WCAG 2.0 Level A | +||||
7 | Required ARIA attributes must be provided | aria-required-attr | WCAG 2.0 Level A | -13 | ||||
6 | +8 | Certain ARIA roles must contain particular children | aria-required-children | WCAG 2.0 Level A | -13 | |||
7 | +9 | Certain ARIA roles must be contained by particular parents | aria-required-parent | WCAG 2.0 Level A | -13 | |||
8 | +10 | +Use aria-roledescription on elements with a semantic role | +aria-roledescription | +WCAG 2.0 Level A | +||||
11 | ARIA roles used must conform to valid values | aria-roles | WCAG 2.0 Level A | -13 | ||||
9 | +12 | +ARIA toggle fields have an accessible name | +aria-toggle-field-name | +WCAG 2.0 Level A | +||||
13 | ARIA attributes must conform to valid values | aria-valid-attr-value | WCAG 2.0 Level A | -10 | ||||
10 | +14 | ARIA attributes must conform to valid names | aria-valid-attr | WCAG 2.0 Level A | -10 | |||
11 | +15 | +<audio> elements must have a captions track | +audio-caption | +WCAG 2.0 Level A | +||||
16 | autocomplete attribute must be used correctly | autocomplete-valid | WCAG 2.1 Level AA | -3 | ||||
12 | +17 | Inline text spacing must be adjustable with custom stylesheets | avoid-inline-spacing | WCAG 2.1 Level AA | -8 | |||
13 | +18 | +<blink> elements are deprecated and must not be used | +blink | +WCAG 2.0 Level A | +||||
19 | Buttons must have discernible text | button-name | WCAG 2.0 Level A | -12 | ||||
14 | -Page must have means to bypass repeated blocks | -bypass | +20 | +<dl> elements must only directly contain properly-ordered <dt> and <dd> groups, <script>, <template> or <div> elements | +definition-list | WCAG 2.0 Level A | -1 | |
15 | -Documents must have <title> element to aid in navigation | -document-title | +21 | +<dt> and <dd> elements must be contained by a <dl> | +dlitem | WCAG 2.0 Level A | -1 | |
16 | +22 | +IDs of active elements must be unique | +duplicate-id-active | +WCAG 2.0 Level A | +||||
23 | IDs used in ARIA and labels must be unique | duplicate-id-aria | WCAG 2.0 Level A | -7 | ||||
17 | +24 | id attribute value must be unique | duplicate-id | WCAG 2.0 Level A | -20 | |||
18 | -Headings must not be empty | -empty-heading | +25 | +Elements in the focus order need a role appropriate for interactive content | +focus-order-semantics | Best practice | -6 | |
19 | +26 | Form field should not have multiple label elements | form-field-multiple-labels | WCAG 2.0 Level A | -17 | |||
20 | -Heading levels should only increase by one | -heading-order | +27 | +Frames must be tested with axe-core | +frame-tested | Best practice | -6 | |
21 | -Hidden content on the page cannot be analyzed | -hidden-content | +28 | +Frames must have a unique title attribute | +frame-title-unique | Best practice | -434 | |
22 | -<html> element must have a lang attribute | -html-has-lang | +29 | +Frames must have title attribute | +frame-title | WCAG 2.0 Level A | -1 | |
23 | +30 | <html> element must have a valid value for the lang attribute | html-lang-valid | WCAG 2.0 Level A | -1 | |||
24 | +31 | +HTML elements with lang and xml:lang must have the same base language | +html-xml-lang-mismatch | +WCAG 2.0 Level A | +||||
32 | +Images must have alternate text | +image-alt | +WCAG 2.0 Level A | +|||||
33 | +Alternative text of images should not be repeated as text | +image-redundant-alt | +Best practice | +|||||
34 | +Input buttons must have discernible text | +input-button-name | +WCAG 2.0 Level A | +|||||
35 | +Image buttons must have alternate text | +input-image-alt | +WCAG 2.0 Level A | +|||||
36 | Elements must have their visible text as part of their accessible name | label-content-name-mismatch | WCAG 2.1 Level A | -1 | ||||
25 | +37 | Form elements should have a visible label | label-title-only | Best practice | -17 | |||
26 | +38 | Form elements must have labels | label | WCAG 2.0 Level A | -12 | |||
27 | -Links must be distinguished from surrounding text in a way that does not rely on color | -link-in-text-block | -WCAG 2.0 Level A | -1 | +39 | +Banner landmark must not be contained in another landmark | +landmark-banner-is-top-level | +Best practice |
28 | -Links must have discernible text | -link-name | +40 | +Aside must not be contained in another landmark | +landmark-complementary-is-top-level | +Best practice | +||
41 | +Contentinfo landmark must not be contained in another landmark | +landmark-contentinfo-is-top-level | +Best practice | +|||||
42 | +Main landmark must not be contained in another landmark | +landmark-main-is-top-level | +Best practice | +|||||
43 | +Document must not have more than one banner landmark | +landmark-no-duplicate-banner | +Best practice | +|||||
44 | +Document must not have more than one contentinfo landmark | +landmark-no-duplicate-contentinfo | +Best practice | +|||||
45 | +Document must not have more than one main landmark | +landmark-no-duplicate-main | +Best practice | +|||||
46 | +Ensures landmarks are unique | +landmark-unique | +Best practice | +|||||
47 | +Links must be distinguished from surrounding text in a way that does not rely on color | +link-in-text-block | WCAG 2.0 Level A | -5 | ||||
29 | +48 | <ul> and <ol> must only directly contain <li>, <script> or <template> elements | list | WCAG 2.0 Level A | -1 | |||
30 | +49 | <li> elements must be contained in a <ul> or <ol> | listitem | WCAG 2.0 Level A | -3 | |||
31 | -Users should be able to zoom and scale the text up to 500% | -meta-viewport-large | -Best practice | -1 | +50 | +<marquee> elements are deprecated and must not be used | +marquee | +WCAG 2.0 Level A |
32 | -Zooming and scaling must not be disabled | -meta-viewport | -Best practice | -1 | +51 | +Timed refresh must not exist | +meta-refresh | +WCAG 2.0 Level A |
33 | -Page must contain a level-one heading | -page-has-heading-one | +52 | +<object> elements must have alternate text | +object-alt | +WCAG 2.0 Level A | +||
53 | +Bold, italic text and font-size are not used to style p elements as a heading | +p-as-heading | +WCAG 2.0 Level A | +|||||
54 | +[role='img'] elements have an alternative text | +role-img-alt | +WCAG 2.0 Level A | +|||||
55 | +scope attribute should be used correctly | +scope-attr-valid | Best practice | -1 | ||||
34 | -All page content must be contained by landmarks | -region | +56 | +Ensure that scrollable region has keyboard access | +scrollable-region-focusable | +WCAG 2.0 Level A | +||
57 | +Server-side image maps must not be used | +server-side-image-map | +WCAG 2.0 Level A | +|||||
58 | +The skip-link target should exist and be focusable | +skip-link | Best practice | -280 | ||||
35 | +59 | +svg elements with an img role have an alternative text | +svg-img-alt | +WCAG 2.0 Level A | +||||
60 | Elements should not have tabindex greater than zero | tabindex | Best practice | -5 | ||||
36 | +61 | The <caption> element should not contain the same text as the summary attribute | table-duplicate-name | Best practice | -1 | |||
37 | -Data or header cells should not be used to give caption to a data table. | -table-fake-caption | +62 | +Data or header cells should not be used to give caption to a data table. | +table-fake-caption | +WCAG 2.0 Level A | +||
63 | +All non-empty td element in table larger than 3 by 3 must have an associated table header | +td-has-header | +WCAG 2.0 Level A | +|||||
64 | +All cells in a table element that use the headers attribute must only refer to other cells of that same table | +td-headers-attr | +WCAG 2.0 Level A | +|||||
65 | +All th elements and elements with role=columnheader/rowheader must have data cells they describe | +th-has-data-cells | +WCAG 2.0 Level A | +|||||
66 | +lang attribute must have a valid value | +valid-lang | +WCAG 2.0 Level AA | +|||||
67 | +<video> elements must have captions | +video-caption | WCAG 2.0 Level A | -1 | ||||
38 | -All cells in a table element that use the headers attribute must only refer to other cells of that same table | -td-headers-attr | +68 | +<video> or <audio> elements do not autoplay audio | +no-autoplay-audio | WCAG 2.0 Level A | -1 |
What 'incomplete' axe checks means?
-- Incomplete results were aborted and require further testing. This - can happen either because of technical restrictions to what the rule - can test, or because a javascript error occurred. -
-- Visit axe API Documentation - to learn more. -
-What 'inapplicable' axe checks means?
-- The inapplicable array lists all the rules for which no matching - elements were found on the page. -
-- Visit axe API Documentation - to learn more. -
# | -Description | -Axe rule ID | -WCAG | -
---|---|---|---|
# | +Rule ID | +Enabled | +|
1 | -accesskey attribute value must be unique | -accesskeys | -Best practice | -
1 | +object-alt | +true | +|
2 | -Active <area> elements must have alternate text | -area-alt | -WCAG 2.0 Level A | -
2 | +role-img-alt | +true | +|
3 | -ARIA input fields must have an accessible name | -aria-input-field-name | -WCAG 2.0 Level A | -
3 | +input-image-alt | +true | +|
4 | +image-alt | +true | +|
5 | +svg-img-alt | +true | +|
6 | +area-alt | +true | +|
7 | +audio-caption | +true | +|
8 | +video-caption | +true | +|
9 | +definition-list | +true | +|
10 | +dlitem | +true | +|
11 | +listitem | +true | +|
12 | +list | +true | +|
13 | +th-has-data-cells | +true | +|
14 | +td-headers-attr | +true | +|
15 | +td-has-header | +true | +|
16 | +p-as-heading | +true | +|
17 | +aria-required-parent | +true | +|
18 | +aria-required-children | +true | +|
19 | +table-fake-caption | +true | +|
20 | +css-orientation-lock | +false | +|
21 | +autocomplete-valid | +true | +|
22 | +link-in-text-block | +true | +|
23 | +no-autoplay-audio | +true | +|
24 | +color-contrast | +true | +|
25 | +meta-viewport | +true | +|
26 | +avoid-inline-spacing | +true | +|
27 | +server-side-image-map | +true | +|
28 | +meta-refresh | +true | +|
29 | +blink | +true | +|
30 | +marquee | +true | +|
31 | +bypass | +true | +|
32 | +frame-title | +true | +|
33 | +document-title | +true | +|
34 | +scrollable-region-focusable | +true | +|
35 | +identical-links-same-purpose | +false | +|
36 | +label-content-name-mismatch | +true | +|
37 | +html-has-lang | +true | +|
38 | +html-lang-valid | +true | +|
39 | +html-xml-lang-mismatch | +true | +|
40 | +valid-lang | +true | +|
41 | +form-field-multiple-labels | +true | +|
42 | +duplicate-id-active | +true | +|
43 | +duplicate-id | +true | +|
44 | +duplicate-id-aria | +true | +|
45 | +aria-valid-attr | +true | +|
46 | +aria-valid-attr-value | +true | +|
47 | +aria-input-field-name | +true | +|
48 | +aria-roles | +true | +|
49 | +aria-toggle-field-name | +true | +|
50 | +aria-hidden-focus | +true | +|
51 | +aria-hidden-body | +true | +|
52 | +button-name | +true | +|
4 | -Use aria-roledescription on elements with a semantic role | -aria-roledescription | -WCAG 2.0 Level A | -
53 | +aria-allowed-attr | +true | +|
5 | -ARIA toggle fields have an accessible name | -aria-toggle-field-name | -WCAG 2.0 Level A | -
54 | +input-button-name | +true | +|
6 | -<audio> elements must have a captions track | -audio-caption | -WCAG 2.0 Level A | -
55 | +aria-required-attr | +true | +|
7 | -<blink> elements are deprecated and must not be used | -blink | -WCAG 2.0 Level A | -
56 | +aria-roledescription | +true | +|
8 | -<dl> elements must only directly contain properly-ordered <dt> and <dd> groups, <script>, <template> or <div> elements | -definition-list | -WCAG 2.0 Level A | -
57 | +link-name | +true | +|
9 | -<dt> and <dd> elements must be contained by a <dl> | -dlitem | -WCAG 2.0 Level A | -
58 | +label | +true | +|
10 | -Elements in the focus order need a role appropriate for interactive content | -focus-order-semantics | -Best practice | -
59 | +accesskeys | +true | +|
11 | -HTML elements with lang and xml:lang must have the same base language | -html-xml-lang-mismatch | -WCAG 2.0 Level A | -
60 | +region | +true | +|
12 | -Image buttons must have alternate text | -input-image-alt | -WCAG 2.0 Level A | -
61 | +aria-allowed-role | +true | +|
13 | -Elements must have their visible text as part of their accessible name | -label-content-name-mismatch | -WCAG 2.1 Level A | -
62 | +landmark-banner-is-top-level | +true | +|
14 | -Banner landmark must not be contained in another landmark | -landmark-banner-is-top-level | -Best practice | -
63 | +landmark-complementary-is-top-level | +true | +|
15 | -Aside must not be contained in another landmark | -landmark-complementary-is-top-level | -Best practice | -
64 | +landmark-contentinfo-is-top-level | +true | +|
16 | -Contentinfo landmark must not be contained in another landmark | -landmark-contentinfo-is-top-level | -Best practice | -
65 | +focus-order-semantics | +true | +|
17 | -Main landmark must not be contained in another landmark | -landmark-main-is-top-level | -Best practice | -
66 | +tabindex | +true | +|
18 | -Document must not have more than one banner landmark | -landmark-no-duplicate-banner | -Best practice | -
67 | +landmark-no-duplicate-main | +true | +|
19 | -Document must not have more than one contentinfo landmark | -landmark-no-duplicate-contentinfo | -Best practice | -
68 | +label-title-only | +true | +|
20 | -Document must not have more than one main landmark | -landmark-no-duplicate-main | -Best practice | -
69 | +frame-tested | +true | +|
21 | -<marquee> elements are deprecated and must not be used | -marquee | -WCAG 2.0 Level A | -
70 | +frame-title-unique | +true | +|
22 | -Timed refresh must not exist | -meta-refresh | -WCAG 2.0 Level A | -
71 | +heading-order | +true | +|
23 | -<object> elements must have alternate text | -object-alt | -WCAG 2.0 Level A | -
72 | +empty-heading | +true | +|
24 | -Bold, italic text and font-size are not used to style p elements as a heading | -p-as-heading | -WCAG 2.0 Level A | -
73 | +hidden-content | +true | +|
25 | -[role='img'] elements have an alternative text | -role-img-alt | -WCAG 2.0 Level A | -
74 | +landmark-unique | +true | +|
26 | -scope attribute should be used correctly | -scope-attr-valid | -Best practice | -
75 | +landmark-main-is-top-level | +true | +|
27 | -Ensure that scrollable region has keyboard access | -scrollable-region-focusable | -WCAG 2.0 Level A | -
76 | +page-has-heading-one | +true | +|
28 | -Server-side image maps must not be used | -server-side-image-map | -WCAG 2.0 Level A | -
77 | +landmark-one-main | +true | +|
29 | -The skip-link target should exist and be focusable | -skip-link | -Best practice | -
78 | +landmark-no-duplicate-banner | +true | +|
30 | -svg elements with an img role have an alternative text | -svg-img-alt | -WCAG 2.0 Level A | -
79 | +landmark-no-duplicate-contentinfo | +true | +|
31 | -Data or header cells should not be used to give caption to a data table. | -table-fake-caption | -WCAG 2.0 Level A | -
80 | +scope-attr-valid | +true | +|
32 | -All non-empty td element in table larger than 3 by 3 must have an associated table header | -td-has-header | -WCAG 2.0 Level A | -
81 | +image-redundant-alt | +true | +|
33 | -All th elements and elements with role=columnheader/rowheader must have data cells they describe | -th-has-data-cells | -WCAG 2.0 Level A | -
82 | +table-duplicate-name | +true | +|
34 | -lang attribute must have a valid value | -valid-lang | -WCAG 2.0 Level AA | -
83 | +skip-link | +true | +|
35 | -<video> or <audio> elements do not autoplay audio | -no-autoplay-audio | -WCAG 2.0 Level A | -
84 | +meta-viewport-large | +true | +
moderate | 1 | ||||
4 | +Elements should not have tabindex greater than zero | +tabindex | +Best practice | +serious | +3 | +
---|
Ensures tabindex attribute values are not greater than 0
+# | +Source Code | +Selector | +
---|---|---|
1 | +<input type="text" value="" class="city-input ac_input ui-autocomplete-input" autocomplete="off" id="from0" name="from0" tabindex="1" role="textbox" aria-autocomplete="list" aria-haspopup="true"> | +"#from0" | +
2 | +<input type="text" value="" class="city-input ac_input ui-autocomplete-input" autocomplete="off" id="to0" name="to0" tabindex="1" role="textbox" aria-autocomplete="list" aria-haspopup="true"> | +"#to0" | +
3 | +<input size="10" id="deptDate0" name="deptDate0" placeholder="mm/dd/yyyy" value="" tabindex="3" class="hasDatepicker input-dept"> | +"#deptDate0" | +