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

Require user agents to expose a value for combobox elements #1225

Merged
merged 5 commits into from
Apr 22, 2020
Merged
Changes from 3 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
9 changes: 7 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2114,7 +2114,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 @@ -2127,11 +2127,16 @@ <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 compute a value for elements with role <code>combobox</code> and expose the value to <a>assistive technologies</a>.
If the <code>combobox</code> element is also 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.
Otherwise, the value of the <code>combobox</code> is computed from descendant elements of the <code>combobox</code> using the same algorithm that is used to compute the name of a <rref>button</rref> from its descendant content.
cookiecrook marked this conversation as resolved.
Show resolved Hide resolved
</p>
<pre class="example highlight">
&lt;label for="tag_combo">Tag&lt;/label>
Expand Down