Visually Hidden
Accessibility utility that visually hides slotted content while keeping it available to screen readers using the standard sr-only clip pattern.
Preview
Attributes
| Attribute | Type | Default | Description |
|---|---|---|---|
focusable | boolean | — | When set, content becomes visible when it or anything inside has focus |
Installation
pura is copy-paste and dependency-free. Load the whole library, or just this component.
<link rel="stylesheet" href="/pura/tokens.css">
<script type="module" src="/pura/lib/visually-hidden.js"></script> import "./pura/lib/visually-hidden.js";