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: If not displayed, we still provide it for screen readers.
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
- Configuring the main menu, uncheck the option "Display the title" and save
- Inspect the rendered menu markup
- Observe the presence of a visually-hidden menu title
Proposed resolution
Remove the forced menu title display.
Issue fork ui_suite_dsfr-3382890
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
spryah commentedFixed missing words in summary...
Comment #4
spryah commentedComment #5
spryah commentedAdded a clarification concerning the layout of the document
Comment #8
pdureau commented