Potential A11y Violation:
Nested interactive elements
Point of Failure
Interactive elements must not have focusable descendants. Example: if there's a link inside of a button, it will be ignored by assistive technology; all child elements of buttons are considered presentational (per the spec).
Available Automation Evaluation
In checking known available linting and testing tools, these are our findings.
Linting Exists
Automated linting exists in some JS frameworks:
- Ember: See the
ember-template-lint
library for theno-nested-interactive
rule.
Testing Exists
Automated testing exists. See the axe-core
library for the nested-interactive
rule.
Other Test Methods
In addition to automated tests, there are other types of tests that could be conducted to prevent this potential violation.
Developer Authored Test Could Exist
Developers should ensure that their code does not violate this rule. If using a linter or automated testing library is not possible, then write a test to ensure that the code throws an error if this potential violation occurs.
Manual Test Exists
Review page and ensure the point of failure does not exist, inspecting the DOM where required.