SeriousWCAG 4.1.2 · Level A
aria-hidden-focusHidden content can still be focused
When a link or button sits inside aria-hidden="true", keyboard users can tab to it but screen readers announce nothing. Make the hidden content unfocusable (the inert attribute does this) or stop hiding it.
Who it hurts
Screen reader users, who land on a silent, invisible stop, and keyboard users.
Closed menus, off-screen carousel slides and modal backgrounds are the usual causes.
How to fix it
Pick your stack. Review every change before you ship it.
Before
<nav class="drawer" aria-hidden="true">
<a href="/shop">Shop</a>
</nav>After
<nav class="drawer" inert>
<a href="/shop">Shop</a>
</nav>Check it by hand too
Tab through the page with menus and dialogs closed. Focus should never disappear.
Automated checks find a large share of accessibility problems, but not all of them. Passing this check does not on its own make a page compliant.
WCAG reference
- 4.1.2 Name, Role, Value (Level A). Understanding 4.1.2