Hacker News new | ask | show | jobs
by robin_reala 1163 days ago
Typically you’d want to toggle aria-expanded to give more hints to users as to what’s actually happening. You also can’t trap focus into the menu purely with CSS, at a minimum you’ll need to use some JS to set an inert attribute. More info / examples here: https://adrianroselli.com/2023/03/css-only-widgets-are-inacc...
1 comments

You can do that as progressive enhancement on top of the CSS-only checkbox solution though.