Repository navigation
update / expand input value mappings - #396
scottaohara wants to merge 3 commits into
Conversation
This PR closes #314 and clarifies the `value` attribute mappings for other input types. note: the `value` attribute only represents *the initial value* for the input elements that expose the attribute's value. If a user updates a form control the `value` attribute's value does not mutate to reflect the updated entry. The updates I provided for these inputs attempts to specifically call this out. if this is not clear, please suggest alternate wording. Note that the `input type=color` `value` is far more complex than the other inputs and I would appreciate specific feedback on what would need to be updated here, if anything. Additionally, the `input type=color` seems to make a strong case for allowing `aria-valuetext` on a `button` element – where the button should be named via a `label` or an `aria-label/labelledby`, but still needs to expose it's displayed value (subtree of the button element).
spectranaut
left a comment
There was a problem hiding this comment.
Still trying to catch up and get all the context for this change, i have a few questions to start!
| <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. |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 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". |
There was a problem hiding this comment.
Do these user agents MUSTs apply to the other inputs as well?
There was a problem hiding this comment.
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.
spectranaut
left a comment
There was a problem hiding this comment.
From our conversation!
| <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. |
There was a problem hiding this comment.
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.
| <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". |
There was a problem hiding this comment.
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.
| <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. |
There was a problem hiding this comment.
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?
| 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). |
There was a problem hiding this comment.
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")
There was a problem hiding this comment.
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>|
@scottaohara I tried to migrate this one but it is indeed complex; it looks like there are several changes that have already been made in spec (e.g., specifying reset, button for type) so parts of this PR may no longer be needed. The spec formatting has also changed since 2022 so I was unsure if you wanted to keep what we currently have in spec (e.g., input type=reset, type=submit as separate items) vs. this original PR where all of these would be contained in a single table. If it's OK, I'll leave this one to you to determine what actually needs to be migrated to the mono repo. |
this covers some editorial fixes that were originally part of w3c/html-aam#396 - but don't need to be.
replacement for w3c/html-aam#396 closes w3c/html-aam#314
|
migrated to w3c/aria#2373. closing this pr |
replacement for w3c/html-aam#396 closes w3c/html-aam#314
This PR closes #314 and clarifies the
valueattribute mappings for other input types.note: the
valueattribute only represents the initial value for the input elements that expose the attribute's value. If a user updates a form control thevalueattribute's value does not mutate to reflect the updated entry. The updates I provided for these inputs attempts to specifically call this out. if this is not clear, please suggest alternate wording.Note that the
input type=colorvalueis far more complex than the other inputs and I would appreciate specific feedback on what would need to be updated here, if anything.Additionally, the
input type=colorseems to make a strong case for allowingaria-valuetexton abuttonelement – where the button should be named via alabelor anaria-label/labelledby, but still needs to expose it's displayed value (subtree of the button element).NOTE: due to the still broken table/details/summary script with respec, to view the updated table in the preview, you can add this style via devtools:
or find the
.table-containerthat has thedisplay: noneon it, and turn that off.fun...
Preview | Diff