You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To make an accessible but visually pleasing website, we often need to add a visually-hidden (or sometimes called sr-only) CSS class.
What it does is allow it to be seen by assistive tech like screen readers by keeping the target element in the accessibility tree, but visually hides it so visual users don’t see it. It can be heard, but not seen.
It would be amazing if this core functionality could be built into browsers, and one that applies the best practice CSS approach.
It would ideally work fantastically with search too — perhaps a visually-hidden element is still searchable. I’m not familiar with how screen reader search usually works (do they use the usual search or a have different way of searching)?
To make an accessible but visually pleasing website, we often need to add a
visually-hidden(or sometimes calledsr-only) CSS class.What it does is allow it to be seen by assistive tech like screen readers by keeping the target element in the accessibility tree, but visually hides it so visual users don’t see it. It can be heard, but not seen.
The usual approach is to add a CSS rule like so:
However, it’s a bit of a hack.
It would be amazing if this core functionality could be built into browsers, and one that applies the best practice CSS approach.
It would ideally work fantastically with search too — perhaps a visually-hidden element is still searchable. I’m not familiar with how screen reader search usually works (do they use the usual search or a have different way of searching)?