-
Notifications
You must be signed in to change notification settings - Fork 126
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
Update from PR #1018 for nameFrom: heading #1860
base: main
Are you sure you want to change the base?
Conversation
Closes #899
Adding three reviewers that were prior contributors to #1018. |
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.
just a quick list of the roles that will get name from heading
- alertdialog
- article
- complementary
- dialog
- form
- region (with HTML caveat)
My initial review:
complementary
may need a caveat added per the conditional complementary role for the aside
element.
similarly, I think form
would need a host language caveat mentioned as well, as while I think this update works since ARIA requires role=form have an accName, I don't think every HTML form
element should automatically get an accName. That'd have the potential to add extra and unnecessary landmark verbosity to many web pages
should we consider adding group
to this as well? Esp. since it's more likely for AT to even expose an element with role=group
if it's named. If there's a heading there, it could be done for authors without the need to use aria-labelling. But per my comment above, maybe this would have the inverse impact of creating too much verbosity where things were already "fine" from the user's perspective?
additionally, navigation
should be considered for naming by heading. many instances of people using headings (visible or not) to name navigation landmarks via aria-labelledby
.
i'm quite a fan of all other aspects of this PR.
@scottaohara wrote: Thanks.
To clarify, are you suggesting
I don't have a strong opinion either way, so I'll remove it in the PR unless there are objections. To clarify, are you suggesting
I think group should remain explicitly named, for the verbosity risk you've outlined.... but I could be convinced if you and others have strong opinions for it.
I support this. |
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.
common/script/aria.js needs moving to aria-common but otherwise looks good.
I like the scope of the other changes being limited to
- alertdialog
- article
- complementary
- dialog
- region (with caveats)
as it is now. We can always add more later if folks think that is desired.
@cookiecrook re: group, agreed. i felt icky suggesting it, and your response didn't wash the ick away. so let's forget it.. |
Maybe we should consider taking Especially since we're now working on automated AccName tests... |
sounds like a good idea to me. |
…cussion, these will be taken up as separate issues
Recycling reviews because I think this addresses all the feedback now. Affected roles now limited to the following for this PR.
Others that are no longer in this diff, but should be taken as separate PRs due to editorial and host language caveats are:
Also @jnurthen I have filed the script changes as w3c/aria-common#89 I wasn't sure how to mark that PR as blocking this one. FYI @scottaohara |
Good catch by @scottaohara in review Co-authored-by: Scott O'Hara <[email protected]>
I added the "waiting for implementations" tag but I was wrong, this isn't ready for implementation -- I didn't look close enough. This change still needs the following before it can be implemented:
This new process is a work in progress, so let me know if there are questions/concerns! |
My only concern here is performance. The content of container elements like these can be potentially massive, and because of potential mutations, it's not even as simple as just caching the first heading when we build the tree. Is it reasonable for UAs to impose some limit on how many nodes we check? If so, I wonder if that needs to be specified somehow? |
@jcsteh wrote:
Certainly possible, but where to draw the line? Some web dev will hit an arbitrary depth limit. Do we tie it to DOM or rendering heuristics? My original issue was intended to allow some spec permissiveness so that implementations could account for this as best they could, which may eventually inform a best path forward... AS of now, some of those heuristics are explicitly disallowed by the spec. What modification do you propose? |
closes #457 Related to the following: - w3c/aria#1860 - w3c/accname#229 (this needs to be merged so the new links to 'accName: name from heading' will work
closes #457 Related to the following: - #1860 - w3c/accname#229 (this needs to be merged so the new links to 'accName: name from heading' will work
I'm no longer blocking this, so @jnurthen you're up next and then this can finally land. |
Ah, this is "waiting for implementations", which means we should land the changes in Blink and not wait for it to be merged into the spec, right? |
@@ -662,9 +662,11 @@ <h3>Accessible Name Calculation</h3> | |||
<dd>One of the following values: | |||
<ol> | |||
<li>author: name comes from values provided by the author in explicit markup features such as the <pref>aria-label</pref> attribute, the <pref>aria-labelledby</pref> attribute, or the host language labeling mechanism, such as the <code>alt</code> or <code>title</code> attributes in HTML, with HTML <code>title</code> attribute having the lowest precedence for specifying a text alternative.</li> | |||
<li>heading: name comes from the text alternative of the first descendant <a>element</a> node (depth first search) matching the role of <code>heading</code> as defined in the AccName computation algorithm for <a href="https://w3c.github.io/accname/#comp_name_from_heading"><code>nameFrom: heading</code></a>. Although "heading" is allowed in addition to "author" in some <a>roles</a>, "heading" is used in content only if higher priority "author" features are not provided.</li> |
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.
Note for other reviewers, the only recent change is "(depth first search)" to clarify the markup test the WG discussed since I posted the original PR.
✅ Deploy Preview for wai-aria ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
@aleventhal wrote:
Sorry I missed this... I think the test was supposed to land first... but there was some discussion of DFS vs IDS which hadn't landed yet... See the last test in: |
Oh good... looks like that Chrome change wasn't merged into shipping yet. All browsers still align... |
Part of #w3c/accname/issues/138
Adds
nameFrom: heading
(this overcomes PR #1018)Will update these along the way after further discussion and review.
nameFrom: heading
steps to computation after spec addition ARIA PR #1860 is reviewed. accname#182Implementation tracking
Preview | Diff