-
Notifications
You must be signed in to change notification settings - Fork 27
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
clarify output element naming #402
Conversation
closes @225 - Adds that the `label` element can name the output element - Removes the step saying that `output` can get its name from its subtree. This was incorrect, the name and content of the `output` need to be treated differently, as the name should not overwrite the subtree. This aligns the element with the `status` role definition in the ARIA spec, where name is provided by author alone. Question: is it worth adding a note or some normative text to call out that the name and subtree must be announced as part of a live region event?
match inputs
will do these in another quick edit
Adds into to output element mapping to align with other elements, such as fieldset, to indicate a labeling relationship.
This PR clarifies some of the wording in the `label` element mappings where, for instance, UIA was written in a way that was specifically calling out labelling the `input` element - but there are a number of labelable elements that are not `input`. Rather than say all of them or even say 'form controls' which is also not necessarily accurate, instead mention and link to the HTML spec's definition and listing of labelable elements. The `label[for]` attribute was updated to consistently indicate that it's used for accname by all the platforms. UIA's 'not mapped' text was replaced with a version of the text that existed in the `label` element's UIA mapping. MSAA/IA2 mappings were updated to reference the labelable element section from HTML. note: this work was done as I noticed these things needed clarifying while making other additions to #402 today.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approve with attached change suggestion.
index.html
Outdated
</td> | ||
<td class="ax"> | ||
<div class="general">Use WAI-ARIA mapping</div> | ||
<td class="ax">`AXDescription: value from associated `label` element subtree.</td> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For future reference, pretty much all instances to AXTitle
or AXDescription
should be replaced with AXLabel
. There was a legacy distinction in the original Mac OS X Accessibility Protocol that was later simplified.
<td class="ax">`AXDescription: value from associated `label` element subtree.</td> | |
<td class="ax">`AXLabel: value from associated `label` element subtree.</td> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It also may be worth considering whether to list these using a more common developer reference, like accessibilityLabel
. If @aleventhal or other non-Apple implementors have a preference, please advise. Thanks.
https://developer.apple.com/documentation/objectivec/nsobject/1615181-accessibilitylabel
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unless you object, @cookiecrook, I'm going to leave this as is since there's a larger find and replace issue I filed to fix this more broadly (#450).
That way, if this is instead changed to accessibilityLabel
, then this instance doesn't need to be changed again.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sort of related, you should fix the missing backtick for AXDescription
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me, provided you add that backtick I mentioned.
about your question: "is it worth adding a note or some normative text to call out that the name (if provided) and subtree are expected to (both) be announced as part of a live region event?"
It seems to me like that should be in the ARIA spec, right? I just did a quick look and couldn't see anything
closes #225
label
element can name the output elementoutput
can get its name from its subtree. This was incorrect, the name and content of theoutput
need to be treated differently, as the name should not overwrite the subtree. This aligns the element with thestatus
role definition in the ARIA spec, where name is provided by author alone.localized control type: output
from theoutput
role mapping table. Should just bestatus
, as the implicit role already specifies.Question: is it worth adding a note or some normative text to call out that the name (if provided) and subtree are expected to (both) be announced as part of a live region event?
Preview | Diff