[beta4] Remove the forced menu title display when "display title" is set to false

Created on 23 August 2023, over 1 year ago
Updated 24 August 2023, over 1 year ago

Problem

The title of the main menu is always displayed for assistive technology, even when we want it to not be displayed.

In the file named "block--system-menu-block--main.html", the comment says:

But this is counterproductive behaviour because there is already a menu title in the nav element. Assistive technologies already indicate the presence of a menu as well as the menu title in the aria-label attribute, so there is no need to explicitly define an additional title.

Moreover, the presence of the <h2> heading distorts the document layout and hinders navigation by title.

Steps to reproduce

  1. Configuring the main menu, uncheck the option "Display the title" and save
  2. Inspect the rendered menu markup
  3. Observe the presence of a visually-hidden menu title

Proposed resolution

Remove the forced menu title display.

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇫🇷France spryah

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024