tabatkins / css-toggle

Proposal for a CSS Toggle spec
Creative Commons Zero v1.0 Universal
28 stars 1 forks source link

do we actually want multiple `toggle-trigger` values? #48

Open dbaron opened 1 year ago

dbaron commented 1 year ago

Currently the toggle-trigger property takes a list of toggles to trigger.

I haven't seen any demos so far that involve using multiple toggle-trigger values.

I also think multiple toggle-trigger values may make some of the accessibility semantics more complicated.

(Also see https://github.com/tabatkins/css-toggle/issues/39#issuecomment-1376279052 for toggle-trigger on ancestors and descendants.)

Should we consider removing the support for multiple toggle-trigger values? Does it make more sense from an accessibility perspective to have only one?

tabatkins commented 1 year ago

I don't have a motivating use-case for it, it just seemed easy to do mechanically. I agree that it complicates the a11y semantics, however, so I'm okay with removing it. We can always make it list-valued in the future!

dbaron commented 1 year ago

For what it's worth, there's also complication in the accessibility semantics for other things (particularly toggle-root and the set of toggles on an element) being multi-valued, but I suspect that, with multiple toggle-trigger out of the way, at least most of the complex cases will have reasonable solutions. Right now I'm not at all convinced that much of the code I've written (note: very much work-in-progress) for the accessibility inference makes any sense at all in the presence of multiple toggles.