Hidden elements can still receive keyboard focus

Automated check aria-hidden-focus, run with axe-core

WCAG
4.1.2 Name, Role, Value (Level A)
Severity
Serious: completable, but painful
Typical effort
Moderate, 1 to 4 hours
Category
Keyboard

Who this affects

Keyboard-only and screen reader users.

Why it matters

Focus disappears into content marked aria-hidden="true" — commonly a closed menu or modal — and the user is stranded with no visible cursor. One of the most disorienting failures there is.

How to fix it

When hiding content, also remove it from the tab order (display:none, the hidden attribute, or inert). Never combine aria-hidden="true" with focusable children.

Check your own website

The free scan tests 3 pages against WCAG 2.2 A and AA in about 30 seconds. No sign-up.

Scan my website — free

Related checks: Keyboard

All checks