co-design icon indicating copy to clipboard operation
co-design copied to clipboard

Mobile menu is not working without Java Script

Open luap42 opened this issue 6 years ago • 1 comments

The mobile menu is currently not accessible without Java Script enabled. This was noted here:

https://github.com/codidact/core/pull/13#discussion_r367251158

This should be fixed. This issue is for collecting ideas on how to solve that.

luap42 avatar Jan 16 '20 21:01 luap42

The way I usually do a CSS-only mobile menu is to have a checkbox+label - the checkbox is always hidden via CSS, and the label is styled to look like an "open menu" button. Then the sibling and state selectors (i.e. .checkbox:checked ~ .menu) can be used to make the menu visible when the checkbox is checked.

ArtOfCode- avatar Jan 16 '20 21:01 ArtOfCode-