0.1.3 • Published 1 year ago

@koddsson/accessbility-scanner v0.1.3

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

accessbility-scanner

AXE Rules

WCAG 2.0 Level A & AA Rules

ImplementedRule IDDescriptionImpactTagsIssue TypeACT Rules
area-altEnsures <area> elements of image maps have alternate textCriticalcat.text-alternatives, wcag2a, wcag244, wcag412, section508, section508.22.a, ACTfailure, needs reviewc487ae
aria-allowed-attrEnsures ARIA attributes are allowed for an element's roleSerious, Criticalcat.aria, wcag2a, wcag412failure, needs review5c01ea
aria-command-nameEnsures every ARIA button, link and menuitem has an accessible nameSeriouscat.aria, wcag2a, wcag412, ACTfailure, needs review97a4e1
aria-hidden-bodyEnsures aria-hidden='true' is not present on the document body.Criticalcat.aria, wcag2a, wcag412failure
aria-hidden-focusEnsures aria-hidden elements are not focusable nor contain focusable elementsSeriouscat.name-role-value, wcag2a, wcag412failure, needs review6cfa84
aria-input-field-nameEnsures every ARIA input field has an accessible nameModerate, Seriouscat.aria, wcag2a, wcag412, ACTfailure, needs reviewe086e5
aria-meter-nameEnsures every ARIA meter node has an accessible nameSeriouscat.aria, wcag2a, wcag111failure, needs review
aria-progressbar-nameEnsures every ARIA progressbar node has an accessible nameSeriouscat.aria, wcag2a, wcag111failure, needs review
aria-required-attrEnsures elements with ARIA roles have all required ARIA attributesCriticalcat.aria, wcag2a, wcag412failure4e8ab6
aria-required-childrenEnsures elements with an ARIA role that require child roles contain themCriticalcat.aria, wcag2a, wcag131failure, needs reviewbc4a75
aria-required-parentEnsures elements with an ARIA role that require parent roles are contained by themCriticalcat.aria, wcag2a, wcag131failureff89c9
aria-roledescriptionEnsure aria-roledescription is only used on elements with an implicit or explicit roleSeriouscat.aria, wcag2a, wcag412failure, needs review
aria-rolesEnsures all elements with a role attribute use a valid valueMinor, Serious, Criticalcat.aria, wcag2a, wcag412failure674b10
aria-toggle-field-nameEnsures every ARIA toggle field has an accessible nameModerate, Seriouscat.aria, wcag2a, wcag412, ACTfailure, needs reviewe086e5
aria-tooltip-nameEnsures every ARIA tooltip node has an accessible nameSeriouscat.aria, wcag2a, wcag412failure, needs review
aria-valid-attr-valueEnsures all ARIA attributes have valid valuesSerious, Criticalcat.aria, wcag2a, wcag412failure, needs review6a7281
aria-valid-attrEnsures attributes that begin with aria- are valid ARIA attributesCriticalcat.aria, wcag2a, wcag412failure5f99a7
audio-captionEnsures <audio> elements have captionsCriticalcat.time-and-media, wcag2a, wcag121, section508, section508.22.aneeds review2eb176, afb423
blinkEnsures <blink> elements are not usedSeriouscat.time-and-media, wcag2a, wcag222, section508, section508.22.jfailure
button-nameEnsures buttons have discernible textCriticalcat.name-role-value, wcag2a, wcag412, section508, section508.22.a, ACTfailure, needs review97a4e1, m6b1q3
bypassEnsures each page has at least one mechanism for a user to bypass navigation and jump straight to the contentSeriouscat.keyboard, wcag2a, wcag241, section508, section508.22.oneeds reviewcf77f2, 047fe0, b40fd1, 3e12e1, ye5d6e
color-contrastEnsures the contrast between foreground and background colors meets WCAG 2 AA contrast ratio thresholdsSeriouscat.color, wcag2aa, wcag143, ACTfailure, needs reviewafw4f7
definition-listEnsures <dl> elements are structured correctlySeriouscat.structure, wcag2a, wcag131failure
dlitemEnsures <dt> and <dd> elements are contained by a <dl>Seriouscat.structure, wcag2a, wcag131failure
document-titleEnsures each HTML document contains a non-empty <title> elementSeriouscat.text-alternatives, wcag2a, wcag242, ACTfailure2779a5
duplicate-id-activeEnsures every id attribute value of active elements is uniqueSeriouscat.parsing, wcag2a, wcag411failure3ea0c8
duplicate-id-ariaEnsures every id attribute value used in ARIA and in labels is uniqueCriticalcat.parsing, wcag2a, wcag411failure3ea0c8
duplicate-idEnsures every id attribute value is uniqueMinorcat.parsing, wcag2a, wcag411failure3ea0c8
form-field-multiple-labelsEnsures form field does not have multiple label elementsModeratecat.forms, wcag2a, wcag332needs review
frame-focusable-contentEnsures <frame> and <iframe> elements with focusable content do not have tabindex=-1Seriouscat.keyboard, wcag2a, wcag211failure, needs reviewakn7bn
frame-title-uniqueEnsures <iframe> and <frame> elements contain a unique title attributeSeriouscat.text-alternatives, wcag412, wcag2aneeds review4b1c6c
frame-titleEnsures <iframe> and <frame> elements have an accessible nameSeriouscat.text-alternatives, wcag2a, wcag412, section508, section508.22.ifailure, needs reviewcae760
html-has-langEnsures every HTML document has a lang attributeSeriouscat.language, wcag2a, wcag311, ACTfailureb5c3f8
html-lang-validEnsures the lang attribute of the <html> element has a valid valueSeriouscat.language, wcag2a, wcag311, ACTfailurebf051a
html-xml-lang-mismatchEnsure that HTML elements with both valid lang and xml:lang attributes agree on the base language of the pageModeratecat.language, wcag2a, wcag311, ACTfailure5b7ae0
image-altEnsures <img> elements have alternate text or a role of none or presentationCriticalcat.text-alternatives, wcag2a, wcag111, section508, section508.22.a, ACTfailure, needs review23a2a8
input-button-nameEnsures input buttons have discernible textCriticalcat.name-role-value, wcag2a, wcag412, section508, section508.22.a, ACTfailure, needs review97a4e1
input-image-altEnsures <input type="image"> elements have alternate textCriticalcat.text-alternatives, wcag2a, wcag111, wcag412, section508, section508.22.a, ACTfailure, needs review59796f
labelEnsures every form element has a labelMinor, Criticalcat.forms, wcag2a, wcag412, section508, section508.22.n, ACTfailure, needs reviewe086e5
link-nameEnsures links have discernible textSeriouscat.name-role-value, wcag2a, wcag412, wcag244, section508, section508.22.a, ACTfailure, needs reviewc487ae
listEnsures that lists are structured correctlySeriouscat.structure, wcag2a, wcag131failure
listitemEnsures <li> elements are used semanticallySeriouscat.structure, wcag2a, wcag131failure
marqueeEnsures <marquee> elements are not usedSeriouscat.parsing, wcag2a, wcag222failure
meta-refreshEnsures <meta http-equiv="refresh"> is not used for delayed refreshCriticalcat.time-and-media, wcag2a, wcag221failurebc659a
nested-interactiveEnsures interactive controls are not nested as they are not always announced by screen readers or can cause focus problems for assistive technologiesSeriouscat.keyboard, wcag2a, wcag412failure, needs review307n5z
no-autoplay-audioEnsures <video> or <audio> elements do not autoplay audio for more than 3 seconds without a control mechanism to stop or mute the audioModeratecat.time-and-media, wcag2a, wcag142, ACTneeds review80f0bf
object-altEnsures <object> elements have alternate textSeriouscat.text-alternatives, wcag2a, wcag111, section508, section508.22.afailure, needs review8fc3b6
role-img-altEnsures role='img' elements have alternate textSeriouscat.text-alternatives, wcag2a, wcag111, section508, section508.22.a, ACTfailure, needs review23a2a8
scrollable-region-focusableEnsure elements that have scrollable content are accessible by keyboardModeratecat.keyboard, wcag2a, wcag211failure0ssw9k
select-nameEnsures select element has an accessible nameMinor, Criticalcat.forms, wcag2a, wcag412, section508, section508.22.n, ACTfailure, needs reviewe086e5
server-side-image-mapEnsures that server-side image maps are not usedMinorcat.text-alternatives, wcag2a, wcag211, section508, section508.22.fneeds review
svg-img-altEnsures <svg> elements with an img, graphics-document or graphics-symbol role have an accessible textSeriouscat.text-alternatives, wcag2a, wcag111, section508, section508.22.a, ACTfailure, needs review7d6734
td-headers-attrEnsure that each cell in a table that uses the headers attribute refers only to other cells in that tableSeriouscat.tables, wcag2a, wcag131, section508, section508.22.gfailure, needs reviewa25f45
th-has-data-cellsEnsure that <th> elements and elements with role=columnheader/rowheader have data cells they describeSeriouscat.tables, wcag2a, wcag131, section508, section508.22.gfailure, needs reviewd0f69e
valid-langEnsures lang attributes have valid valuesSeriouscat.language, wcag2aa, wcag312, ACTfailurede46e4
video-captionEnsures <video> elements have captionsCriticalcat.text-alternatives, wcag2a, wcag122, section508, section508.22.aneeds revieweac66b

WCAG 2.1 Level A & AA Rules

ImplementedRule IDDescriptionImpactTagsIssue TypeACT Rules
autocomplete-validEnsure the autocomplete attribute is correct and suitable for the form fieldSeriouscat.forms, wcag21aa, wcag135, ACTfailure73f2c2
avoid-inline-spacingEnsure that text spacing set through style attributes can be adjusted with custom stylesheetsSeriouscat.structure, wcag21aa, wcag1412, ACTfailure24afc2, 9e45ec, 78fd32
target-sizeEnsure touch target have sufficient size and spaceSeriouswcag22aa, sc258, cat.sensory-and-visual-cuesfailure

Best Practices Rules

Rules that do not necessarily conform to WCAG success criterion but are industry accepted practices that improve the user experience.

ImplementedRule IDDescriptionImpactTagsIssue TypeACT Rules
accesskeysEnsures every accesskey attribute value is uniqueSeriouscat.keyboard, best-practicefailure
aria-allowed-roleEnsures role attribute has an appropriate value for the elementMinorcat.aria, best-practicefailure, needs review
aria-dialog-nameEnsures every ARIA dialog and alertdialog node has an accessible nameSeriouscat.aria, best-practicefailure, needs review
aria-textEnsures "role=text" is used on elements with no focusable descendantsSeriouscat.aria, best-practicefailure, needs review
aria-treeitem-nameEnsures every ARIA treeitem node has an accessible nameSeriouscat.aria, best-practicefailure, needs review
empty-headingEnsures headings have discernible textMinorcat.name-role-value, best-practicefailure, needs reviewffd0e9
empty-table-headerEnsures table headers have discernible textMinorcat.name-role-value, best-practicefailure, needs review
frame-testedEnsures <iframe> and <frame> elements contain the axe-core scriptCriticalcat.structure, review-item, best-practicefailure, needs review
heading-orderEnsures the order of headings is semantically correctModeratecat.semantics, best-practicefailure, needs review
image-redundant-altEnsure image alternative is not repeated as textMinorcat.text-alternatives, best-practicefailure
label-title-onlyEnsures that every form element has a visible label and is not solely labeled using hidden labels, or the title or aria-describedby attributesSeriouscat.forms, best-practicefailure
landmark-banner-is-top-levelEnsures the banner landmark is at top levelModeratecat.semantics, best-practicefailure
landmark-complementary-is-top-levelEnsures the complementary landmark or aside is at top levelModeratecat.semantics, best-practicefailure
landmark-contentinfo-is-top-levelEnsures the contentinfo landmark is at top levelModeratecat.semantics, best-practicefailure
landmark-main-is-top-levelEnsures the main landmark is at top levelModeratecat.semantics, best-practicefailure
landmark-no-duplicate-bannerEnsures the document has at most one banner landmarkModeratecat.semantics, best-practicefailure
landmark-no-duplicate-contentinfoEnsures the document has at most one contentinfo landmarkModeratecat.semantics, best-practicefailure
landmark-no-duplicate-mainEnsures the document has at most one main landmarkModeratecat.semantics, best-practicefailure
landmark-one-mainEnsures the document has a main landmarkModeratecat.semantics, best-practicefailure
landmark-uniqueLandmarks should have a unique role or role/label/title (i.e. accessible name) combinationModeratecat.semantics, best-practicefailure
meta-viewport-largeEnsures <meta name="viewport"> can scale a significant amountMinorcat.sensory-and-visual-cues, best-practicefailure
meta-viewportEnsures <meta name="viewport"> does not disable text scaling and zoomingCriticalcat.sensory-and-visual-cues, best-practice, ACTfailureb4f0c3
page-has-heading-oneEnsure that the page, or at least one of its frames contains a level-one headingModeratecat.semantics, best-practicefailure
presentation-role-conflictFlags elements whose role is none or presentation and which cause the role conflict resolution to trigger.Minorcat.aria, best-practice, ACTfailure46ca7f
regionEnsures all page content is contained by landmarksModeratecat.keyboard, best-practicefailure
scope-attr-validEnsures the scope attribute is used correctly on tablesModerate, Criticalcat.tables, best-practicefailure
skip-linkEnsure all skip links have a focusable targetModeratecat.keyboard, best-practicefailure, needs review
tabindexEnsures tabindex attribute values are not greater than 0Seriouscat.keyboard, best-practicefailure
table-duplicate-nameEnsure the <caption> element does not contain the same text as the summary attributeMinorcat.tables, best-practicefailure, needs review

WCAG 2.0 and 2.1 level AAA rules

Rules that check for conformance to WCAG AAA success criteria that can be fully automated. These are disabled by default in axe-core.

ImplementedRule IDDescriptionImpactTagsIssue TypeACT Rules
color-contrast-enhancedEnsures the contrast between foreground and background colors meets WCAG 2 AAA contrast ratio thresholdsSeriouscat.color, wcag2aaa, wcag146, ACTfailure, needs review09o5cg
identical-links-same-purposeEnsure that links with the same accessible name serve a similar purposeMinorcat.semantics, wcag2aaa, wcag249needs reviewb20e66
meta-refresh-no-exceptionsEnsures <meta http-equiv="refresh"> is not used for delayed refreshMinorcat.time-and-media, wcag2aaa, wcag224, wcag325failurebisz58

Experimental Rules

Rules we are still testing and developing. They are disabled by default in axe-core, but are enabled for the axe browser extensions.

ImplementedRule IDDescriptionImpactTagsIssue TypeACT Rules
css-orientation-lockEnsures content is not locked to any specific display orientation, and the content is operable in all display orientationsSeriouscat.structure, wcag134, wcag21aa, experimentalfailure, needs reviewb33eff
focus-order-semanticsEnsures elements in the focus order have a role appropriate for interactive contentMinorcat.keyboard, best-practice, experimentalfailure
hidden-contentInforms users about hidden content.Minorcat.structure, experimental, review-item, best-practicefailure, needs review
label-content-name-mismatchEnsures that elements labelled through their content must have their visible text as part of their accessible nameSeriouscat.semantics, wcag21a, wcag253, experimentalfailure2ee8b8
link-in-text-blockEnsure links are distinguished from surrounding text in a way that does not rely on colorSeriouscat.color, experimental, wcag2a, wcag141failure, needs review
p-as-headingEnsure bold, italic text and font-size is not used to style <p> elements as a headingSeriouscat.semantics, wcag2a, wcag131, experimentalfailure, needs review
table-fake-captionEnsure that tables with a caption use the <caption> element.Seriouscat.tables, experimental, wcag2a, wcag131, section508, section508.22.gfailure
td-has-headerEnsure that each non-empty data cell in a <table> larger than 3 by 3 has one or more table headersCriticalcat.tables, experimental, wcag2a, wcag131, section508, section508.22.gfailure
0.0.14

1 year ago

0.1.0

1 year ago

0.1.2

1 year ago

0.1.1

1 year ago

0.1.3

1 year ago

0.0.13

3 years ago

0.0.12

3 years ago

0.0.11

3 years ago

0.0.10

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago