a11y.aria-hidden-focusHidden from screen readers, still reachable by keyboard
Why it matters
aria-hidden="true" takes something out of what a screen reader reads, and nothing else: a link or button marked with it can still be reached with Tab. Someone using a screen reader then lands on a control that is announced as nothing, and can't tell where they are. The commonest case is the # link beside a heading, marked hidden because it is decoration and left in the tab order.
We judge only a link or control that is itself marked aria-hidden. One inside a hidden container is nearly always a closed menu or dialog that a stylesheet hides, which the HTML alone can't show, so we say nothing about those. To check them, press Tab with the menu closed: if the focus disappears, the menu needs inert.
Sources: WCAG 2.2, 4.1.2 Name, Role, Value (Level A), and the W3C's test rule for it, Element with aria-hidden has no content in sequential focus navigation.
How to fix it
Take it out of the tab order as well, or don't hide it:
<h2 id="pricing">Pricing <a href="#pricing" class="anchor" aria-hidden="true" tabindex="-1">#</a></h2>For a closed menu or dialog, inert hides the whole thing from the keyboard and from screen readers together:
<nav class="mobile-menu" inert>…</nav>And when it is meant to be used, it isn't decoration: remove aria-hidden.