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.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | bootstrap-aria-labelledby-2838274-5.patch | 1.69 KB | mfernea |
Comments
Comment #2
mfernea commentedHere is a patch for this.
Comment #3
jorgediazhav commentedYep, it does the trick.
Comment #4
markhalliwellThis 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 usesr-onlyinstead.Comment #5
mfernea commentedHere is the new patch.
Comment #7
markhalliwell