The submenus haven't been properly indicated for screen reader users

Created on 6 October 2020, almost 5 years ago
Updated 12 August 2025, 11 days ago

Problem/Motivation

The submenus haven't been properly indicated for screen reader users. aria-haspopup="true" should present to declares that a menu item has a submenu. Also, the "aria-expanded" attribute should present and set to "true" while the submenu is open, and to "false" otherwise. 

πŸ› Bug report
Status

Active

Version

1.11

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States dtadege

Live updates comments and jobs are added and updated live.
  • Accessibility

    It affects the ability of people with disabilities or special needs (such as blindness or color-blindness) to use Drupal.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States rraney

    I'm seeing a couple of related issues with the Megamenu module for Drupal 10.

    1. In a dropdown "level 1" submenu, such as:

    <span class="tbm-link level-1 no-link tbm-toggle" tabindex="0" aria-expanded="false">
                    Explore
              </span>

    This is reportedly a misuse of aria attributes, according to WCAG 2.1 AA, SC 4.1.2.
    To fix: ARIA attribute is not allowed: aria-expanded="false"

    2. The level 1 "list" used in megamenu is missing the "aria-haspopup" attribute:
    <li class="tbm-item level-1 tbm-item--has-dropdown" aria-level="1">
    This also deals with SC 4.1.2.
    To fix: Add aria-haspopup="true" to menu items with dropdowns. Ensure the menu element with aria-haspopup is focusable and can activate the popup.

Production build 0.71.5 2024