This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
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 )
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document: http://dev.w3.org/html5/decision-policy/decision-policy.html Status: Did Not Understand Request Change Description: no spec change Rationale: I don't understand. What problem is this solving? For non-visual users, <img> is text, not an image, especially in a situation where there _is_ alternative text. Why would you want to taunt users by saying that it was an image? Sure, there are cases where that might be appropriate, but those are the cases where you can set role=img. Most of the time, in conforming documents, the alt="" is going to be text that can replace the image, so that there is an image is irrelevant.
(In reply to comment #1) > Status: Did Not Understand Request > Change Description: no spec change > Rationale: I don't understand. What problem is this solving? For non-visual > users, <img> is text, not an image, especially in a situation where there _is_ > alternative text. Why would you want to taunt users by saying that it was an > image? Sure, there are cases where that might be appropriate, but those are the > cases where you can set role=img. Most of the time, in conforming documents, > the alt="" is going to be text that can replace the image, so that there is an > image is irrelevant. My bug was filed with the understanding that the default role of <img> should be role="img". Howeer, you have just resolved bug 10485 to say that the default role of <img> should be no role, and as long as that remains the case, then the only thing to consider would be whether the role, whenever there is no @alt, should be presentational.
(In reply to comment #1) > EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are > satisfied with this response, please change the state of this bug to CLOSED. If > you have additional information and would like the editor to reconsider, please > reopen this bug. If you would like to escalate the issue to the full HTML > Working Group, please add the TrackerRequest keyword to this bug, and suggest > title and text for the tracker issue; or you may create a tracker issue > yourself, if you are able to do so. For more details, see this document: > http://dev.w3.org/html5/decision-policy/decision-policy.html > > Status: Did Not Understand Request > Change Description: no spec change > Rationale: I don't understand. What problem is this solving? For non-visual > users, <img> is text, not an image, especially in a situation where there _is_ > alternative text. Why would you want to taunt users by saying that it was an > image? Sure, there are cases where that might be appropriate, but those are the > cases where you can set role=img. Most of the time, in conforming documents, > the alt="" is going to be text that can replace the image, so that there is an > image is irrelevant. Your logic is based on lack of understanding of users with disabilities and assistive technology. Many users of screen readers are not "non-visual" they may have limited vision or they may have cognitive impairments, removing role information from images does a disservice to these users and reduces the accessibility of content for them.
(In reply to comment #3) > (In reply to comment #1) > Your logic is based on lack of understanding of users with disabilities and > assistive technology. > Many users of screen readers are not "non-visual" they may have limited vision > or they may have cognitive impairments, removing role information from images > does a disservice to these users and reduces the accessibility of content for > them. Regardless of his logic, this bug was filed with the assumption that the default for an <img> without an emtpy @alt="", would be role="img". And, I now know the answer to my question - it gets some kind of presentation role. See: http://www.w3.org/TR/wai-aria/complete#childrenArePresentational http://www.w3.org/TR/wai-aria/complete#img Thus, the 1st result of setting the role of <figure> to "img", would be that the user agent wouldn't present the content of the <figcaption> (if any) or of the @alt text (if any) to the AT user. The 2nd result would be that, in order provide a caption, one would have to use aria-labelledby to point to the <figcaption> and/or the <img> element. Effectively, to add role="img" without simultaneously adding a non-empty aria-labelledby, would be equal to placing an <img> with no @alt attribute into the document: the element would be presented to the user as an image. However, they would not receive any alternative text for the image. So, then the next queston becomes: Should a conformance check consider <element role="img">, without any label identified via and aria-* attribute, a bug? I think yes.
I agree, but that's an ARIA issue, not an HTML issue. Not sure what to do with the status of this bug. Should it be resolved somehow? Transferred to ARIA?
Marking WORKSFORME for now (since the HTML side doesn't need this), but if it should be transferred to ARIA feel free to do so.
The bug-triage sub-team suggests that the ARIA mapping sub-team reviews the bug, it is not task force priority, we recommend closing it.