@mattstuddert
Posted
Nice work, Felix and it's great to hear that you're starting to feel more confident with CSS. The major issue with how you've implemented the mobile dropdown is that it's not accessible to people who can't use a mouse/trackpad. You're using a click event on a div
to trigger the menu. div
elements are not interactive elements, so it's a bad practice to have click listeners on them, as it creates inaccessible functionality. Instead, use an interactive element like a button
to trigger the menu dropdown. If you want to see an example, take a look at the mobile version of Frontend Mentor and see how the mobile navigation works.
Keep it up!
@Pleopleq
Posted
@mattstuddert As always a great piece of advice, thanks Matt!