Skip to content

Commit

Permalink
Require user agents to expose a value for combobox elements (#1225)
Browse files Browse the repository at this point in the history
* Require user agents to compute a combobox value
* Specify how to compute value; strengthen wording that specifies the optional dropdown icon is not a descendant.
* Fix ambiguous antecedent called out by @cookiecrook
Co-Authored-By: Aaron Leventhal <aleventhal@users.noreply.github.com>
Co-authored-by: Carolyn MacLeod <Carolyn_MacLeod@ca.ibm.com>
  • Loading branch information
mcking65 authored and carmacleod committed May 7, 2020
1 parent db2c54b commit 7fc0548
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions index.html
Expand Up @@ -2113,7 +2113,7 @@ <h2>Definition of Roles</h2>
</p>
<p>
Typically, the initial state of a <code>combobox</code> is collapsed.
In the collapsed state, only the <code>combobox</code> element and an optional popup control <rref>button</rref> are visible.
In the collapsed state, only the <code>combobox</code> element and a separate, optional popup control <rref>button</rref> are visible.
A <code>combobox</code> is said to be expanded when both the <code>combobox</code> element showing its current value and its associated popup element are visible.
Authors MUST set <sref>aria-expanded</sref> to <code>true</code> on an element with role <code>combobox</code> when it is expanded and <code>false</code> when it is collapsed.
</p>
Expand All @@ -2126,12 +2126,20 @@ <h2>Definition of Roles</h2>
If the <code>combobox</code> popup element has a role other than <rref>listbox</rref>, authors MUST specify a value for <pref>aria-haspopup</pref> that corresponds to the role of its popup.
</p>
<p>
If the user interface includes an additional icon that allows the visibility of the popup to be controlled via pointer and touch events, authors SHOULD ensure that element has role <rref>button</rref> and that it is focusable but not included in the page <kbd>Tab</kbd> sequence.
If the user interface includes an additional icon that allows the visibility of the popup to be controlled via pointer and touch events, authors SHOULD ensure that element has role <rref>button</rref>, that it is focusable but not included in the page <kbd>Tab</kbd> sequence, and that it is not a descendant of the element with role <code>combobox</code>.
In addition, to be keyboard accessible, authors SHOULD provide keyboard mechanisms for moving focus between the <code>combobox</code> element and elements contained in the popup.
For example, one common convention is that <kbd>Down Arrow</kbd> moves focus from the input to the first focusable descendant of the popup element.
If the popup element supports <pref>aria-activedescendant</pref>, in lieu of moving focus, such keyboard mechanisms can control the value of <pref>aria-activedescendant</pref> on the <code>combobox</code> element.
When a descendant of the popup element is active, authors MAY set <pref>aria-activedescendant</pref> on the <code>combobox</code> to a value that refers to the active element within the popup while focus remains on the <code>combobox</code> element.
</p>
<p>
User agents MUST expose the value of elements with role <code>combobox</code> to <a>assistive technologies</a>.
The value of a <code>combobox</code> is represented by one of the following:
</p>
<ul>
<li>If the <code>combobox</code> element is a host language element that provides a value, such as an HTML <code>input</code> element, the value of the combobox is the value of that element.</li>
<li>Otherwise, the value of the <code>combobox</code> is represented by its descendant elements and can be determined using the same method used to compute the name of a <rref>button</rref> from its descendant content.</li>
</ul>
<pre class="example highlight">
&lt;label for="tag_combo">Tag&lt;/label>
&lt;input type="text" id="tag_combo"
Expand Down

0 comments on commit 7fc0548

Please sign in to comment.