This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
The HTML spec[1] requires an img element with an empty alt (alt="") to be mapped to role=presentation[3] Firefox/IE/Chrome does not currently implement this (webkit does)[2] [1]http://www.w3.org/html/wg/drafts/html/master/dom.html#sec-strong-native-semantics [2]http://stevefaulkner.github.io/html-mapping-tests/ [3] effect of role=presentation http://www.w3.org/TR/wai-aria-implementation/#mapping_general from bug opened on firefox there is pushback https://bugzilla.mozilla.org/show_bug.cgi?id=1027018
You wrote: > webkit does (...map img[alt=""] to [role="presentation"]) Where are you seeing this? On brief glance, it looks as though WebKit doesn't actually map these images to the internal PresentationRole. These images just get ignored, so they don't have an accessible render object. We only expose the presentation role if the presentation node has none-presentational children. https://github.com/WebKit/webkit/blob/master/LayoutTests/inspector-protocol/dom/getAccessibilityPropertiesForNode-expected.txt#L171
This bug seems like an implementation detail to me. The mapping could be either role="presentation", or hidden/ignored, or potentially whatever Firefox is doing.
s/none-presentational/non-presentational/
(In reply to James Craig from comment #1) > You wrote: > > > webkit does (...map img[alt=""] to [role="presentation"]) > > Where are you seeing this? On brief glance, it looks as though WebKit > doesn't actually map these images to the internal PresentationRole. These > images just get ignored, so they don't have an accessible render object. We > only expose the presentation role if the presentation node has > none-presentational children. > > https://github.com/WebKit/webkit/blob/master/LayoutTests/inspector-protocol/ > dom/getAccessibilityPropertiesForNode-expected.txt#L171 I am probably incorrect >These images just get ignored, so they don't have an accessible render object." this equates to what (I think) it should do looking at the aria mapping guide it says for Mac role=presentation equates to "Not mapped" The HTML spec uses ARIA roles states and properties as an abstract indicator when it says img alt="" it does not mean that role=presentation must be exposed it means do whatever you do for role=presentation in the OS/browser. does that clarify? see this post for more detail: http://blog.paciellogroup.com/2014/06/html5-accessibility-implementation-support-browsers/
That clarifies it but I think it may be wrong. The important part in this situation is that the image is not exposed to AT, and that it's an implementation detail of how to do that. Perhaps you need an "ignored" boolean column or need to put the role as "img (ignored)" WebKit does that by leaving the ImageRole internally and marking it AccessibilityIsIgnored. The platform mappings do not expose ignored views to the plaform APIs (like the AX API on OS X). So in our case these images aren't exposed in the Accessibility tree at all. IIRC, Firefox takes a different approach, which is to expose the node but mark it with a property that indicates it's hidden or ignored. I think both implementation approaches are legitimate. Note that the WebKit automated test example I linked to lists the role retained as "img" b/c it's still an image. The "ignored" flag is the important piece of the puzzle here. WebKit's internal accessibility model, not the platform API. <img src="data:image/gif..." alt=""> exists: true label: role: img ignored: true
(In reply to James Craig from comment #1) > These images just get ignored, so they don't have an accessible render object. This isn't entirely accurate, but the key piece is that it's marked as ignored in the user agent's accessibility model, and not exposed to the platform accessibility API (WebKit). It would also be fine to expose it to the platform as ignored (Mozilla), but that is a platform-specific implementation detail.
(In reply to James Craig from comment #6) > (In reply to James Craig from comment #1) > > These images just get ignored, so they don't have an accessible render object. > > This isn't entirely accurate, but the key piece is that it's marked as > ignored in the user agent's accessibility model, and not exposed to the > platform accessibility API (WebKit). It would also be fine to expose it to > the platform as ignored (Mozilla), but that is a platform-specific > implementation detail. so how about we change the mapping to 'no role', must be marked as ignored or omitted from the acc tree? note: no role= "the user agent has no default mapping to ARIA roles. (However, it could have its own mappings to the accessibility layer.) " http://www.w3.org/html/wg/drafts/html/master/dom.html#concept-role-none
no role sounds good with me, you might want to have "closest match" that doesn't entails any implementation specifics.
I have updated definition: <td><span data-x="concept-role-none">No role</span>. User Agents must identify the <code>img</code> as ignored or omit it from the accessibility tree.
*** This bug has been marked as a duplicate of bug 28751 ***