class-toggle-menu-walker.php
Walker class to output a WordPress menu with accessible toggle buttons for sub-menus.
Each sub-menu gets a unique ID (sub-menu-1, sub-menu-2, ...) and is initially hidden via 'hidden' and 'aria-hidden="true"'. Toggle buttons, rendered next to parent links, use ARIA roles and attributes for accessibility and reference the associated sub-menu by ID.
Table of Contents
Classes
- Toggle_Menu_Walker
- Custom Walker_Nav_Menu for accessible sub-menu toggles.