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
{{ message }}
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.
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)?
The text was updated successfully, but these errors were encountered:
RoyalIcing
changed the title
Add visually-hidden attribute
Add visually-hidden attribute / CSS property
Sep 17, 2021
I think this is a good idea. I wonder if whatwg or csswg is a better spot to discuss this though. I'm not sure if there are accessibility specific working groups too.
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)?
The text was updated successfully, but these errors were encountered: