Hidden content must not receive keyboard focus

An element with aria-hidden="true" is removed from what screen readers announce, so nothing inside it may be reachable with the Tab key. Otherwise keyboard focus lands on controls that assistive technology says do not exist.

Rule IDaria-hidden-focus
ImpactSerious
Success criterion 4.1.2 Name, Role, Value · A
StandardsWCAG 2.0 · WCAG 2.1 · WCAG 2.2 · Section 508 · EN 301 549
Readabler fix Fixed automatically

Example

Before
<div class="promo-banner" aria-hidden="true">
  <img src="sale.svg" alt="">
  <a href="/sale">Shop the winter sale</a>
</div>

Tabbing reaches the link, but the screen reader announces nothing or only “blank”.

After
<div class="promo-banner" aria-hidden="true">
  <img src="sale.svg" alt="">
  <a href="/sale" tabindex="-1">Shop the winter sale</a>
</div>

The hidden link is skipped by Tab and by the screen reader alike.

Why it matters

Screen reader users rely on what the accessibility tree tells them. aria-hidden="true" deletes an element and all its children from that tree, but it does not stop the browser from moving keyboard focus there. When a user presses Tab and focus lands on a hidden link, the screen reader has nothing to say: the user hears silence or “blank” and cannot tell where they are or what pressing Enter will do.

Keyboard-only users with some sight see focus jump to something that may not even look interactive, such as an off-screen menu or a duplicated carousel slide. Both groups lose their place on the page and may trigger actions by accident. It typically happens with closed menus, inactive carousel slides and modal backgrounds that were hidden with ARIA only.

How to fix it

First decide whether the content should really be hidden from screen readers.

The content is useful. Remove aria-hidden so everyone gets it:

<div class="promo-banner">
  <a href="/sale">Shop the winter sale</a>
</div>

The content is a visual duplicate (a cloned carousel slide, a decorative copy of a link). Keep aria-hidden and take each control out of the tab order with tabindex="-1", or disable form controls:

<div class="slide slide--clone" aria-hidden="true">
  <a href="/rooms/deluxe" tabindex="-1">Deluxe room</a>
  <button type="button" disabled>Book</button>
</div>

The content is inactive (a closed menu, the page behind an open dialog). Use inert, which removes it from the accessibility tree and blocks focus and clicks in one step:

<main inert>…</main>
<div role="dialog" aria-modal="true" aria-labelledby="dlg-title">…</div>

You can also hide it completely with hidden or display: none. Remember to remove inert or hidden when the content becomes active again.

Checklist

  1. Find every element with aria-hidden="true".
  2. Remove aria-hidden from content that is meaningful.
  3. Give focusable children tabindex="-1" or disable them.
  4. Use inert or hidden for closed menus and page backgrounds.

How the check works

The check looks at every element with aria-hidden="true". It fails when the element itself, or any element inside it, can be reached with the Tab key. Controls that are disabled or have tabindex="-1" pass. You should still press Tab through the page yourself, because content that becomes focusable after a script runs is only caught if it is in that state during the test.

Resources

Updated October 27, 2026