• 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?

Viewing 4 replies - 1 through 4 (of 4 total)
  • This is quite an in-depth and complex customisation. I’m afraid I can’t really help via the forum. You’d probably be best off reaching out to a developer to handle this for you. It shouldn’t be a big job, but it’s more than you can really be guided through on this forum imo.

    Sorry I can’t be of more help.

    Thread Starter alexWP333

    (@alexwp333)

    Thanks anyway for looking over the question.

    Is there someone you know, and could recommend, that would be able to do this for me? If not, I’d need to post an ad for someone who was well versed in PHP, Javascript, and WordPress. Does that sound right, or are there any other skills that you think they’d need to have?

    This would be a useful feature in that it would do two things.

    The first would be to get the WooCommerce Product Categories section out of the Sidebar, and into the main content area. For mobile phone visitors this would mean that the Product Categories nav list would always appear above the main content of the shop pages, instead of below with the rest of the sidebar widgets. I’ve already done this part by registering a secondary menu, and placing it in the main content area.

    Secondly, giving the Product Categories nav list a toggle feature would make it so that, for mobile phone visitors, the initial view of the shop pages could display a collapsed product navigation, which in turn would give a bit of room in the main content area to see the actual product images.

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Is there someone you know, and could recommend, that would be able to do this for me?

    Unfortunately James and other people can’t make that recommendation. The general advice is to try https://jobs.wordpress.net/ or https://directory.codepoet.com/ and not to accept any hire offers posted to these forums.

    Thread Starter alexWP333

    (@alexwp333)

    Thanks Andrew. I’ll look at both of the links that you sent me.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Adding ARIA toggle to Secondary Nav Menu’ is closed to new replies.