Problem/Motivation

templates/block/block--system-menu-block.html.twig seems like it is unnecessary overridden.

The only meaningful difference between bootstrap5's version of that file and core/modules/system/templates/block--system-menu-block.html.twig is that bootstrap5's override changes the title element from a <h2> to a <h5>. Semantically it should be a h2 like core does it (a Lighthouse report on "Heading elements are not in sequentially-descending order" was led me to create this issue in the first place).

The only other difference with core is the classes being added to the wrapping <nav>, but they seem unneeded as they were removed from core in #2407715: Remove classes from system templates b*.html.twig.

The original override of block--system-menu-block.html.twig happened way back in #3025596: Add ability to switch between fixed and fluid global layouts., i.e. from the bootstrap4 repo.

Steps to reproduce

Proposed resolution

Remove bootstrap5's version of templates/block/block--system-menu-block.html.twig

Issue fork bootstrap5-3506239

Command icon 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

fenstrat created an issue. See original summary.

fenstrat’s picture

Status: Active » Needs review

stefan.korn made their first commit to this issue’s fork.

stefan.korn’s picture

totally agree on this.

updated the MR with latest HEAD.

for some background info why sequential headings matter beside that tools like Lighthouse are reporting, read this: https://ux.stackexchange.com/questions/49111/is-it-ok-to-use-h1-and-then...

fenstrat’s picture

Status: Needs review » Reviewed & tested by the community

Thanks @stefan.korn, given your feedback I'm going to mark this as RTBC.

vladimiraus’s picture

Issue summary: View changes
Status: Reviewed & tested by the community » Fixed

Thank you. Fixed.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

  • vladimiraus committed ef186157 on 4.0.x
    feat: #3506239 Remove unnecessary override of block--system-menu-block....

Status: Fixed » Closed (fixed)

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