[go: nahoru, domu]

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

clarify output element naming #402

Merged
merged 19 commits into from
Mar 8, 2023
Merged

clarify output element naming #402

merged 19 commits into from
Mar 8, 2023

Conversation

scottaohara
Copy link
Member
@scottaohara scottaohara commented May 4, 2022

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.
  • removes the localized control type: output from the output role mapping table. Should just be status, 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

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?
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.
scottaohara added a commit that referenced this pull request Dec 8, 2022
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.
@spectranaut spectranaut self-requested a review December 8, 2022 18:16
Copy link
Collaborator
@cookiecrook cookiecrook left a 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>
Copy link
Collaborator
@cookiecrook cookiecrook Dec 10, 2022

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.

Suggested change
<td class="ax">`AXDescription: value from associated `label` element subtree.</td>
<td class="ax">`AXLabel: value from associated `label` element subtree.</td>

Copy link
Collaborator

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

Copy link
Member Author

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.

Copy link
Contributor

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

Copy link
Contributor
@spectranaut spectranaut left a 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

index.html Outdated Show resolved Hide resolved
@scottaohara scottaohara merged commit 256d57e into gh-pages Mar 8, 2023
@scottaohara scottaohara deleted the output-naming branch March 8, 2023 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

output element is a labelable element
3 participants