Skip to content

Commit

Permalink
Allow aria-valuetext for use with combobox role
Browse files Browse the repository at this point in the history
closes #2382
and is related to #2344 / #2369 

This PR adds aria-valuetext as a supported property for the combobox role.

the `aria-valuetext` definition is slightly updated to indicate that the attribute can be used on other supported roles.  I'm not sure if we want to do any further updates to that section in this PR - or if that really should be handled in a larger PR to resolve #711
  • Loading branch information
scottaohara authored Jan 29, 2025
1 parent a2d34fe commit ca98d5f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2074,6 +2074,7 @@ <h2>Definition of Roles</h2>
The value of a <code>combobox</code> is represented by one of the following:
</p>
<ul>
<li>If the <code>aria-valuetext</code> attribute is specified on the element with the <code>combobox</code> role, the value of the attribute is the value of the <code>combobox</code> element.</li>
<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>
Expand Down Expand Up @@ -2148,14 +2149,15 @@ <h2>Definition of Roles</h2>
<th class="role-properties-head" scope="row">Supported States and Properties:</th>
<td class="role-properties">
<ul>
<li><pref>aria-activedescendant</pref></li>
<li><pref>aria-activedescendant</pref></li>
<li><pref>aria-autocomplete</pref></li>
<li><pref>aria-controls</pref></li>
<li><pref>aria-errormessage</pref></li>
<li><pref>aria-haspopup</pref></li>
<li><sref>aria-invalid</sref></li>
<li><pref>aria-readonly</pref></li>
<li><pref>aria-required</pref></li>
<li><pref>aria-valuetext</pref></li>
</ul>
</td>
</tr>
Expand Down Expand Up @@ -13300,7 +13302,7 @@ <h2>Definitions of States and Properties (all aria-* attributes)</h2>
<div class="property" id="aria-valuetext">
<pdef>aria-valuetext</pdef>
<div class="property-description">
<p><a>Defines</a> the human readable text alternative of <pref>aria-valuenow</pref> for a range <a>widget</a>.</p>
<p><a>Defines</a> the human readable text alternative of <pref>aria-valuenow</pref> for a range <a>widget</a>, or other widget roles which support the attribute.</p>
<p>This property is used, for example, on a range widget such as a slider or progress bar.</p>
<p>If the <pref>aria-valuetext</pref> attribute is set, authors SHOULD also set the <pref>aria-valuenow</pref> attribute, unless that value is unknown (for example, on an indeterminate <rref>progressbar</rref>).</p>
<p>Authors SHOULD only set the <pref>aria-valuetext</pref> attribute when the rendered value cannot be meaningfully represented as a number. For example, a slider might have rendered values of <code>small</code>, <code>medium</code>, and <code>large</code>. In this case, the values of <pref>aria-valuenow</pref> could range from 1 through 3, which indicate the position of each value in the value space, but the <pref>aria-valuetext</pref> would be one of the strings: <code>small</code>, <code>medium</code>, or <code>large</code>. If the <pref>aria-valuetext</pref> attribute is absent, the <a>assistive technologies</a> will rely solely on the <pref>aria-valuenow</pref> attribute for the current value.</p>
Expand Down

0 comments on commit ca98d5f

Please sign in to comment.