Method of opening submenus
Closed this issue · 1 comments
This is more of a question.
Im having issues wrapping my mind around the method of opening submenus. I know its a method ( Use button as toggle ) w3.org provides. Its great for keyboard users but I'm having a hard time selling it to clients and users because the expected behavior isn't equaling actual behavior they experience out in the wild. This is especially true on mobile devices. But perhaps we should get used to this behavior, makes sense to me (-:
With that being said is there a reason y'all went that method vs the other method (Use parent as toggle
) w3.org provides?
Still on fence but might change behavior. Thinking that I could change the navigation.js file so that the sub menu is opened by the parent item click or hover instead of the button and then remove the button from the nav-walker.php file. See any issues with that.
Thanks for your time.
With that being said is there a reason y'all went that method vs the other method (Use parent as toggle
) w3.org provides?
As W3.org explains (see the part I emphasized here):
Use this approach in situations where the parent menu item only summarizes the submenu and doesn’t have to carry out a function, such as linking to a web page.
It's most accessible to all the navigation links to have pages in them. I personally strongly dislike links that look like links but are not actually linking to anything. Also, if you do have the parent item as page or link, how do you get to that page?
Our navigation uses the same structure in both mobile and desktop versions because of this. This solution also provides the best support for assistive technology like screen readers. Other pro-toggle reason is that the keyboard user should choose when the menu is open and when it's closed, when there's a parent item. With our current navigation user can choose whether to open a link or a sub-menu related to that link.
Yet another reasoning behind the toggle is consistency between sub-sub-menus. If there's more than one level, how do you know otherwise what sub-page item is actually not a sub-page but rather a toggle? If there's a toggle, it's not consistent with the previous navigating pattern in top level.
I have really put my soul in to the navigation as my wife is deaf blind and I want to make the most important element of the website to be easily navigate for everyone, seeing, blind and something from between. But if I were to decide, I would ban all multi-level and dropdown navigations by law. I would forbid them. The best menu for website is directly to be seen in both mobile and desktop, from 3 to 6 links and no more. But I understand the challenge when the website is massive one like this one or this one (both built with air-light by us btw!).
But, now that you brought this up, we have done this alternative click-nav couple of times with our theme, for example on the site here but we're not going to change the default functionality on Air-light because it eliminates the possibility of having a parent item in the navigation and is not that accessible in general compared to the button toggle solution.