Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

display:none vs visibility:hidden vs text-indent:9999 How screen reader behave with each one?

What is the difference between these three for screen reader users?

like image 709
Jitendra Vyas Avatar asked Nov 18 '09 12:11

Jitendra Vyas


People also ask

Does visibility hidden affect screen readers?

display:none or visibility: hidden These styles will hide content from all users. The content is removed from the visual flow of the page and is ignored by screen readers. Do not use this CSS if you want the content to be read by a screen reader.

What is the difference between display none and visibility hidden?

display:none means that the tag in question will not appear on the page at all (although you can still interact with it through the dom). There will be no space allocated for it between the other tags. visibility:hidden means that unlike display:none, the tag is not visible, but space is allocated for it on the page.

What is the difference between opacity 0 and visibility hidden?

The visibility: hidden style behaves like a combination of opacity: 0 and pointer-events: none . Regarding the accessibility, opacity: 0 is the only property which makes the element accessible in the tab order, and the element's content can be read by screen readers.

What is the difference between visibility hidden and display none Mcq?

Display:none hides the element from the page, and the space it would take up on the page can be used by other elements. visibility:hidden hides the elements, but it continues to consume the space it normally would.


1 Answers

refer: http://css-discuss.incutio.com/?page=ScreenreaderVisibility

display:none: will not be seen nor heard. *
visibility: hidden: will not be seen nor heard. *
text-indent: 9999: will not be seen but it will be heard.

  • Most of the screen reader will not 'speak' display:none and visibility: hidden , but there are few screen readers like pwWebSpeak and HtReader which will read even these too.
like image 92
Rakesh Juyal Avatar answered Sep 21 '22 13:09

Rakesh Juyal