squirrelscan
GitHub

ARIA Hidden Focus

Ensures aria-hidden elements do not contain focusable content

Ensures aria-hidden elements do not contain focusable content

Rule ID a11y/aria-hidden-focus
Category Accessibility
Scope Per-page
Severity error
Weight 7/10

Solution

Elements with aria-hidden=‘true’ should not contain focusable content. When an element is hidden from assistive technology but still focusable, keyboard users can tab to it but screen reader users won’t know what they’re interacting with. Either remove aria-hidden or make children non-focusable with tabindex=‘-1’.

Enable / Disable

Disable this rule

[rules]
disable = ["a11y/aria-hidden-focus"]

Disable all Accessibility rules

[rules]
disable = ["a11y/*"]

Enable only this rule

[rules]
enable = ["a11y/aria-hidden-focus"]
disable = ["*"]

Type to search…

↑↓ navigate↵ openesc close