Nav Menu Accessibility Issues

Bricks Version: 1.5.6

Wanted to bring this to the Bricks Dev team attention especially since the Mobile Menu and Mega Menu is being worked on at the moment (according to the Bricks Roadmap).

Adam Lowe from Peak Performance Digital noted several accessibility issues in his latest video

They include:

  1. Can’t use escape key to close menus

  2. Dropdown menus only open with the space bar, not with the enter key (both should be usable)

  3. Every top-level menu item has an aria-expanded attribute set. This means screen readers always announce the menu as expanded or collapsed whether it has a submenu or not.

  4. Should use the WAI-ARIA Disclosure patterns rather than the Navbar pattern. On the WAI-ARIA Menubar example page it even says that it’s not typically the right pattern
    https://www.w3.org/WAI/ARIA/apg/example-index/disclosure/disclosure-navigation

16 Likes

It would be great if the navigation menu meets the test rules of WCAG 2.1 and for Germany BITV 2.0.
:+1: @thomas @timmse

5 Likes

Yes, please remove ‘role=menubar’ and ‘role=menuitem’ from the nav pattern. Menuitem is meant to be used with ‘menubar’ or ‘menu’, but neither is used for navigation (that’s why there’s a role=navigation!).

I’m not sure what version the video guy used, but I don’t see the aria-expanded attributes on top-level links.

1 Like

Hi Tom,
Thanks for pointing it out and sharing the link to the video!

We’ll keep these points in mind :slight_smile:

Best regards,
timmse

4 Likes

FYI the second part of the video came out and it goes over in great detail the Nav menu found in the 2023 theme in WordPress 6.1 and how it is accessible. This is a great comparison and testing methodology used here that would be very helpful when updating the Bricks Nav menu.

3 Likes

Any update on whether we’ll get a solution to the issues raised above?

EDITED

Removed the aria-label comment - it seems now that if you add the attribute aria-label to a nav element it’ll actually hook into the right place. Never worked for me in the past.

1 Like

They’re a bit like quantum physics - they’re not there until you try to see if they’re there with something like SiteImprove, then they magically appear. It’s very weird