Accessibility · Junior · Question 45 of 75
What is a visually hidden (sr-only) class for?
- 1Showing text only when the page is being printed
- 2Keeping text for screen readers but off the screen
- 3Hiding text from screen readers but not from sight
Show the answer
Correct answer: Keeping text for screen readers but off the screen
Explanation
It clips the element to 1px without removing it from the accessibility tree. It's handy for labels that are obvious visually, like a search icon.