-
Notifications
You must be signed in to change notification settings - Fork 125
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
base: main
Are you sure you want to change the base?
Conversation
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.
✅ Deploy Preview for wai-aria ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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> |
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.
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.
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.
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)
Moved from w3c/html-aam#533