WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Expander links

for

From: Jared Smith
Date: Apr 15, 2010 9:12AM


On Thu, Apr 15, 2010 at 1:55 AM, Steven Henderson wrote:
> Also, don't browsers and screen readers ignore elements with hidden
> attributes!?

Yes. Some of the time. There really isn't a 'hidden' attribute. You
can style content in ways that it is either hidden visually and still
read by a screen reader, or hidden visually and NOT read by a screen
reader. There is an aria-hidden attribute in ARIA that might allow
content to appear visually in the page, but be ignored by a screen
reader, however, as noted in a previous post, the ARIA spec provides
ambiguous and conflicting details on how this should work. And it
doesn't currently work at all anyway.

> Where as displaying as none would in fact capture
> browser/keyboard focus and screen reader attention?

display:none styles will hide content visually AND from screen readers
and keyboard focus. visibility:hidden does the same thing. There are a
few exceptions/bugs (which may now be resolved) -
http://juicystudio.com/article/screen-readers-display-none.php Using
both styles provides a pretty universal mechanism for content to be
invisible to everyone (except those seemingly mythical folks that
browse with styles disabled).

If you want content to be hidden visually, but read by a screen
reader, positioning it off-screen is the most universally supported
method - http://webaim.org/techniques/css/invisiblecontent/ That
article provides details on a few other methods for hiding content.

Jared Smith
WebAIM