WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Opacity Zero and Screen Readers

for

From: Patrick H. Lauke
Date: Jul 19, 2016 9:26AM


On 19/07/2016 16:12, Lovely, Brian (CONT) wrote:
> So the answer is "yes"? During a previous assessment, I had an
> element that the developer had really, really tried to hide. It was
> set to visibility:hidden, opacity:0, and was positioned offscreen. I
> set visibility to visible in order to see what the screen reader
> would announce when it was able to detect the element. I didn't hear
> anything, but then set the opacity to 1 and was then able to hear the
> element announced. As this was not a very exhaustive test, I wasn't
> sure if this was just a fluke situation or not.

The actual behavior is inconsistent across browser/AT combinations. I
seem to remember that opacity usually makes no difference, but that
visibility:hidden in most cases hides the content. But it's not
something that should be relied on (or at least something that should be
thoroughly tested across multiple browser/AT combinations before being
used in production).

See http://juicystudio.com/article/screen-readers-display-none.php,
http://webaim.org/techniques/css/invisiblecontent/,
https://www.paciellogroup.com/blog/2016/01/the-state-of-hidden-content-support-in-2016/

P
--
Patrick H. Lauke

www.splintered.co.uk | https://github.com/patrickhlauke
http://flickr.com/photos/redux/ | http://redux.deviantart.com
twitter: @patrick_h_lauke | skype: patrick_h_lauke