- From: Joseph Scheuhammer <clown@alum.mit.edu>
- Date: Wed, 15 Feb 2012 15:53:04 -0500
- To: Laura Carlson <laura.lee.carlson@gmail.com>
- CC: Joseph Scheuhammer <clown@alum.mit.edu>, "wai-xtech@w3.org" <wai-xtech@w3.org>, Janina Sajka <janina@rednote.net>
Hi Laura, Laura Carlson wrote: > ... > > What would an author do if he really wanted to hide something from all > users? @hidden and role of presentation? > > Fact: if an element has a @hidden attribute, or is styled using "display:none" or "visibility:hidden", then browsers (1) do not render it on screen, and (2) do not publish anything to the a11y tree. A couple of qualifications: by "browsers" I mean FF, WebKit, and IE8. I haven't tested any other browsers. As for "the a11y tree", I've looked only at IA2 on Windows, and ATK/AT-SPI on Linux/GNOME. Note that for visibility:hidden, the element is not rendered, but the space it occupies is rendered -- there is a "hole". The test file I used is: http://clown.idrc.ocad.ca/Fluid/aria/HiddenPermutations.html As such, the element is not available visually, and is not available to ATs through the a11y API. That amounts to "hidden from all users". See also ARIA's definition of hidden, where it says that hidden elements are not visible to any user [1]. Fact: if an element has @aria-hidden='true', browsers do not publish the element to the a11y tree, *except* FF which adds a "hidden" property to the accessible object it does expose. Still, aria-hidden elements are rendered on screen, but that's because ARIA alone does not affect the rendering. Similar to above, an aria-hidden element is not available to ATs through the a11y APIs; hence it is hidden from ATs and is thereby not available to AT users. Authors are strongly advised that if they use @aria-hidden, then they should also use CSS and/or JavaScript to insure it is also not rendered. To answer your question, authors should not use @role='presentation' to hide things. In fact, that would be wrong since "hidden" and "presentation" mean different things, even if their effect on the a11y tree is similar or identical. "Presentation" elements are definitely rendered, but are in the markup purely for layout or decorative purposes. But, they are not accessible objects, and don't have any meaning in the a11y tree. Hidden things are not layout or decorative in nature, and are very relevant to the a11y tree if they change their state to "shown". [1] http://www.w3.org/TR/2011/CR-wai-aria-20110118/terms#def_hidden -- ;;;;joseph. 'A: After all, it isn't rocket science.' 'K: Right. It's merely computer science.' - J. D. Klaun -
Received on Wednesday, 15 February 2012 20:53:35 UTC