Accessibility · Junior · Question 45 of 75

What is a visually hidden (sr-only) class for?

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.

Further reading

Problem with a question

Accessibility · Junior · question 45

Test yourself

Take the Accessibility · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz