Testing: Enable all accessibility rules validation in e2e tests #15452
Labels
[Focus] Accessibility (a11y)
Changes that impact accessibility and need corresponding review (e.g. markup changes).
Good First Issue
An issue that's suitable for someone looking to contribute for the first time
Needs Dev
Ready for, and needs developer efforts
[Type] Automated Testing
Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests.
[Type] Enhancement
A suggestion for improvement.
All e2e tests have accessibility rules validation enabled by default as of #15018.
We still need to enable the following rules:
aria-allowed-role
aria-hidden-focus
aria-input-field-name
aria-valid-attr-value
button-name
color-contrast
dlitem
duplicate-id
label
link-name
listitem
region
All rules are listed and explained in depth here:
https://github.com/dequelabs/axe-core/blob/develop/doc/rule-descriptions.md
There are ongoing efforts to fix issues reported as part Accessibility Audit which might resolve the majority of violations. See the related project: https://github.com/WordPress/gutenberg/projects/25.
To enable one of the listed rules, the following file should be updated:
gutenberg/packages/e2e-tests/config/setup-test-framework.js
Lines 163 to 174 in a797ec5
In many cases, it might require additional work to ensure that violations are resolved. That's why I recommend opening 1 PR per rule.
The text was updated successfully, but these errors were encountered: