Skip to content
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

[Declarative Shadow DOM] bikeshedding delegates attributes #3

Closed
bennypowers opened this issue Feb 16, 2022 · 4 comments
Closed

[Declarative Shadow DOM] bikeshedding delegates attributes #3

bennypowers opened this issue Feb 16, 2022 · 4 comments

Comments

@bennypowers
Copy link

bennypowers commented Feb 16, 2022

I'd like to suggest that instead of

<span id="foo">Description!</span>
<x-foo aria-label="Hello!" aria-describedby="foo">
  <template shadowroot="open" shadowrootdelegatesarialabel shadowrootdelegatesariadescribedby>
    <input id="input" autoarialabel autoariadescribedby />
    <span autoarialabel>Another target</span>
  </template>
</x-foo>

We have

<span id="foo">Description!</span>
<x-foo aria-label="Hello!" aria-describedby="foo">
  <template shadowroot="open" delegates="arialabel,ariadescribedby">
    <input id="input" auto="arialabel,ariadescribedby" />
    <span auto="arialabel">Another target</span>
  </template>
</x-foo>

alternatively, instead of auto="..." within the shadow root, perhaps we could have

<input delgationtarget="arialabel,ariadescribedby">
@leobalter
Copy link
Owner

Thank you! I like the suggestion on the delegates="" and we can discuss this in the roll for declarative shadow DOM.

For the auto="" I'd say we can hold on a bit as the current autoaria* are known as the "have consensus" format to move this proposal forward.

@chrisdholt
Copy link

I love seeing this explainer come together, thanks @leobalter!

This may be worthy of an issue of its own, but I'm curious if there is any thought around being able to shorthand delegate all global ARIA attributes? A specific example is a design system where instead of recreating button, we want to simply delegate focus to a button in the shadow root. It seems like we'd need to enumerate all potential attributes being enumerated above and I'm curious if you think it would be worthwhile to have a method to delegating all global attributes from the ARIA Mixin. As the custom control work from Open UI gains ground, I could see more and more folks moving towards using platform controls but still wanting to deliver their design system via WC's.

nolanlawson pushed a commit to nolanlawson/cross-root-aria-delegation that referenced this issue Aug 11, 2022
Add examples of combobox implementations
@mrego
Copy link
Collaborator

mrego commented Oct 24, 2022

The updated explainer is trying to move on these lines, maybe we can find better names for all this, but we at last no longer have one property per ARIA attribute.

@mrego
Copy link
Collaborator

mrego commented Oct 25, 2022

As there are a bunch of similar issues related to syntax, let's discuss them all together at #22.

@mrego mrego closed this as completed Oct 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants