Skip to main content
All articles

October 30, 2026·7 min read

aria-hidden: When It Helps and When It Breaks

aria-hidden removes content from assistive technology without hiding it on screen. Learn when that helps, when it breaks focus, and what to use instead.

accessibilitywcagariaaria-hiddenscreen-readerkeyboard-accessibilityiconshtml

The aria-hidden attribute does one narrow job: it removes an element from the accessibility tree, so assistive technology does not announce it, while leaving it visible on screen. That split, visible to sighted visitors and silent to screen reader users, is useful in a few places and harmful in others. The difference comes down to whether the hidden content is redundant, and whether anything focusable sits inside it.

MDN states the core behavior plainly. Adding aria-hidden="true" to an element removes that element and all of its children from the accessibility tree. It can improve the experience by hiding purely decorative content, duplicated content, or offscreen and collapsed content. But the attribute hides nothing visually. A sighted visitor still sees the content. Only the assistive technology view changes.

Key takeaways

  • aria-hidden="true" removes an element and all its children from the accessibility tree, but leaves them visible on screen.
  • Never put aria-hidden="true" on a focusable element, or on an ancestor of one.
  • Use it for decorative icons, duplicated text, and collapsed content that has an equivalent elsewhere.
  • aria-hidden="false" cannot undo a parent's aria-hidden="true".
  • If content is hidden with display none or the hidden attribute, aria-hidden is already redundant. Do not add it.

The good uses: decoration and duplication

The classic good use is a decorative icon beside visible text. A button that shows a magnifying glass icon plus the word "Search" needs only one announcement. Without aria-hidden, a screen reader may announce the icon character as well as the word, producing noise or a garbled name. Hiding the icon leaves a clean name.

<button>
  <span class="icon-search" aria-hidden="true"></span>
  <span>Search</span>
</button>

Duplicated content is the second good use. A link that shows both an icon and text describing the same destination, a heading repeated as a decorative large background word, or a star rating shown both as icons and as text such as "4 out of 5 stars" all repeat the same information twice. Hide the duplicate presentation and keep the one version that carries the meaning. The rule for hiding visible content is strict: only hide it when identical or equivalent meaning and function are exposed to assistive technology another way. If the text version says something different from the icon version, hiding one loses information.

Collapsed content is the third good use. A menu that is closed, an accordion panel that is shut, or an offscreen panel that is not currently shown can carry aria-hidden="true" while closed, then have it removed when opened. That keeps screen reader users from tabbing through or hearing content that is not currently available to anyone. The safer modern pattern for fully hidden content is the HTML hidden attribute or display none, which removes the content from both views at once. Use aria-hidden for content that must stay visible on screen while being silent to assistive technology, not as a general hiding tool.

The breaking use: focusable content inside a hidden parent

MDN warns against the one mistake that breaks pages: aria-hidden="true" should not be used on elements that can receive focus, and it should not be added onto the parent or ancestor of a focusable element. When a keyboard user tabs to a link or button that is hidden from the accessibility tree, focus lands on something the screen reader cannot describe. The user hears nothing useful, or hears the previous element again, while focus has in fact moved. That is a confusing and disorienting experience, and it can look like the page has stopped responding.

Failing version:

<div aria-hidden="true">
  <a href="/offers">View offers</a>
</div>

The link is still visible, still focusable with Tab, and still clickable. Only its announcement is gone. Fix it by removing aria-hidden from the parent, or by moving the link outside the hidden region, or by making the link itself non-focusable if it genuinely should not be reached, using tabindex="-1" together with a real hiding method. Do not leave a focusable control in a hidden tree and hope keyboard users will not find it. They will.

This trap appears most often in carousels and tab panels. A carousel hides offscreen slides with aria-hidden but leaves their links focusable. A tab panel hides inactive panels the same way. The fix in both cases is to remove hidden panels from the tab order as well as from the tree, or to use display none for panels that are not active, which handles both views at once.

The false fix: aria-hidden="false" on a child

A second trap follows from inheritance. Because aria-hidden is inherited by children, a child cannot opt back in. MDN states this directly: using aria-hidden="false" will not re-expose an element to assistive technology if any parent specifies aria-hidden="true". Developers who wrap a whole section in aria-hidden="true" and then try to rescue one button inside it with aria-hidden="false" will find the button still silent.

Failing version:

<div aria-hidden="true">
  <button aria-hidden="false">Buy now</button>
</div>

The fix is structural, not another attribute. Restructure the markup so the hidden region and the live control are siblings, not parent and child. Put the decorative or duplicate content in its own element with aria-hidden="true", and keep interactive content outside it.

When aria-hidden is redundant

MDN lists three cases where aria-hidden="true" should not be added at all: when the HTML hidden attribute is present, when the element or an ancestor is hidden with display none, or when visibility hidden applies. In all three cases the element is already removed from the accessibility tree. Adding aria-hidden changes nothing and adds a line for the next developer to misread.

The practical rule is to pick one hiding method and use it consistently. For content that should be gone for everyone, use display none or the hidden attribute. For content that should stay visible but stay silent for assistive technology, use aria-hidden="true" on the smallest element that covers only the redundant part, never on a wrapper that also holds controls.

A check before you ship

For each aria-hidden="true" on a page, answer three questions. Is the hidden content decorative or duplicated, with the same meaning available another way? Does the hidden element, or any element inside it, receive focus? Is the content already hidden by display none, visibility hidden, or the hidden attribute? If the first answer is no, remove the attribute. If the second answer is yes, restructure the markup. If the third answer is yes, delete the redundant attribute. What remains after those three questions is the set of aria-hidden uses that genuinely help.

How Axeazy helps with this exact issue

Axeazy lists ARIA labels on custom widgets and ARIA attribute validity among the 14 fix categories it works on. A scan can flag aria-hidden on focusable content and related ARIA problems in your code. Read the honest scope on the capabilities page, and read how the scan works to see how findings are recorded with a date and time.

The related invalid ARIA attributes guide covers the validity checks that sit beside this attribute, and the link names guide covers the naming rule that hidden icons serve. For keyboard behavior in general, see the keyboard tab order guide on the Axeazy blog.

Want a quick read on your own site? Run Axeazy's free 60 second scan . It needs no signup.

Last checked: October 30, 2026.

FAQ

Does aria-hidden hide content visually?

No. It removes content from the accessibility tree only. Sighted visitors still see it. To hide content for everyone, use display none or the HTML hidden attribute.

Can I put aria-hidden="true" on a button?

No. MDN warns against using it on elements that can receive focus, and against putting it on an ancestor of a focusable element. A hidden button can still receive keyboard focus while announcing nothing useful.

Does aria-hidden="false" on a child undo a parent's hiding?

No. Inheritance means a child cannot re-expose itself when a parent is hidden. Restructure the markup so the live control sits outside the hidden region.

When should I not add aria-hidden at all?

When the content is already hidden with display none, visibility hidden, or the hidden attribute. In those cases the element is already out of the accessibility tree, and the attribute adds nothing.

Sources

Check your own site

See what is actually wrong with your site.

Free, 60 second WCAG 2.2 AA scan. No credit card required.

Scope of every report we ship: SCOPE LIMITATION: This report documents violations identified by automated WCAG 2.2 AA scanning using axe-core v4.11.0. Automated tools cannot test every WCAG criterion; many criteria require manual review. This report does not constitute legal advice, guarantee ADA compliance, or protect against legal action. ADA compliance is a legal determination made by courts. For full WCAG conformance assessment, engage an IAAP-certified accessibility professional.