aria-hidden-focus

ARIA hidden elements must not be focusable

automaticWCAG 2.4.7, 4.1.2 (AA)confidence: highseverity: seriousrobust

Checks that aria-hidden="true" elements are not focusable and do not contain focusable descendants.

Applies to. Applies to elements that have aria-hidden="true".

Expectation. No element with aria-hidden="true" may itself be focusable, and no focusable element may exist within an aria-hidden="true" subtree. Notes:

  • Focusability is computed via ctx.helpers.getFocusableInfo (native + tabindex + contenteditable).
  • Elements that are not rendered (e.g., display:none, visibility:hidden, [hidden]) are excluded.
  • Elements hidden via CSS in ways that still allow keyboard focus (e.g., opacity:0, off-screen, clip) remain in-scope and will be flagged when focusable.

Examples

pass
<div aria-hidden="true">
<p>Decorative text</p>
</div>

Nothing inside the hidden subtree is focusable, so hiding it from assistive tech leaves no dead focus stop.

fail
<div aria-hidden="true">
<a href="/x">Link</a>
</div>

The link stays in the tab order even though `aria-hidden` removes it from the accessibility tree.

View source