<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>26149</bug_id>
          
          <creation_ts>2014-06-19 19:27:30 +0000</creation_ts>
          <short_desc>should img alt=&quot;&quot; be mapped to role=presentation?</short_desc>
          <delta_ts>2015-06-04 10:33:46 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>HTML WG</product>
          <component>HTML5 spec</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>28751</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>a11y</keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="steve faulkner">faulkner.steve</reporter>
          <assigned_to name="This bug has no owner yet - up for the taking">dave.null</assigned_to>
          <cc>dmazzoni</cc>
    
    <cc>faulkner.steve</cc>
    
    <cc>jcraig</cc>
    
    <cc>lwatson</cc>
    
    <cc>mike</cc>
    
    <cc>mzehe</cc>
    
    <cc>public-html-admin</cc>
    
    <cc>public-html-wg-issue-tracking</cc>
    
    <cc>schwer</cc>
    
    <cc>surkov.alexander</cc>
          
          <qa_contact name="HTML WG Bugzilla archive list">public-html-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>108090</commentid>
    <comment_count>0</comment_count>
    <who name="steve faulkner">faulkner.steve</who>
    <bug_when>2014-06-19 19:27:30 +0000</bug_when>
    <thetext>The HTML spec[1] requires an img element with an empty alt (alt=&quot;&quot;) 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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>108123</commentid>
    <comment_count>1</comment_count>
    <who name="James Craig">jcraig</who>
    <bug_when>2014-06-20 16:12:34 +0000</bug_when>
    <thetext>You wrote:

&gt; webkit does (...map img[alt=&quot;&quot;] to [role=&quot;presentation&quot;])

Where are you seeing this? On brief glance, it looks as though WebKit doesn&apos;t actually map these images to the internal PresentationRole. These images just get ignored, so they don&apos;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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>108124</commentid>
    <comment_count>2</comment_count>
    <who name="James Craig">jcraig</who>
    <bug_when>2014-06-20 16:14:03 +0000</bug_when>
    <thetext>This bug seems like an implementation detail to me. The mapping could be either role=&quot;presentation&quot;, or hidden/ignored, or potentially whatever Firefox is doing.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>108125</commentid>
    <comment_count>3</comment_count>
    <who name="James Craig">jcraig</who>
    <bug_when>2014-06-20 16:14:53 +0000</bug_when>
    <thetext>s/none-presentational/non-presentational/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>108126</commentid>
    <comment_count>4</comment_count>
    <who name="steve faulkner">faulkner.steve</who>
    <bug_when>2014-06-20 16:29:55 +0000</bug_when>
    <thetext>(In reply to James Craig from comment #1)
&gt; You wrote:
&gt; 
&gt; &gt; webkit does (...map img[alt=&quot;&quot;] to [role=&quot;presentation&quot;])
&gt; 
&gt; Where are you seeing this? On brief glance, it looks as though WebKit
&gt; doesn&apos;t actually map these images to the internal PresentationRole. These
&gt; images just get ignored, so they don&apos;t have an accessible render object. We
&gt; only expose the presentation role if the presentation node has
&gt; none-presentational children.
&gt; 
&gt; https://github.com/WebKit/webkit/blob/master/LayoutTests/inspector-protocol/
&gt; dom/getAccessibilityPropertiesForNode-expected.txt#L171

I am probably incorrect


&gt;These images just get ignored, so they don&apos;t have an accessible render object.&quot; this equates to what (I think) it should do looking at the aria mapping guide it says for Mac role=presentation equates to &quot;Not mapped&quot;

The HTML spec uses ARIA roles states and properties as an abstract indicator when it says img alt=&quot;&quot; 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/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>108130</commentid>
    <comment_count>5</comment_count>
    <who name="James Craig">jcraig</who>
    <bug_when>2014-06-20 17:21:52 +0000</bug_when>
    <thetext>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&apos;s an implementation detail of how to do that. Perhaps you need an &quot;ignored&quot; boolean column or need to put the role as &quot;img (ignored)&quot;

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&apos;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&apos;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 &quot;img&quot; b/c it&apos;s still an image. The &quot;ignored&quot; flag is the important piece of the puzzle here.

WebKit&apos;s internal accessibility model, not the platform API.
&lt;img src=&quot;data:image/gif...&quot; alt=&quot;&quot;&gt;
    exists: true
    label: 
    role: img
    ignored: true</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>108131</commentid>
    <comment_count>6</comment_count>
    <who name="James Craig">jcraig</who>
    <bug_when>2014-06-20 17:31:23 +0000</bug_when>
    <thetext>(In reply to James Craig from comment #1)
&gt; These images just get ignored, so they don&apos;t have an accessible render object.

This isn&apos;t entirely accurate, but the key piece is that it&apos;s marked as ignored in the user agent&apos;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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>108132</commentid>
    <comment_count>7</comment_count>
    <who name="steve faulkner">faulkner.steve</who>
    <bug_when>2014-06-20 19:02:45 +0000</bug_when>
    <thetext>(In reply to James Craig from comment #6)
&gt; (In reply to James Craig from comment #1)
&gt; &gt; These images just get ignored, so they don&apos;t have an accessible render object.
&gt; 
&gt; This isn&apos;t entirely accurate, but the key piece is that it&apos;s marked as
&gt; ignored in the user agent&apos;s accessibility model, and not exposed to the
&gt; platform accessibility API (WebKit). It would also be fine to expose it to
&gt; the platform as ignored (Mozilla), but that is a platform-specific
&gt; implementation detail.

so how about we change the mapping to &apos;no role&apos;, must be marked as ignored or omitted from the acc tree?

note: no role= &quot;the user agent has no default mapping to ARIA roles. (However, it could have its own mappings to the accessibility layer.) &quot;
http://www.w3.org/html/wg/drafts/html/master/dom.html#concept-role-none</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>108289</commentid>
    <comment_count>8</comment_count>
    <who name="alexander surkov">surkov.alexander</who>
    <bug_when>2014-06-24 16:37:09 +0000</bug_when>
    <thetext>no role sounds good with me, you might want to have &quot;closest match&quot; that doesn&apos;t entails any implementation specifics.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>112368</commentid>
    <comment_count>9</comment_count>
    <who name="steve faulkner">faulkner.steve</who>
    <bug_when>2014-09-29 09:18:29 +0000</bug_when>
    <thetext>I have updated definition:

 &lt;td&gt;&lt;span data-x=&quot;concept-role-none&quot;&gt;No role&lt;/span&gt;. User Agents must identify the &lt;code&gt;img&lt;/code&gt; as ignored or omit it from the accessibility tree.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>120692</commentid>
    <comment_count>10</comment_count>
    <who name="steve faulkner">faulkner.steve</who>
    <bug_when>2015-06-04 10:33:46 +0000</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 28751 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>