Potential A11y Violation:
Nested interactive elements

  • Linting Exists
  • Testing Exists

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).

Automation

Linting

Automated linting exists in some JS frameworks:

Testing

Automated testing exists. See the axe-core library for the nested-interactive rule.

Developer Authored Test

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

Review page and ensure the point of failure does not exist, inspecting the DOM where required.

Relevant Link(s) (external):