Submenu not keyboard accessible when Screen Reader is running

<a class="menu-toggle" href="#" role="link" aria-label="Toggle submenu Mieten" tabindex="0"></a>

Works in Safari (Mac), Firefox (Win) and Chrome (Win). But if NVDA (Screen Reader, Windows) is running, it is impossible to open the submenu with the keyboard. Not in Chrome and not in Firefox. So blind users are blocked here and keyboard support first of all should support the two main screen readers (JAWS and NVDA). This is a major accessibility issue.

JS will not receive the event for this event listener if NVDA runs in browse mode (in your accessibility.js): 

document.addEventListener('keydown', function(e) {

What was missing was role="menuitem" on the a-links in the submenu:

<a class="menu-toggle" href="#" role="menuitem" aria-label="Toggle submenu Mieten" tabindex="0"></a>

If you add role="menu item" the submenu is keyboard accessible when NVDA is running. You also have to add role="menu" to the parent element (it works without but you html is not valid).

That should be a quick and important fix for you.

Also it is not a good way to separate the menu item into two linked elements. One for the main menu and one to toggle the submenu:

<ul id="menu-hauptmenue" class="menu menu-main"><li id="menu-item-12395" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-has-children menu-item-12395 submenu"><a href="https://www.mydomain.de/mieten/" tabindex="0"><span>Mieten</span></a>

<ul class="sub-menu" aria-expanded="false" style="display: none;">

<li id="menu-item-21779" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-21779"><a href="/somwhere/wohnen/" tabindex="0"><span>Mietwohnungen</span></a></li>

...

</ul>

<a class="menu-toggle" href="#" role="link" aria-label="Toggle submenu Mieten" tabindex="0"></a></li>

...

</ul>

Comments

Sign In or Register to comment.
This website uses cookies

We use cookies to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners who may combine it with other information that you’ve provided to them or that they’ve collected from your use of their services.

Cookies are small text files that can be used by websites to make a user's experience more efficient.

The law states that we can store cookies on your device if they are strictly necessary for the operation of this site. For all other types of cookies we need your permission. This means that cookies which are categorized as necessary, are processed based on GDPR Art. 6 (1) (f). All other cookies, meaning those from the categories preferences and marketing, are processed based on GDPR Art. 6 (1) (a) GDPR.

This site uses different types of cookies. Some cookies are placed by third party services that appear on our pages.

You can at any time change or withdraw your consent from the Cookie Declaration on our website.

Learn more about who we are, how you can contact us and how we process personal data in our Privacy Policy.

Please state your consent ID and date when you contact us regarding your consent.