Skip to content

Commit

Permalink
Clarify and consolidate img ARIA allowances
Browse files Browse the repository at this point in the history
This PR closes #424 and #452

Description of changes to come....
  • Loading branch information
scottaohara authored Mar 16, 2023
1 parent d4ff854 commit ef9ea40
Showing 1 changed file with 25 additions and 25 deletions.
50 changes: 25 additions & 25 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1527,7 +1527,10 @@ <h2 id="docconformance">
</tr>
<tr>
<th id="el-img" tabindex="-1">
[^img^] with [^img/alt^]`="some text"`
<div class="correction proposed">
[^img^] with an accessible name. E.g., [^img/alt^]`="some text"` or as provided by other
<a data-cite="html-aam-1.0#img-element-accessible-name-computation">`img` naming methods</a>
</div>
</th>
<td>
<code>role=<a href="#index-aria-img">img</a></code>
Expand Down Expand Up @@ -1564,42 +1567,39 @@ <h2 id="docconformance">
</td>
</tr>
<tr>
<th id="el-img-empty-alt" tabindex="-1">
[^img^] with [^img/alt^]`=""`
<th id="el-img-no-name" tabindex="-1">
[^img^] with no accessible name.
</th>
<td>
<code>role=<a href="#index-aria-presentation">presentation</a></code>
</td>
<td>
<p>
<a><strong class="nosupport">No `role`</strong></a> other than <code><a href="#index-aria-presentation">presentation</a></code>, which is NOT RECOMMENDED
</p>
<p>
<strong>No `aria-*` attributes</strong>
except <a data-cite="wai-aria-1.1#aria-hidden">`aria-hidden="true"`</a>.
</p>
</td>
</tr>
<tr>
<th id="el-img-no-alt" tabindex="-1">
[^img^] <a data-cite="html/images.html#unknown-images">without an `alt` attribute</a>
</th>
<td>
<code>role=<a href="#index-aria-img">img</a></code>
<div class="proposed correction">
<p id="el-img-empty-alt">
If the `img` has an empty `alt` ([^img/alt^]`=""`) and lacks any other
<a data-cite="html-aam-1.0#img-element-accessible-name-computation">`img` naming methods</a>:<br>
<code>role=<a href="#index-aria-none">none</a></code>,
<code>role=<a href="#index-aria-presentation">presentation</a></code>
</p>
<p id="el-img-no-alt" tabindex="-1">
If the `img` <a data-cite="html/images.html#unknown-images">lacks an `alt` attribute</a> and lacks any other
<a data-cite="html-aam-1.0#img-element-accessible-name-computation">`img` naming methods</a>:<br>
<code>role=<a href="#index-aria-img">img</a></code>
</p>
</div>
</td>
<td>
<p>
If no <a data-cite="accname-1.2/#dfn-accessible-name">accessible name</a> is provided via other
<a data-cite="html-aam-1.0#img-element-accessible-name-computation">`img` naming methods</a> (e.g., `aria-labelledby`, `aria-label`):
<a><strong class="nosupport">No `role`</strong></a> other than <code><a href="#index-aria-img">img</a></code>, which is NOT RECOMMENDED.
<a><strong class="nosupport">No `role`</strong></a> other the roles
<code>role=<a href="#index-aria-img">img</a></code>,
<code>role=<a href="#index-aria-none">none</a></code> or
<code><a href="#index-aria-presentation">presentation</a></code>, which are NOT RECOMMENDED.
</p>
<p>
<strong>No `aria-*` attributes</strong>
except <a data-cite="wai-aria-1.1#aria-hidden">`aria-hidden="true"`</a>.
</p>

<p>
Otherwise, if the `img` has an author defined accessible name,
see <a href="#el-img">`img` with `alt="some text"`</a>.
see <a href="#el-img">`img` with an accessible name</a>.
</p>
</td>
</tr>
Expand Down

0 comments on commit ef9ea40

Please sign in to comment.