DEV Community

Discussion on: How to make menus with CSS—no JavaScript or Bootstrap required!

Collapse
 
angeliquejw profile image
Angelique

Admittedly, I have only looked at the code and not tested this with a screenreader, but I think you're overestimating the accessibility of this markup and CSS. Without JS, there's no changing of ARIA attributes alerting a screenreader user to these interactive elements, the checkbox input isn't labeled, you're treating items that usually don't get focus (like span) as interactive elements, there are no :focus styles, etc.

I know accessibility wasn't the focus of this exercise, but it's not even mentioned in your caveats or things folks get when they add in JS. While I 💯 agree with your closing sentiment, I'm too cognizant that, for some, mastery of CSS is all about trickery and challenges and not functionality and usability.