Problem/Motivation

block--system-menu-block--account.html.twig and block--system-menu-block--main.html.twig do not display the title at all. The aria-labelledby attribute is set for the nav tag so that causes an error.
But the comment from system's templates was kept.

 * Headings should be used on navigation menus that consistently appear on
 * multiple pages. When this menu block's label is configured to not be
 * displayed, it is automatically made invisible using the 'visually-hidden' CSS
 * class, which still keeps it visible for screen-readers and assistive
 * technology. Headings allow screen-reader and keyboard only users to navigate
 * to or skip the links.
 * See http://juicystudio.com/article/screen-readers-display-none.php and
 * http://www.w3.org/TR/WCAG-TECHS/H42.html for more information.

Proposed resolution

Keep the code that displays the title and make it visually hidden if necessary.

Comments

mfernea created an issue. See original summary.

mfernea’s picture

Status: Active » Needs review
StatusFileSize
new1.79 KB

Here is a patch for this.

jorgediazhav’s picture

Status: Needs review » Reviewed & tested by the community

Yep, it does the trick.

markhalliwell’s picture

Status: Reviewed & tested by the community » Needs work

This introduces the prefix/suffix which will add contextual links. These interfere with Bootstrap's dropdown menu (and why they were removed in the first place).

Also, this uses visually-hidden. It should use sr-only instead.

mfernea’s picture

Status: Needs work » Needs review
StatusFileSize
new1.69 KB

Here is the new patch.

  • markcarver committed b3e6fa9 on 8.x-3.x authored by mfernea
    Issue #2838274 by mfernea: System menu blocks templates (account...
markhalliwell’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.