Skip to content

Commit

Permalink
Resolves #700 and resolves #1052 with the following changes.
Browse files Browse the repository at this point in the history
Removes "selectable" from the definition of option to support cases where either an item is checkable instead of selectable or an item is neither selectable nor checkable (i.e., similar to disabled). The definition of option is then:

>An item in a listbox.

Replaces the statement:

>Elements with the role option have an implicit aria-selected value of false.

with a list of conditions that must be met before a user agent can provide an implicit value for aria-selected. This enables authors to:
1. Use aria-checked instead of aria-selected in any listbox.
2. Indicate that an option is not selectable or checkable by omitting the declaration of checked or selected in a listbox where either checked or selected is explicitly declared on some of the options.

Adds authoring guidance that:
1. Weakly suggests use of checked instead of selected in multi-selects.
2. Strongly discourages use of both checked and selected in the same listbox.

In the characteristics table for option:
1. Removes aria-selected from required properties and adds to supported properties.
2. Removes the implicit value for aria-selected.
  • Loading branch information
mcking65 committed Dec 10, 2020
1 parent 65592c8 commit 488e3d4
Showing 1 changed file with 22 additions and 8 deletions.
30 changes: 22 additions & 8 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5991,9 +5991,26 @@ <h5>Note regarding the ARIA 1.1 <code>none</code> role.</h5>
<div class="role" id="option">
<rdef>option</rdef>
<div class="role-description">
<p>A selectable item in a <rref>listbox</rref>.</p>
<p>An item in a <rref>listbox</rref>.</p>
<p>Authors MUST ensure <a>elements</a> with <a>role</a> <code>option</code> are contained in, or <a>owned</a> by, an element with the <a>role</a> <rref>listbox</rref> or <rref>group</rref> within a <code>listbox</code>. Options not associated with a <rref>listbox</rref> might not be correctly mapped to an <a>accessibility <abbr title="Application Programing Interfaces">API</abbr></a>.</p>
<p>Elements with the role <code>option</code> have an implicit <sref>aria-selected</sref> value of <code>false</code>.</p>
<p>User agents MAY provide an implicit value of <sref>aria-selected</sref> for each <rref>option</rref> in a <rref>listbox</rref> if the following conditions are met, but user agents MUST NOT provide an implicit value of <sref>aria-selected</sref> if any of the following conditions are not met:</p>
<ul>
<li>The value of <pref>aria-multiselectable</pref> on the <rref>listbox</rref> is <code>false</code> or <code>undefined</code>.</li>
<li>None of the <rref>option</rref> elements in the <rref>listbox</rref> have an explicitly declared value for <sref>aria-selected</sref> or <sref>aria-checked</sref>.</li>
</ul>
<p>
If a user agent provides an implicit <sref>aria-selected</sref> value for an <rref>option</rref>, the value SHOULD be <code>true</code> if the <rref>option</rref> has DOM focus or the <ref>listbox</ref> has DOM focus and the option is referenced by <pref>aria-activedescendant</pref>.
Otherwise, if a user agent provides an implicit <sref>aria-selected</sref> value for an <rref>option</rref>, the value SHOULD be <code>false</code>.
</p>
<p>
The <rref>option</rref> role supports both <sref>aria-selected</sref> and <sref>aria-checked</sref> because it is common for authors to use selection in single-select list boxes and check marks in multi-select list boxes.
However, authors SHOULD NOT specify both <sref>aria-selected</sref> and <sref>aria-checked</sref> on <rref>option</rref> elements contained by the same <rref>listbox</rref> except in the extremely rare circumstances where all the following conditions are met:
</p>
<ul>
<li>The meaning and purpose of <sref>aria-selected</sref> is different from the meaning and purpose of <sref>aria-checked</sref> in the user interface.</li>
<li>The user interface makes the mening and purpose of each state apparent.</li>
<li>The user interface provides a separate method for controling each state.</li>
</ul>
</div>
<table class="role-features">
<caption>Characteristics:</caption>
Expand Down Expand Up @@ -6041,18 +6058,15 @@ <h5>Note regarding the ARIA 1.1 <code>none</code> role.</h5>
</tr>
<tr>
<th class="role-required-properties-head">Required States and Properties:</th>
<td class="role-required-properties">
<ul>
<li><sref>aria-selected</sref></li>
</ul>
</td>
<td class="role-required-properties"></td>
</tr>
<tr>
<th class="role-properties-head" scope="row">Supported States and Properties:</th>
<td class="role-properties">
<ul>
<li><sref>aria-checked</sref></li>
<li><pref>aria-posinset</pref></li>
<li><sref>aria-selected</sref></li>
<li><pref>aria-setsize</pref></li>
</ul>
</td>
Expand Down Expand Up @@ -6088,7 +6102,7 @@ <h5>Note regarding the ARIA 1.1 <code>none</code> role.</h5>
</tr>
<tr>
<th class="implicit-values-head" scope="row">Implicit Value for Role:</th>
<td class="implicit-values">Default for <sref>aria-selected</sref> is <code class="default">false</code>.</td>
<td class="implicit-values"></td>
</tr>
</tbody>
</table>
Expand Down

0 comments on commit 488e3d4

Please sign in to comment.