- From: Jeffrey Yasskin <notifications@github.com>
- Date: Wed, 23 Oct 2024 17:45:08 -0700
- To: w3ctag/design-reviews <design-reviews@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <w3ctag/design-reviews/issues/961/2433966681@github.com>
I believe @LeaVerou's preferring attributes on the nested elements, since you write ```html <template shadowrootmode="open"> <button defaultReferenceTarget></button> </template> ``` or ```html <template shadowrootmode="open"> <button referenceTargetForAttributes="for"></button> </template> ``` instead of ```html <template shadowrootmode="open" shadowrootreferencetarget="target"> <button id="target"></button> </template> ``` or ```html <template shadowrootmode="open" shadowrootreferencetargetmap="for: target"> <button id="target"></button> </template> ``` https://github.com/WICG/webcomponents/blob/gh-pages/proposals/reference-target-explainer.md#designate-target-elements-using-attributes-instead-of-idref says you'd need to also put an attribute on the shadow root to enable this, but why would you need that? It also says that the [multiple elements](https://github.com/WICG/webcomponents/blob/gh-pages/proposals/reference-target-explainer.md#delegating-to-multiple-elements) use case, for example for `aria-labelledby`, can't handle reordering, which is an interesting case that we didn't think about. @LeaVerou / @plinss, how do you think that should be handled? I don't know the whole list of attributes that need this support, but guessing wildly, maybe it'd help to lift the restriction that ["The aria-labelledby property cannot be chained"](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-labelledby#benefits_and_drawbacks) when it's set on the shadow root? -- Reply to this email directly or view it on GitHub: https://github.com/w3ctag/design-reviews/issues/961#issuecomment-2433966681 You are receiving this because you are subscribed to this thread. Message ID: <w3ctag/design-reviews/issues/961/2433966681@github.com>
Received on Thursday, 24 October 2024 00:45:12 UTC