Thanks for the feedback! I agree about the problems with hover. That's why I used the click-to-open version.
Adding a checkbox to a page that has no semantic purpose bothers me.
I would argue that it has a semantic purpose. It is an element that clearly communicates its function, which is to open and close a menu. You might as well say a button has no semantic purpose.
I wonder why you're avoiding Javascript?
Let's flip that around: Why would I use JS for something that is this easily accomplished in a few lines of CSS? Common JS approaches often either:
add inline styles (not ideal, and sometimes disallowed by CSP)
add/remove classes, creating three-way coupling between the HTML/CSS/JS. Avoiding JS is simpler and has looser coupling.
Why not just make the menu visible in the first place?
This question makes no sense to me. I wanted a dropdown menu for the same reasons everyone does, why question that choice based on how I code it?
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Thanks for the feedback! I agree about the problems with hover. That's why I used the click-to-open version.
I would argue that it has a semantic purpose. It is an element that clearly communicates its function, which is to open and close a menu. You might as well say a button has no semantic purpose.
Let's flip that around: Why would I use JS for something that is this easily accomplished in a few lines of CSS? Common JS approaches often either:
This question makes no sense to me. I wanted a dropdown menu for the same reasons everyone does, why question that choice based on how I code it?