Concise assistive text that remains in the accessibility tree.
Primitive contract
VisuallyHidden
Keeps essential text available to assistive technology while removing it from the visual flow without a zoom clipping defect.
Assistive-technology-only text · @sanchika/primitivesPurpose and semantics
Keeps essential text available to assistive technology while removing it from the visual flow without a zoom clipping defect.
Recommended semantic: Use span or another text element; do not apply permanently to interactive controls.
Anatomy
Finite variants and important states
- Required states
- default
- Class hooks
.sk-visually-hidden
Composed synthetic exemplar
Rendered state matrix
VisuallyHidden: 1 required state
Each specimen starts from the package-owned example and contract state inventory. Simulated pointer and focus frames are labelled; consumers still verify real interaction in context.
Opens source repository
Accessibility and consumer responsibility
- Do not apply to focusable controls
- A skip link must use a separate visible-on-focus composition.
- Text must add useful context
- Avoid duplicating nearby visible copy verbatim
- Verify the text is announced
- Keep focusable controls visible
- Test zoom and screen-reader behavior
- Remains available at zoom and on narrow screens.
No override is needed because the primitive adds no motion.
- No authored color is required.
Compact API reference
- Package
@sanchika/primitives- CSS
@sanchika/primitives/styles.css- Contract
primitiveSpecs.find((contract) => contract.name === "VisuallyHidden")- Primary class
.sk-visually-hidden