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

[html-aam PR 451] clarify img mappings #2221

Open
wants to merge 19 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 22 additions & 7 deletions html-aam/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3016,8 +3016,14 @@ <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, then map to the
<a class="core-mapping" href="#role-map-image">`img`</a> or <a class="core-mapping" href="#role-map-img">`image`</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>
Expand All @@ -3026,7 +3032,8 @@ <h4 id="el-img">`img`</h4>
</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>
<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>
Expand Down Expand Up @@ -3054,6 +3061,10 @@ <h4 id="el-img">`img`</h4>
<tr>
<th>Comments</th>
<td>
<p>
An `img` with a non-empty `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 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".</p>
</td>
</tr>
Expand All @@ -3066,9 +3077,7 @@ <h4 id="el-img-empty-alt">`img` <span class="el-context">(`alt` attribute value
<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 the empty string, i.e., `alt=""` or `alt` with no value in the markup)</span
>
<span class="el-context">(<a data-cite="html/embedded-content.html#attr-img-alt">`alt`</a> attribute value is the empty string.)</span>
</td>
</tr>
<tr>
Expand Down Expand Up @@ -3113,7 +3122,13 @@ <h4 id="el-img-empty-alt">`img` <span class="el-context">(`alt` attribute value
<!-- <th><a href="#accessible-name-and-description-computation">Naming Algorithm</a></th> -->
<tr>
<th>Comments</th>
<td></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 accessible name, then the element maps to the
`image` role.
</p>
</td>
</tr>
</tbody>
</table>
Expand Down
Loading