WCAG issues and dropdown bug
-
1. Keyboard Navigation & Accessibility Issue (WCAG)
Currently, pressing
<tab>on a top-level menu item automatically forces the mega-menu to open. This creates a poor user experience and violates accessibility guidelines.- The Problem: Keyboard users are forced to tab through every single sub-menu item just to get to the next top-level menu item. Furthermore, the actual link of the top-level item is currently unreachable for them.
- Our Goal: We want to keep the
:hoverfunctionality for mouse users (so the top-level links remain clickable), but change the behavior for keyboard users. - The Solution (The WordPress Way): The correct approach is to output an
<a>tag for the top-level page link, followed by a separate<button>(like a chevron arrow).- Mouse users: Hovering the item triggers the mega-menu, and clicking the link navigates to the page.
- Keyboard users: Tabbing focuses the
<a>link first (allowing them to visit the page). Tabbing again focuses the chevron<button>, where pressing<Enter>or<Space>opens/closes the mega-menu.
2. Desktop Dropdown Bugs
We also noticed 2 visual/interaction bugs on desktop screens:
- Overflow/Height issue: If the mega-menu content is taller than the browser viewport, the bottom content gets cut off because there is no vertical scroll (
overflow-y: auto) active within the mega-menu container. - Hover/Close bug: When the mega-menu is opened via
:hoverand the user moves their mouse out through the bottom edge of the mega-menu, it stays open and fails to close. It only closes correctly when leaving the menu via the top, left, or right edges.
We truly appreciate the effort you put into developing this plugin. Resolving these accessibility issues and bugs would make your product much more robust and viable for professional, enterprise, or government websites where WCAG compliance is strictly required. Could you please let us know if you can look into these improvements for an upcoming release?
Thank you so much for your time and dedication to making this plugin even better!
Kind regards,
Tieneke
You must be logged in to reply to this topic.