RFC: Exporting IDs from shadow roots for cross-root ARIA#204
RFC: Exporting IDs from shadow roots for cross-root ARIA#204behowell merged 7 commits intoWICG:gh-pagesfrom
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
alice
left a comment
There was a problem hiding this comment.
+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-labelledbyorfor, while preserving shadow DOM encapsulation. There is a new attributeexportidto 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
useidsto 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.