leobalter / cross-root-aria-delegation

Explainer for the Cross-root ARIA delegation proposal
https://leobalter.github.io/cross-root-aria-delegation/
25 stars 3 forks source link

[Question]: Radio Groups / Tab Groups? #4

Closed bennypowers closed 1 year ago

bennypowers commented 2 years ago

How does this proposal affect cases like radio groups or tab groups, which today require users to place all of the related elements in the same root.

If the proposal does not affect those cases, how might it interact with a future proposal which does?

Thank you Leo for putting this proposal together.

leobalter commented 2 years ago

Thank you!

I don't know yet. I'll take a look and if I don't have any answer I'll forward the question to the AOM group next week.

nolanlawson commented 2 years ago

In this same vein, I would wonder about the combobox pattern, and in particular aria-activedescendant. Imagining that the custom element structure is something like this:

<x-combobox>
  #shadow-root
    <input aria-activedescendant="foo">
</x-combobox>
<x-listbox>
  #shadow-root
    <x-listitem id="foo"></x-listitem>
    <x-listitem id="bar"></x-listitem>
    <x-listitem id="baz"></x-listitem>
<x-listbox>

... it's not clear to me how the combobox could reference an individual list item using aria-activedescendant. The <x-combobox> could delegate aria-activedescendant, but it still wouldn't have access to the foo id because it's inside the <x-listbox>'s shadow root. Does this proposal cover this scenario?

leobalter commented 2 years ago

Thanks @nolanlawson! This is a slightly more complex case that also shows some limitations of the current proposal.

The cross-root aria delegation allows only a single layer of delegation. so I'm afraid we'd be still be short to resolve connecting the input from x-combobox to the shadow rooot of x-listbox.

For that, we might need bigger work within the AOM's ID reflection, which I consider orthogonal to this current proposal.

gonzalocordero commented 2 years ago

@leobalter may I suggest adding, a note on your proposal around how not all cross-shadow use cases are covered so that contributors understand the scope.

leobalter commented 2 years ago

it makes sense, @gonzalocordero. I'll do it!

mrego commented 1 year ago

This is now included in the updated explainer, that goes over the 2 proposals delegation and reflection, and should look into how they both combine in some of these more complex use cases.

mrego commented 1 year ago

Let's merge this issue into #14 as it has some more content discussion, but they end up talking about the same topic.