liveBook · Manning

Aria-hidden

As explained in Architecting Accessibility

aria-hidden is an ARIA attribute that controls whether an element and its contents are exposed in the accessibility tree.

For screen-reader users, decorative SVGs can add noise and make a site harder to use. Set aria-hidden="true" on a decorative inline SVG to remove it from the accessibility tree; hide only icons that add no meaningful information or functionality. section 3.3.1 section 3.3.3

<button aria-label="Search"> #A
  <svg aria-hidden="true">...</svg> #B
</button>

The button keeps its accessible name through aria-label="Search", while aria-hidden="true" marks its SVG icon as decorative. section 3.3.3

If an icon conveys useful context or functionality, do not hide it from assistive technologies. Test with a screen reader to check that decorative images are ignored. section 3.3.3 section 3.3.1

How Architecting Accessibility covers it

How deep it goes
Defines the effect on the accessibility tree and shows SVG examples, but does not detail broader ARIA behavior.
Examples
Shows decorative inline SVGs and an icon-only search button whose SVG is hidden while aria-label names the button.
What you can do after
Evaluate whether an SVG is decorative and hide it without removing the interactive control's accessible name.
How it connects
Connects inline SVGs with decorative images, the accessibility tree, and accessible names for interactive elements.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Architecting Accessibility. The section links point to the parts of the book it draws on.