Adding ARIA toggle to Secondary Nav Menu
-
Hi,
I’ve used register_nav_menu to include a secondary nav menu in the archive-product.php template that I’ve placed under my child theme.
I’ve noticed that the main Storefront navigation has an ARIA role=”navigation”, and would like to use ARIA toggling (like the “aria-expanded” attribute) to make the subcategories of this secondary navigation menu expand and collapse in the same way that it does on WordPress’s Twenty Fifteen theme.
I’ve also noticed some code in Storefront’s navigation.js file, which references this toggling behavior.
Can someone please either point me to a detailed tutorial on how to apply this kind of behavior to a secondary nav menu, or provide some code-snippets/instructions that I could use?
- The topic ‘Adding ARIA toggle to Secondary Nav Menu’ is closed to new replies.