Re: [w3ctag/design-reviews] Reference Target (Issue #961)

Have you considered reversing the relationship of the shadow root to the target node? For example, rather than having the developer set the `referenceTarget` on the shadow node, introduce a `aria-referencetarget` (or some equivalent) attribute which is set on the target node? The shadow root can still have a `referenceTarget` attribute but it's read-only and can be a reference to the actual node.

I'm thinking of the developer ergonomics, for instance if I'm building a select-type control, in the current model I have to set some attribute (probably a class) on the currently selected node to indicate its selected state and trigger style changes, and then I have to also add an id and set the `aria-activedescendant` in the reference map on the shadow root. In my proposal, the developer would only need to set the `aria-activedescendant` attribute on the active node (which can also be used as the style trigger) and the reference map can update automatically. This also eliminates the need for ids on everything. 

-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3ctag/design-reviews/issues/961#issuecomment-2411812056
You are receiving this because you are subscribed to this thread.

Message ID: <w3ctag/design-reviews/issues/961/2411812056@github.com>

Received on Monday, 14 October 2024 17:10:09 UTC