css-toggles icon indicating copy to clipboard operation
css-toggles copied to clipboard

binary self-toggle switches

Open scottaohara opened this issue 3 years ago • 1 comments

since this is constructed with a ul element as its base, it seems like the intent here was to create a list of items. However, because the li elements are having their role overwritten by ARIA, the list semantics are completely lost here resulting in a bunch of sibling buttons.

Is there a way to declare if one wanted these to behave (be exposed as) as checkboxes, toggle buttons or switches?

scottaohara avatar May 07 '22 21:05 scottaohara

Scott, I've been following your work for years and appreciate your input on these issues!

I wonder if the solution is to discourage authors from using toggle-trigger on non-interactive elements. For this example it would mean nesting actual buttons in the lis.

We could also propose new element (<toggle>?) that browsers can enforce the correct semantics on, kinda like <summary>. No idea what that means for the spec though.

jerivas avatar May 12 '22 18:05 jerivas