DEV Community

Discussion on: A11y tips: hide content only from sighted users

Collapse
 
grahamthedev profile image
GrahamTheDev

Hey, remove the margin:-1px this caused an issue in some versions of VoiceOver.

Other than that a nice and robust visually hidden class πŸ’ͺ

Also opacity:0 was causing some issues with it being treated as hidden so opacity 0.01 was recommended, however I can find the source for that one so I can’t remember which screen reader browser combo it was.

As always a great addition to the series, enjoyed the HTML one and I am enjoying this one even more ❀️

Collapse
 
carlosespada profile image
Carlos Espada

Thank you very much for the tips, I write them down, I will research them for documentation and update the article πŸ™‚

It makes me very happy that there are people who enjoy the articles and find them useful ❀️

Collapse
 
carlosespada profile image
Carlos Espada

Regarding opacity: 0, I've found this article from Scott O'Hara:

Testing today (June 17, 2021) after a prompt by Rachel Leggett, it appears this is no longer a bug and opacity: 0 will no longer incorrectly completely hide content from the screen reader.

Collapse
 
grahamthedev profile image
GrahamTheDev

Thanks for that, it is always hard to know if stuff you know is outdated, saves me a load of time (and stops me spreading misinformation!)