Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clarify img mappings #451

Closed
wants to merge 12 commits into from
30 changes: 24 additions & 6 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2964,12 +2964,23 @@ <h4 id=el-img>`img`</h4>
<tr>
<th>[[wai-aria-1.2]]</th>
<td>
<a class="core-mapping" href="#role-map-image">`image`</a>
or <a class="core-mapping" href="#role-map-img">`img`</a>role
<div>
If element has a non-empty `src` or `srcset` attribute, an <a data-cite="accname-1.2/#dfn-accessible-name">accessible name</a>, or both,
scottaohara marked this conversation as resolved.
Show resolved Hide resolved
then map to the <a class="core-mapping" href="#role-map-image">`image`</a>
or <a class="core-mapping" href="#role-map-img">`img`</a> role.
</div>
<div>
Otherwise, if the element has no `src` or `srcset` attribute, or if the attribute(s) are set to the empty string, and the `img` has
no `alt` attribute or accessible name, then map to the <a class="core-mapping" href="#role-map-none">`none`</a>
or <a class="core-mapping" href="#role-map-presentation">`presentation`</a> role.
</div>
</td>
</tr>
<tr>
<th><a href="https://msdn.microsoft.com/en-us/library/dd373608%28v=VS.85%29.aspx">MSAA</a> + <a href="http://accessibility.linuxfoundation.org/a11yspecs/ia2/docs/html/">IAccessible2</a></th>
<th>
<a href="https://msdn.microsoft.com/en-us/library/dd373608%28v=VS.85%29.aspx">MSAA</a> +
<a href="http://accessibility.linuxfoundation.org/a11yspecs/ia2/docs/html/">IAccessible2</a>
</th>
<td>
<div class="general">Use WAI-ARIA mapping</div>
</td>
Expand All @@ -2996,6 +3007,8 @@ <h4 id=el-img>`img`</h4>
<tr>
<th>Comments</th>
<td>
<p>An `img` with a valid `src`, `srcset`, or both and no `alt` attribute or <a data-cite="accname-1.2/#dfn-accessible-name">accessible name</a> will still map to
scottaohara marked this conversation as resolved.
Show resolved Hide resolved
scottaohara marked this conversation as resolved.
Show resolved Hide resolved
the `image` role, unless another role has been explicitly provided by an author.</p>
<p class="note">
ARIA 1.3 adds the `image` role as the preferred synonym to the ARIA 1.0 `img` role.
The expected computed role for named `img` elements is now "image".
Expand All @@ -3004,15 +3017,17 @@ <h4 id=el-img>`img`</h4>
</tr>
</tbody>
</table>
<h4 id=el-img-empty-alt>`img` <span class="el-context">(`alt`attribute value is an empty string, i.e. `alt=""` or `alt` with no value in the markup)</span></h4>
<h4 id=el-img-empty-alt>`img` <span class="el-context">(<a data-cite="html/embedded-content.html#attr-img-alt">`alt`</a>
attribute value is an empty string)</span>
</h4>
<table aria-labelledby=el-img-empty-alt>
<tbody>
<tr>
<th>HTML Specification</th>
<td>
<a data-cite="html">`img`</a>
<span class="el-context">(<a data-cite="html/embedded-content.html#attr-img-alt">`alt`</a>
attribute value is an empty string, i.e. `alt=""` or `alt` with no value in the markup)</span>
attribute value is an empty string.)</span>
</td>
</tr>
<tr>
Expand Down Expand Up @@ -3051,7 +3066,10 @@ <h4 id=el-img-empty-alt>`img` <span class="el-context">(`alt`attribute value is
<!-- <th><a href="#accessible-name-and-description-computation">Naming Algorithm</a></th> -->
<tr>
<th>Comments</th>
<td>
<td class="comments">
<p>Authors can specify the `alt` attribute to be the empty string by either marking it up as `alt=""` or `alt` with no value.</p>
<p>If an `img` has been provided an `alt=""`, but also has an `aria-label` or `aria-labelledby` attribute specified which returns an
scottaohara marked this conversation as resolved.
Show resolved Hide resolved
accessible name, then the element maps to the `img` role.</p>
</td>
</tr>
</tbody>
Expand Down
Loading