- From: Leif Halvard Silli <xn--mlform-iua@xn--mlform-iua.no>
- Date: Fri, 30 Oct 2009 12:51:00 +0100
- To: Jonas Sicking <jonas@sicking.cc>
- CC: John Foliot <jfoliot@stanford.edu>, Charles McCathieNevile <chaals@opera.com>, public-html@w3.org
Jonas Sicking On 09-10-30 02.08: > On Thu, Oct 29, 2009 at 5:53 PM, John Foliot <jfoliot@stanford.edu> wrote: >> Jonas Sicking wrote: >>> Can you provide an example where @aria-describedby does not work as >>> well as @longdesc in the real world? >> http://www.cssquirrel.com/comic/?comic=42 >> >> The author is currently using a belt and suspenders solution, but using >> additional CSS to move the in-page link required by aria-describedby off >> screen - clearly signaling his visual intent and desire. @longdesc >> delivers that intent natively, with no additional 'configuration' or CSS >> styling required. Per right now, that page also uses @longdesc - and iCab's cursor immediately hinted about it as soon as I hovered above the image: <img id="imgComic" src="/images/comic/cs042.png" alt="Comic" aria-describedby="ariaLink" longdesc="http://www.cssquirrel.com/comicscripts/script42.htm" /> Hooray! Clearly that author is reading _this_ comic. ;-) > I don't know why that page is using such strange CSS to hide the link > from normal rendering, a simple "display:none" would have worked just > fine. John's point wasn't CSS "strangeness". "Display:none" wouldn't be any less strange. Rather the point was that @longdesc doesn't require any extra link, and therefore doesn't require *any* CSS. But OK, how strange is the CSS in question? Let's look: #ariaLink{position:absolute;left:-9999em;top:-9999em;} The above is just a *typical* CSS trick for making sure an element is presented in screen readers, but not in GUI user agents. Your claim that '"display:none" would have worked just fine", is the result of you and I reading the ARIA spec together. ;-) Because ARIA says that "display:none" does not matter - as long as the element is is pointed to via ARIA (aria-describedby="ariaLink" in this case). [1] However, if the author had used "display:none", then that link would not have been accessible in AT without ARIA support ... Clearly not your intention, I suppose? We are in this together .... And the only error I, personally, think that the CSS Squirrel is making, is the very use of aria-describedby="". Instead the author should have used aria-labelledby. Because: [2] "A label should provide the user with the essence of what the object does, whereas a description is intended to provide detail that some users might need. The fact that the #ariaLink points to a description that "provide detail that some users might need", doesn't make the #ariaLink itself into a description. I think, in this case, the only way that aria-describedby could have been the correct attribute to use would be if it pointed directly to an element within the page itself with the comic script therein. Then one could have used @longdesc and aria-describedby in tandem: <img id="imgComic" src="/images/comic/cs042.png" alt="Comic" aria-describedby="ariaDescription" longdesc="#ariaDescription" /> <div style="display:none">[ script ]</div> FIRST PROBLEM: I fear that you Jonas, with your "literal" reading of what "description" means, would not accept that the comic script of a comic strip is a description, would you? FIRST REAL PROBLEM: Will 'display:none' work? At least, here there are two ways to make the UA see the script section - thus the chances increase that 'display:none' works: (1) ARIA. If the UA supports ARIA display:none doesn't matter. (2) The :target pseudo-class: If the UA supports the :target pseudo-class, then it can make the script visible (to the screen reader or to all users) when the longdesc URI is activated. "Display:none" may still be unsafe - I'm not sure. I mention it here mostly to demo an example of how it theoretically could make sense - and to demo how aria can be used for "real" fallback. At any rate, if the page can contain a hidden link, then perhaps it can also contain a hidden comic script? > If you additionally wanted to add the intent that the link is not part > of normal page flow then a simple 'hidden' attribute would have worked > fine once browsers support HTML5. @hidden has the exact same issues as display:none, see above. [1] http://www.w3.org/TR/wai-aria/#textequivalentcomputation [2] http://www.w3.org/TR/wai-aria/#aria-describedby -- leif halvard silli
Received on Friday, 30 October 2009 11:57:48 UTC