-
Notifications
You must be signed in to change notification settings - Fork 23
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
Add steps for ariaLabelledByElements
and ariaDescribedByElements
#170
Conversation
index.html
Outdated
<ol> | ||
<li id="step2B.ii.a">Set the <code>current node</code> to the node referenced by the IDREF.</li> | ||
<li id="step2B.ii.a">Set the <code>current node</code> to the element referenced by the IDREF or element in the array.</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.
Changed this from node
to element
since technically an IDREF can only point to an element, since only elements can have IDs.
After re-reading this discussion (whatwg/html#8306), I think this PR may need to be amended. It seems So perhaps we should change the |
This ^ (524cec6) is my attempt to prefer the I kept |
I think this is going to need to change once #69 lands |
I'm wondering if, at this point, it makes more sense to rewrite this spec from scratch to use the a11y tree rather than the DOM tree? I've already gotten feedback from @jsteh that Firefox walks the a11y tree rather than the DOM tree. If WebKit and Chromium do the same, then it would be a bit odd to have this spec describe something that browsers don't actually implement. That said, I'm happy to proceed as-is to avoid making the perfect the enemy of the good. |
There isn’t a standard accessibility tree between platforms or engines, so that would be even more difficult. Each engine implements its own internal tree that is then vended to the platform accessibility API, to create the platform specific tree. WebKit based its implementation off the render tree, Gecko off the DOM tree. Chromium moved a little closer to Firefox since the fork from WebKit, but each of the engine-specific accessibility trees are still unique to some degree. |
I think most browsers use some variant of the render/layout tree. E.g., they all hide Anyway, defining that is somewhat orthogonal to this particular issue as even if we did that, in order to get from an item in the render tree to its labelled elements, we'd have to poke at its corresponding DOM node and look at the internal concepts I mentioned above. |
Reading through this PR and all of the comments, I wonder if we have a path forward with this particular PR or maybe a different PR is needed? @nolanlawson WDYT? |
@MelSumner Yes, I think that this PR probably needs to be rewritten from scratch at this point. In any place where we are referring to |
Related to #167, and attempts to address #51.
With whatwg/html#7934 we have the addition of the
ariaLabelledByElements
andariaDescribedByElements
properties, which reference attr-associated elements (a FrozenArray).whatwg/html#7934 already explains how these arrays interact with shadow DOM, so (AIUI) the
accname
spec does not need to explicitly recapitulate these steps. But for the record:So I believe
accname
needs only to make mention of theariaLabelledByElements
/ariaDescribedByElements
arrays in the same places where it makes mention ofaria-labelledby
andaria-describeddby
. If two elements are in shadow roots that cannot be associated (i.e. one is not a descendant of the other's shadow-including ancestors), then the array would not contain that element in the first place./cc @mrego
Preview | Diff