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

update / expand input value mappings #396

Open
wants to merge 3 commits into
base: gh-pages
Choose a base branch
from
Open
Changes from all 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
155 changes: 113 additions & 42 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1422,7 +1422,7 @@ <h3>HTML Element Role Mappings</h3>
<!-- <td class="naming"></td> -->
<td class="comments">
<div class="general">
If implemented as a color picker, any UI controls presented for selecting a color are exposed in the <a class="termref">accessibility tree</a>, associated with the `input` element, and mapped as appropriate for the type of control (e.g. button or slider).
If implemented as a color picker, any UI controls presented for selecting a color are exposed in the <a class="termref">accessibility tree</a>, associated with the `input` element, and mapped as appropriate for the type of control (e.g., button or slider).
</div>
</td>
</tr>
Expand Down Expand Up @@ -2825,7 +2825,7 @@ <h3>HTML Element Role Mappings</h3>
<td class="comments">
<div class="general">
<b>Note:</b> There are instances where CSS properties can affect what is exposed by accessibility APIs.
For instance, `display: none` or `visibility: hidden` will remove an element from the accessibility tree
For instance, `display: none` or `visibility: hidden` will remove an element from the <a class="termref">accessibility tree</a>
and hide its presence from assistive technologies.
</div>
</td>
Expand Down Expand Up @@ -4370,7 +4370,7 @@ <h3>HTML Attribute State and Property Mappings</h3>
</td>
<td class="ax">`AXTitle`: `&lt;value&gt;`</td>
<td class="comments">
See Also: <a href="" class="accname">Accessible Name and Description: Computation and API Mappings 1.1</a>
See Also: <a href="" class="accname">Accessible Name and Description: Computation and API Mappings 1.2</a>
</td>
</tr>
<tr tabindex="-1" id="att-lang">
Expand Down Expand Up @@ -5402,8 +5402,8 @@ <h3>HTML Attribute State and Property Mappings</h3>
</td>
<td class="aria">
<div class="general">
Either the <a data-cite="accname-1.2/#dfn-accessible-name">accessible name</a>, or the
<a data-cite="accname-1.2/#dfn-accessible-description">accessible description</a>, or Not mapped (see Comments).
Either contributes to the <a data-cite="accname-1.2/#dfn-accessible-name">accessible name</a>, the
<a data-cite="accname-1.2/#dfn-accessible-description">accessible description</a>, or is not mapped (see comments).
scottaohara marked this conversation as resolved.
Show resolved Hide resolved
Comment on lines +5405 to +5406
Copy link
Collaborator

Choose a reason for hiding this comment

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

Editorial: I think this is phrased ambiguously:

Intention: "either it's:

  • mapped (to name or description) or
  • not mapped."

As phrased with the 3-part serial comma: "either it's mapped to:

  • name,
  • description, or
  • not mapped" (seems like ~"mapped to not mapped")

Copy link
Collaborator

@cookiecrook cookiecrook Apr 27, 2022

Choose a reason for hiding this comment

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

Substantive: I think there are scenarios where implementations may still wish to map it even if it's not used by name or description. Leaving that follow-on mapping optional before the final "is not mapped."

For example, I think once aria-description is implemented, browsers would still want to expose the title here as AXHelp in AX API.

<button aria-label="foo" aria-description="bar" title="bop">bif</button>

</div>
</td>
<td class="ia2">
Expand Down Expand Up @@ -5684,31 +5684,118 @@ <h3>HTML Attribute State and Property Mappings</h3>
<td class="ax"><div class="general">Not mapped</div></td>
<td class="comments"></td>
</tr>
<tr tabindex="-1" id="att-value-input-buttons">
<th>`value`</th>
<td class="elements">
<a data-cite="html/input.html#attr-input-value">`input`</a>
<a data-cite="html/input.html#button-state-(type=button)">`type=button`</a>;
<a data-cite="html/input.html#reset-button-state-(type=reset)">`type=reset`</a>;
<a data-cite="html/input.html#submit-button-state-(type=submit)">`type=submit`</a>
</td>
<td class="aria">
Contributes to the <a data-cite="accname-1.2/#dfn-accessible-name">accessible name</a> of the `input`
</td>
<td class="ia2">See comments</td>
<td class="uia">See comments</td>
<td class="atk">See comments</td>
<td class="ax">See comments</td>
<td class="comments">
If specified, the value of the attribute will contribute to the
<a href="#input-type-button-input-type-submit-and-input-type-reset-accessible-name-computation">accessible name computations</a> for these button-type `input` elements and render as the button's text label.
</td>
</tr>
<tr tabindex="-1" id="att-value-input-checkbox-hidden-radio">
<th>`value`</th>
<td class="elements">
<a data-cite="html/input.html#attr-input-value">`input`</a>
<a data-cite="html/input.html#checkbox-state-(type=checkbox)">`type=checkbox`</a>;
<a data-cite="html/input.html#hidden-state-(type=hidden)">`type=hidden`</a>;
<a data-cite="html/input.html#radio-state-(type=radio)">`type=radio`</a>
</td>
<td class="aria"><div class="general">Not mapped</div></td>
<td class="ia2"><div class="general">Not mapped</div></td>
<td class="uia"><div class="general">Not mapped</div></td>
<td class="atk"><div class="general">Not mapped</div></td>
<td class="ax"><div class="general">Not mapped</div></td>
<td class="comments"></td>
</tr>
<tr tabindex="-1" id="att-value-input-color">
<th>`value`</th>
<td class="elements">
<a data-cite="html/input.html#attr-input-value">`input`</a>
<a data-cite="html/input.html#color-state-(type=color)">`type=color`</a>
</td>
<td class="aria">
<a class="core-mapping" href="#ariaValueNow">`aria-valuenow`</a> &amp;
<a class="core-mapping" href="#ariaValueText">`aria-valuetext`</a>
</td>
<td class="ia2">Use WAI-ARIA mapping</td>
<td class="uia">Use WAI-ARIA mapping</td>
<td class="atk">Use WAI-ARIA mapping</td>
<td class="ax">Use WAI-ARIA mapping</td>
<td class="comments">
<p>
If specified, expose the value of the attribute as the initial value of the `input`. User Agents MUST expose the modified value of the input to the <a class="termref">accessibility tree</a>. User Agents MAY expose the initial or modified value as a human readable text alternative. E.g., `#ff0000` as a localized text alternative of "Red".
Copy link
Contributor

Choose a reason for hiding this comment

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

Do these user agents MUSTs apply to the other inputs as well?

Copy link
Contributor

Choose a reason for hiding this comment

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

After discussing, I think we agreed that "If specified, expose the value of the attribute as the initial value of the input. User Agents MUST expose the modified value of the input to the accessibility tree." belongs in it's own section about all inputs that have attributes (like value or checked) who's default value is set by the content attribute. See the spec: https://html.spec.whatwg.org/multipage/input.html#attr-input-value

This can happen here or in a follow up.

</p>
<p>
If the `value` attribute is not specified, has no specified value, or if the specified value is invalid, the initial value of the `input` is `#000000` with a localized text alternative of "Black".
</p>
</td>
</tr>
<tr tabindex="-1" id="att-value-input">
<th>`value`</th>
<td class="elements">
<a data-cite="html/input.html#attr-input-value">`input`</a>;
<a data-cite="html/input.html#date-state-(type=date)">`type=date`</a>;
<a data-cite="html/input.html#datetime-local-state-(type=datetime-local)">`type=datetime-local`</a>;
<a data-cite="html/input.html#email-state-(type=email)">`type=email`</a>;
<a data-cite="html/input.html#month-state-(type=month)">`type=month`</a>;
<a data-cite="html/input.html#number-state-(type=number)">`type=number`</a>;
<a data-cite="html/input.html#password-state-(type=password)">`type=password`</a>;
<a data-cite="html/input.html#search-state-(type=search)">`type=search`</a>;
<a data-cite="html/input.html#tel-state-(type=tel)">`type=tel`</a>;
<a data-cite="html/input.html#text-state-(type=text)">`type=text`</a>;
<a data-cite="html/input.html#url-state-(type=url)">`type=url`</a>;
<a data-cite="html/input.html#week-state-(type=week)">`type=week`</a>;
</td>
<td class="aria">Not mapped</td>
<td class="ia2">See comments</td>
<td class="uia">See comments</td>
<td class="atk">See comments</td>
<td class="ax">See comments</td>
<td class="comments">
If specified, expose the value of the attribute as the initial value entry of the `input` element.
Copy link
Contributor

Choose a reason for hiding this comment

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

Specifically, what is the "value entry of the input element"?

Do we have the following specified somewhere: if, in one of these inputs, a user has entered text, how that text surfaced in the different accessibility APIs? If so we should link to it if not we should add it?

Copy link
Contributor

Choose a reason for hiding this comment

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

As we discussed, let's use the same language here as in the HTML spec: https://html.spec.whatwg.org/multipage/input.html#attr-input-value

which I think would be (but check my work):

If specified, expose the content value attribute as the default value entry of the `input` element.

Copy link
Contributor

Choose a reason for hiding this comment

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

Can we not say what these mappings are though? Do we know how the accessibility API for the different platforms surface the value of a input [type="email"] etc? Like AXValue for Mac?

</td>
</tr>
<tr tabindex="-1" id="att-value-input-image">
<th>`value`</th>
<td class="elements">
<a data-cite="html/input.html#attr-input-value">`input`</a>
<a data-cite="html/input.html#image-button-state-(type=image)">`type=image`</a>
</td>
<td class="aria">Not mapped</td> <!-- related: https://github.com/w3c/aria/issues/711 -->
<td class="ia2">
<div class="name">
Associates the accessible value for entry type input elements
and <a data-cite="accname-1.2/#dfn-accessible-name">accessible name</a> for button type input elements
</div>
<td class="aria">
Contributes to the <a data-cite="accname-1.2/#dfn-accessible-name">accessible name</a> of the `input`
</td>
<td class="uia">
<div class="name">
Associates the accessible value for entry type input elements
and <a data-cite="accname-1.2/#dfn-accessible-name">accessible name</a> for button type input elements
</div>
<td class="ia2">See comments</td>
<td class="uia">See comments</td>
<td class="atk">See comments</td>
<td class="ax">See comments</td>
<td class="comments">
If specified, and the `input type=image` element has no `alt` attribute specified, then the value of the attribute will contribute to the
<a href="#input-type-button-input-type-submit-and-input-type-reset-accessible-name-computation">accessible name computations</a>, and will render as text if the image source is broken. Otherwise, the attribute is ignored.
</td>
<td class="atk">
<div class="name">
Associates the accessible value for entry type input elements
and <a data-cite="accname-1.2/#dfn-accessible-name">accessible name</a> for button type input elements
</div>
</tr>
<tr tabindex="-1" id="att-value-input-range">
<th>`value`</th>
<td class="elements">
<a data-cite="html/input.html#attr-input-value">`input`</a>
<a data-cite="html/input.html#range-state-(type=range)">`type=range`</a>
</td>
<td class="ax">`AXValue: &lt;value&gt;`</td>
<td class="aria"><a class="core-mapping" href="#ariaValueNow">`aria-valuenow`</a></td>
<td class="ia2">Use WAI-ARIA mapping</td>
<td class="uia">Use WAI-ARIA mapping</td>
<td class="atk">Use WAI-ARIA mapping</td>
<td class="ax">Use WAI-ARIA mapping</td>
<td class="comments"></td>
</tr>
<tr tabindex="-1" id="att-value-li">
Expand Down Expand Up @@ -5754,26 +5841,10 @@ <h3>HTML Attribute State and Property Mappings</h3>
<a data-cite="html/form-elements.html#attr-progress-value">`progress`</a>
</td>
<td class="aria"><a class="core-mapping" href="#ariaValueNow">`aria-valuenow`</a></td>
<td class="ia2">
<div class="general">
Exposed as `IAccessibleValue::currentValue`
</div>
</td>
<td class="uia">
<div class="general">
Exposed as `Value.Value`
</div>
</td>
<td class="atk">
<div class="general">
Exposed as `atk_value_get_current_value`
</div>
</td>
<td class="ax">
<div class="general">
`AXValue: &lt;value&gt;`
</div>
</td>
<td class="ia2">Use WAI-ARIA mapping</td>
<td class="uia">Use WAI-ARIA mapping</td>
<td class="atk">Use WAI-ARIA mapping</td>
<td class="ax">Use WAI-ARIA mapping</td>
<td class="comments"></td>
</tr>
<!-- param is obsolete
Expand Down