H2 tags for Main Menu and Breadcrumbs

Created on 22 June 2024, 5 months ago

Problem/Motivation

First of all I would like to compliment the maintainers of the theme. The theme is attractive and loads fast. Thank you for your work.

We used the theme on a project and noticed that the Main Menu and Breadcrumbs (contrib module) are given H2 tags on a page. I am wondering why this is done? From an SEO perspective this is not beneficial.

I do not see this as a bug, so I filed it as a support request. Please change as necessary.

πŸ’¬ Support request
Status

Active

Version

11.0 πŸ”₯

Component
OliveroΒ  β†’

Last updated about 14 hours ago

Created by

πŸ‡ΊπŸ‡ΈUnited States platinum1

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

Comments & Activities

  • Issue created by @platinum1
  • πŸ‡³πŸ‡ΏNew Zealand quietone
  • You're right that using H2 tags for the Main Menu and Breadcrumbs could have SEO implications, as it may disrupt the heading hierarchy of the page.

    The H2 tags are likely coming from the theme's default Twig template for these elements. To fix this, you can override the menu.html.twig or breadcrumb.html.twig file in your theme:

    {# menu--main.html.twig #}
    <nav class="menu">
      <ul>
        {% for item in items %}
          <li>{{ item.title }}</li>
        {% endfor %}
      </ul>
    </nav>

    This change ensures proper semantic structure while maintaining accessibility. Don't forget to clear the cache after applying the changes!
    Let me know if you'd like further assistance with testing or creating a patch."

Production build 0.71.5 2024