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

[html-aam PR 533] Clarify hidden elements do not return name #2214

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

pkra
Copy link
Member

@pkra pkra commented May 23, 2024

Moved from w3c/html-aam#533

scottaohara and others added 3 commits February 26, 2024 15:08
closes #370

Adds comments to label, legend and caption elements to indicate that if they are hidden, then they will not return a name for their associated elements.

Note that right now this means that 
```
<label for=d hidden>foo</label>
<input id=d title=bar>
```
has _no name_.  The label is still referenced, but because it is hidden it returns an empty name in Safari and Chromium browsers.  Firefox correctly returns "bar" as the name of the input.
@pkra pkra changed the base branch from monorepo_history--html-aam to main June 12, 2024 19:30
@pkra pkra changed the title [Monorepo] [html-aam PR 533] Clarify hidden elements do not return name [html-aam PR 533] Clarify hidden elements do not return name Jun 12, 2024
html-aam/index.html Outdated Show resolved Hide resolved
Copy link

netlify bot commented Jul 1, 2024

Deploy Preview for wai-aria ready!

Name Link
🔨 Latest commit 24b895b
🔍 Latest deploy log https://app.netlify.com/sites/wai-aria/deploys/66830cd41dc1d20008eb0cfc
😎 Deploy Preview https://deploy-preview-2214--wai-aria.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@scottaohara
Copy link
Member

re-added all previous reviewers from the original HTML AAM PR, so we can try to get this merged.

<td>Use WAI-ARIA mapping</td>
<td>
<div class="role">Use WAI-ARIA mapping</div>
<div class="role-namefrom"><strong>AXDescription:</strong> value from child <a href="#el-caption">`caption`</a> subtree</div>
Copy link
Contributor

Choose a reason for hiding this comment

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

Subtree seems to imply DOM subtree such as element.innerText, but I think what you want here is the computed name of the first rendered caption element that is a child(?) of the table. I did not provide an inline diff because I think some of these suggestions also apply to the above changes.. For example, the "hidden" stipulation is presumably a normative requirement, that is listed in an informative note.... I think adding "rendered" (as I did here) in all normative contexts may resolve that, but there are other ways to make the change too.

Copy link
Member

Choose a reason for hiding this comment

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

thanks for the catch on the normative requirement in a note. i'll work on that asap.

i did however intend the subtree to be where the name was derived from, rather than just stating name in general, since authors shouldn't be using things like aria-label to name a legend or caption.

html aam uses 'subtree' in a lot of the name calculation steps that were written far before i started editing the spec. so if we want to change the way that's referenced, i think we need to do that in many places (though we can start with this PR)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants