Skip to content

Commit

Permalink
Specify how to compute value; strengthen wording that specifies the o…
Browse files Browse the repository at this point in the history
…ptional dropdown icon is not a descendant.
  • Loading branch information
mcking65 committed Apr 9, 2020
1 parent 88ca9d4 commit 3716672
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 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,16 +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 the <code>combobox</code>.
If the <code>combobox</code> element is also a host language element that provides a value, such as an HTML <code>input</code> element, user agents MUST set the value of the combobox to that value.
Otherwise, user agents must compute the value of the <code>combobox</code> from the descendant content of the <code>combobox</code> element.
User agents MUST compute a value for elements with role <code>combobox</code> and expose it 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.
</p>
<pre class="example highlight">
&lt;label for="tag_combo">Tag&lt;/label>
Expand Down

1 comment on commit 3716672

@aleventhal
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm working on landing this in Canary so that we can play with it. Maybe we should wait to see if any issues come up. I can get it in pretty quickly.

Please sign in to comment.