Helpers
Visually hidden
Hidden on screen, still read aloud by screen readers — for labels that the design shows as an icon, and for "skip to content" links.
<button class="btn btn-icon">
<i class="mi mi-trash-2"></i>
<span class="visually-hidden">Delete order 10421</span>
</button>
Screen readers say "Delete order 10421, button"; everyone else sees the icon. (For icon buttons, aria-label does the same job and also gives Moey's tooltip its text.)
Skip link
visually-hidden-focusable stays hidden until it gets keyboard focus — the first Tab on the page shows "Skip to content".
Skip to content
Click here, then press Tab.
<a href="#main" class="visually-hidden-focusable">Skip to content</a>
| Class | What it does |
|---|---|
visually-hidden | hidden on screen, read by screen readers |
visually-hidden-focusable | the same, until it has keyboard focus |
hidden | hidden from everyone (see Display) |