- Implementation
- SrOnly Props
Common Examples
TheSrOnly component renders content that is visually hidden but remains accessible to screen readers. This is essential for providing context to assistive technology users without affecting the visual design.When to Use
UseSrOnly when:- Visual formatting conveys meaning (colors, symbols)
- Abbreviations need expansion
When NOT to Use
Don’t useSrOnly when:- The visual text is already descriptive
aria-labeloraria-labelledbywould be more appropriate- The content should be visible to all users
React Accessibility
- Content in
SrOnlyis read by screen readers but not visible - Uses CSS techniques that maintain content in the accessibility tree
- Preserves all standard
spanelement functionality