HTML & CSS · Middle · Question 72 of 75
How do you hide a text label visually but keep it for screen readers?
- ✓Correct answer: With a "visually hidden" (sr-only) class: 1px clipped box with
position: absolute, notdisplay: none - 2With
display: none - 3With
visibility: hidden
Explanation
display: none and visibility: hidden remove the content from the accessibility tree. Tailwind's sr-only utility implements the clipping pattern.