Open
Description
Automated Checks for Accessibility Rules
Accessibility issues like these (but not all) could have an automated checks:
- [a11y] 9.4.1.2 - Name, role, value available #5397
- [a11y] 9.1.3.1e - Data tables implemented correctly #5380
- [a11y] 9.1.3.1a HTML structural elements for headlines #10722
+
accessibility standard rules violations
Why automate?
- Checking a11y rules is easy and quicker than manual
- Checks can be brought to the CI pipeline
- Early accessibility assessment
Why not depend on automated tests ONLY?
- Automated tests can only check if certain rules have been applied to certain elements or not
- Cannot guarantee the accessibility of a complete feature
Available Tools
Manual
- Google Lighthouse (available on chrome browser)
- Accessibility Insights
- ...
Automation
- axe-core (Most tools and libraries use this under the hood)
- e2e @axe-core/playwright
- component vue-axe@next
POC
Reports
Lighthouse | Accessibility Insights |
---|---|
![]() |
![]() |
Automated (axe-core):
{
"description": "Ensure buttons have discernible text",
"help": "Buttons must have discernible text",
"helpUrl": "https://dequeuniversity.com/rules/axe/4.10/button-name?application=playwright",
"id": "button-name",
"impact": "critical",
"failureSummary": "Fix any of the following:
Element does not have inner text that is visible to screen readers
aria-label attribute does not exist or is empty
aria-labelledby attribute does not exist, references elements that do not exist or references elements that are empty
Element has no title attribute
Element does not have an implicit (wrapped) <label>
Element does not have an explicit <label>
Element's default semantics were not overridden with role=\"none\" or role=\"presentation\"",
"html": "<button data-v-babade49=\"\" type=\"button\" class=\"oc-button oc-rounded oc-button-m oc-button-justify-content-center oc-button-gap-m oc-button-passive oc-button-passive-raw oc-ml-xs\" id=\"users-filter-confirm\">",
"none": [],
"target": ["#users-filter-confirm"],
"tags": [
"cat.name-role-value",
"wcag2a",
"wcag412",
"section508",
"section508.22.a",
"TTv5",
"TT6.a",
"EN-301-549",
"EN-9.4.1.2",
"ACT"
]
}
Proposal
Add automated accessibility checks:
- Rules checks - in ONE of the following forms
- Component level
- Separate e2e (Playwright)
- Integrate with existing e2e (Playwright - Cucumber)
- Keyboard only navigation - e2e (?)
Activity