How to fix “ARIA hidden element must not be focusable or contain focusable elements”
By Justin Zagar · Updated
Something is hidden from screen readers with aria-hidden="true", but links or buttons inside it can still be reached with the Tab key. Hide closed menus and pop ups completely (with the hidden attribute, display:none or inert), or take aria-hidden off.
- axe rule
aria-hidden-focus- WCAG
- 4.1.2 Name, Role, Value (Level A)
- Lighthouse
- Google Lighthouse and PageSpeed Insights report it as “[aria-hidden="true"] elements contain focusable descendents”
What it means
aria-hidden="true" removes an element and everything inside it from what a screen reader can see. It doesn't stop the keyboard. So a keyboard user tabs onto a link in a closed side menu, the screen reader says nothing, and the focus seems to vanish.
The usual cause is an off canvas menu or pop up that's closed by sliding it off screen and adding aria-hidden, while its links stay focusable.
Who it affects
Keyboard users and screen reader users, who land on things they can't see or hear.
How to find it
- Run the free checker. The code it shows is the hidden container, often a mobile menu, side panel or pop up.
- Press Tab through the page with the menu closed. If the focus outline disappears for a few presses, it's moving through hidden links.
How to fix it
- When the menu is closed, hide it fully: the hidden attribute, display:none, or the inert attribute. All three take it out of the tab order.
- When it opens, remove that and move focus into it.
- Don't put aria-hidden on anything a person needs to reach.
A closed side menu
<div class="side-menu" aria-hidden="true">
<a href="/services">Services</a>
</div><div class="side-menu" hidden>
<a href="/services">Services</a>
</div>
<!-- the script removes "hidden" when the menu opens -->From a real fix
On the law firm site I fixed, the closed mobile menu was marked aria-hidden while its links stayed in the tab order, on every page. Making the closed menu inert, and moving focus into it when it opens, fixed it.
What a scanner can and can’t tell you
Fixing this clears one automated check. It doesn’t mean the page is accessible, and it doesn’t settle any legal question. Automated tests catch only part of the problems. W3C puts it plainly: evaluation tools “can not determine accessibility, they can only assist in doing so.” The rest takes a person working through the site with a keyboard and a screen reader.
Source: W3C WAI, Selecting Web Accessibility Evaluation Tools. Not legal advice.
Sources
All checked November 8, 2026. The rule wording is axe-core 4.14.0’s own.
Related fixes
- Elements must only use permitted ARIA attributes
ARIA attributes where they aren't allowed
- Buttons must have discernible text
Buttons with no text
- Frames must have an accessible name
Embeds without a title
Check a page for free
Scan any page of your site against WCAG 2.1 AA in about 30 seconds. You get the problems automated testing finds, in plain words, with a link to a fix guide for the common ones.
Rather have someone fix it for you? Tell me about your site.