-
Notifications
You must be signed in to change notification settings - Fork 59
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
RFC: Exporting IDs from shadow roots for cross-root ARIA #204
Conversation
Add links within the document
Please see the discussion on the previous proposal #200 for more background. |
Make some suggested edits on exportid-explainer.md
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.
+1 from me - really excited to continue to develop these ideas, especially in conjunction with some kind of semantic delegate concept.
Thank you -- I've merged this draft of the explainer. If anyone has further comments or suggestions, please log an issue or PR. Thanks! |
Apologies for not taking a look earlier. I've read through the current spec, and everything looks great to me. Reusing To me, this proposal ticks all the boxes while handling various edge cases (declarative format, no bottleneck effect, can rename IDs pointing in or out), so I'd really love to see browser vendors start to take a stab at it. Amazing work!! |
Yeah, it's tricky to name because I think if we wanted to name it |
Exported IDs are a way to refer to elements inside a shadow tree from an ID reference attribute like
aria-labelledby
orfor
, while preserving shadow DOM encapsulation. There is a new attributeexportid
to mark an element as having its ID exported from the shadow root, and a new syntax to refer to the element from outside the shadow root:for="host::id(child)"
. For example, to apply a label to an element inside a shadow tree:There is also a new attribute
useids
to allow referring to elements outside of the shadow tree. More details are in the RFC.The full proposal is in this PR, and you can see a formatted version here:
📜 Exporting IDs from shadow roots for cross-root ARIA
I'd really appreciate any feedback and comments! You can leave comments directly on the .md file in this PR.
Special thanks to @alice for the detailed feedback on the previous proposal, which has led to this proposal. Also, thanks to @nolanlawson, @Westbrook, and @EisenbergEffect for feedback on the previous proposal.