VisuallyHidden

Hides content visually while keeping it available to screen readers

Category: display · WCAG 2.2-AA · accessibility, screen-reader, sr-only, hidden

Props

PropTypeDefaultDescription
childrenReactNodeContent announced by assistive technology but not painted

When to use

When not to use

How to build an accessible VisuallyHidden in React →

Examples

Icon button label

Gives an icon-only control an accessible name

<button type="button"><CloseIcon /><VisuallyHidden>Close dialog</VisuallyHidden></button>

Table context

<th>Price <VisuallyHidden>(in euros)</VisuallyHidden></th>

Related components

← Back to docs