Closed ghost closed 4 years ago
which means that basically if the user leaves the "#" as menu item URL it works as he/she wants.
Anyways we can "enhance" that code to include even the no href case.
To be honest, though, links without href are supposed to be not clickable...
ok thanks for the quick feedback.
yes that's right, links without href are not supposed to be clickable... but, you'll agree that it's simpler sometimes to make our own interpretation of the W3C specs, than to teach thousands of users a rule they don't really care about ... :)
Well yes but, 1) When you create a menu item WP forces you to specify an URL: to have a menu item without URL you have firstly create it with an URL, then add it to the menu, then expand the menu item in the menu and then remove the URL and save it; 2) links without URL are NOT "navigable" with the keyboard (=> accessibility issue); 3) we have to add more code to allow something which is not really good in terms of w3c specs, accessibility, and that requires the user do all the steps in 1) why should he/she? what's the purpose? who guided this user into this practice?
But anyway, as said, no problem to add more code for that. ;)
yes we'll adapt the code. simpler than explaining all your ( totally relevant ) points.
same in Hueman, as I ported the Customizr code there: https://github.com/presscustomizr/hueman/blob/dev/assets/front/js/_parts/_main_userxp_1_mobile_menu_toggle.part.js#L239