- From: <bugzilla@jessica.w3.org>
- Date: Sun, 29 Aug 2010 15:04:26 +0000
- To: public-html-bugzilla@w3.org
http://www.w3.org/Bugs/Public/show_bug.cgi?id=10497 Summary: What happens to role of <img alt="non-empty"> inside a <figure role="img">? Product: HTML WG Version: unspecified Platform: PC URL: http://dev.w3.org/html5/spec/content-models#annotation s-for-assistive-technology-products-aria OS/Version: All Status: NEW Keywords: a11y Severity: normal Priority: P2 Component: HTML5 spec (editor: Ian Hickson) AssignedTo: ian@hixie.ch ReportedBy: xn--mlform-iua@xn--mlform-iua.no QAContact: public-html-bugzilla@w3.org CC: mike@w3.org, public-html@w3.org, jonas@sicking.cc Depends on: 10066,10483,10485 REQUEST: An <img alt="non-empty" > inside a <figure role="img"> looses its role="img" and becomes either presentational or simply a "normal" text container. CONSEQUENTLY, for <figure role="img">, then it should be a requirement that <img> elements that it may contain have role="presentational"/alt="" _or_ that @aria-labelledby or @aria-describedby is used to point to the <img>, so that the AT can include the @alt text in its accessible name calculation. DISCUSSION: ARIA 1.0 says that the children of an element with role="img" are presentational. http://www.w3.org/TR/wai-aria/roles#img And presentational elements should be hidden from AT - otherwise it could lead to duplication of content. http://www.w3.org/TR/wai-aria/complete#childrenArePresentational A _possible_ conclusion thus is, that in the following example, then the @alt text of the <img> should not be presented, as the <img> shoudl be considered presentational: <figure role="img"> <img alt="description"> <figcaption>caption</figcaption> </figure> (Yeah, if we take ARIA 1.0 _very_ literally, then even the <figcaption> should be treated as presentational.) At the same time, ARIA gives this code example, where a <div role="img"> has caption element. Here, the captioning element is not ignored, simply because it is pointed to via aria-labelledby: <div role="img" aria-labelledby="caption"> <img src="example.png" role="presentation" alt=""> <p id="caption">A visible text caption labeling the image.</p> </div> http://www.w3.org/TR/wai-aria/complete#presentation But what if it had _not_ been pointed to by aria-labelledby? Conseptually, @alt must be considered an equivalent to @aria-label, despite that ARIA 1.0's definition of aria-label draws a link to @title. http://www.w3.org/TR/wai-aria/complete#aria-label That said, ARIA _also_ draws a link between @alt and @aria-label: ]] If aria-label and aria-labelledby are empty or undefined, check for the presence of an equivalent host language attribute or element for associating a label, and use those mechanisms to determine a text alternative. For example, in HTML, the img element's alt attribute defines a label string and the label element references the form element it labels. [[ http://www.w3.org/TR/wai-aria/complete#textalternativecomputation Thus, the logical conclusion is that <img alt="non-empty"> changes from having role="img" to simply being a text container element, whenever it is the (only) child(ren) of a <figure role="img">. In order to make sure that AT presents the content of the @alt attribute to the user, there should be an @aria-labelledby or @aria-describedby attribute on the <figure role="img"> element, with a reference to the <img> element: ]] <figure role="img" aria-describedby="photo-1"> <img id="photo-1" src="image" alt="Mom is holding her grandson in here arms. He is smiling at her. Mom sits in her usual chair." > <figcaption>Mom with her grandson.</figcaption> </figure> [[ (This example takes for granted that the <figcaption> automatically will be considerd a caption for the entire <figure role="img"> - bug 10483 ) -- Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug.
Received on Sunday, 29 August 2010 15:04:28 UTC