Usage
Visually Hidden removes content from view while keeping it in the accessibility tree, so screen readers still announce it. Use it for labels and context that sighted users get from layout or iconography.
import "@nordhealth/components/lib/VisuallyHidden"
Examples
Basic
Hide content visually while keeping it available to screen readers.
Screen-reader-only context
Add extra context for assistive technology without changing the visible UI.
Accessibility
- Content stays in the accessibility tree and is announced by screen readers — it is hidden visually, not from assistive technology.
- Use it to name icon-only controls or to add context that sighted users infer from layout.
- Don't use it to hide content from everyone — for that, remove it or use
hidden/display: none.
API reference
VisuallyHidden
Visually hidden is used when an element needs to be available to assistive technologies like screen readers, but be otherwise hidden.
<nord-accordion></nord-accordion>Slots
| Slot name | Description |
|---|---|
Default slot | The visually hidden content. |