- From: Maciej Stachowiak <mjs@apple.com>
- Date: Mon, 01 Feb 2010 02:17:44 -0800
- To: public-pfwg-comments@w3.org
I'm confused about the purpose and intended behavior of aria-hidden. Here at Apple, we've been working on adding ARIA markup to some HTML content, and we ran into cases where some portions of the content should be hidden from assistive technologies. (It's useful for visual presentation, but would be redundant in a screen reader.) For "shallow" hiding, role="presentation" works - it hides that specific element, but not any of its contents: http://www.w3.org/TR/wai-aria/roles#presentation "...However, the user agent MUST expose content and descendant elements that do not have an explicit or inherited role of presentation. Thus, the presentation role causes a given element to be treated as having no role, but does not cause the content contained within the element to be removed from the accessible tree. ..." In some cases, it turns out to be useful to hide a complete subtree, including contained text. In the case we are concerned with the text and markup in question is redundant with text equivalents for images (but the image can't just have alt="" because it gives more detailed and better formatted text; its text equivalent replaces both the image and this additional markup.) We thought that aria-hidden might be the tool for the job: http://www.w3.org/TR/wai-aria/states_and_properties#aria-hidden "...This allows assistive technology or user agents to properly skip hiddenelements in the document. ..." Now, in Safari+VoiceOver, content marked with aria-hidden will in fact not be read, even if it is still visible in the visual presentation. I'm told this is also true in IE7+JAWS. However, Firefox apparently completely ignores aria-hidden, and hides content from the screen reader only if it is actually hidden in the visual rendering too (e.g. display: none). The implementor's guide says: http://www.w3.org/WAI/PF/aria-implementation/ "User agents MUST provide an accessible object corresponding to DOM elements that meet any of the following criteria in the accessible tree: ... has one of the WAI-ARIA global states and properties but does not have the aria-hidden property set to "true". Hidden elements are not exposed to assistive technology." but later it says: "aria-hidden(state)=true - This is not used in mapping to platform accessibility APIs. Instead, use information from the browser core to determine if the element is hidden or not. " then yet still later, it describes aria-hidden as mapped to some specific MSAA events, contradicting the claim that it is "not used in the accessibility mapping": "aria-hidden | EVENT_OBJECT_SELECTION,EVENT_OBJECT_HIDE,EVENT_OBJECT_SHOW" So, I'm confused about the correct behavior. Is hiding elements with aria-hidden (regardless of their actual visibility) optional, required, or forbidden? The spec and the implementor's guide seem to say all three. I am especially concerned that at least one statement in the implementor's guide (the claim that aria-hidden is not used in mapping to platform accessibility APIs) appears to contradict the actual ARIA spec. Furthermore, I noticed comments in both the spec and implementor's guide that authors should only use aria-hidden on content that is hidden in the visual presentation too. That means using it as a deep equivalent of role="presentation" is in theory inappropriate, even if per spec it should work. Should aria-hidden be allowed for this use case? If not, should there be some other feature that hides content from assistive technologies but not the visual presentation? Putting role="presentation" on each element will not suffice; in addition to being terribly awkward, it does not hide the text. Our thoughtful designers are convinced that they need this functionality to get the best experience for all users. Specifically, we have a case where an img with alt text is followed by some visually-rendered markup (including some text). That text and formatting is redundant if you have the alt text, so we don't want to force the repetition on blind users. But the alt text is superior for users who cannot perceive the image, so it would not be an improvement to just put empty alt on the image and give blind users only the following text. On the other hand, the alt text is too verbose for users who can also see the image. And the little bit of extra markup and shorter text is very useful for our visual presentation. It seems like the best solution to this is to be able to hide bits of text and markup from the accessibility tree while still showing it in the visual rendering. But the ARIA feature that is supposed to do this is not recommended for this purpose and apparently not reliably usable for this purpose in implementations. Regards, Maciej
Received on Monday, 1 February 2010 10:18:19 UTC