Re:In Praise of the Unambiguous Click Menu
by julianlam on Tuesday March 23, 2021 @12:47AM
(#26551235)
An accessible (or at least a no-js) way to expose a menu on click would be to use a checkbox, the :checked state in CSS, and a label element for the actual click handler.
It's a semantic html nightmare but it works.
Re:In Praise of the Unambiguous Click Menu
by brianzelip on Wednesday March 24, 2021 @07:07AM
(#26565687)
For sure. Note that the escape key for unchecking won't work with out js.
Yet the demo linked to in the article[0] doesn't work w/out js at time of writing. The article makes me want to buy in, but the lack of non-js implementation seems awkward.
I make css hover dropdown menus a la "Setup 2" in the article's diagram, ie: the drop down top level nav item is not clickable, but expands on hover and keyboard navigation.
I personally prefer one less effort. A mouse click is always a mouse hover first.
[0] https://github.com/mrwweb/clicky-menus