Cancel displaying block titles, but title labels still exist in the source code

Created on 15 July 2025, 19 days ago

Hello,

The default block title in the system is not delete, although I uncheck the display title, it still exists in the source code, This will disrupt the order of h tags, for example, in the navigation bar, which is the h2 tag and is usually placed before the title, making the h2 tag appear before the h1 tag, This is not conducive to SEO, Custom blocks do not have this issue, Is this a bug or a normal design?

Thanks

💬 Support request
Status

Active

Version

1.0

Component

Miscellaneous

Created by

🇨🇳China hastroop

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

Comments & Activities

  • Issue created by @hastroop
  • 🇺🇸United States flashwebcenter Austin TX

    Thank you for bringing this to my attention.

    This is not a bug, but rather the expected behavior in Drupal core, particularly for system blocks. However, as you've rightly pointed out, this design has SEO and semantic implications, especially in cases where block titles remain in the HTML DOM but are visually hidden using display: none.

    While this is not an accessibility violation (screen readers can still access hidden content), it can disrupt the semantic heading structure, which affects SEO and content hierarchy.

    Solution Overview

    To address both SEO best practices and accessibility requirements, I implemented a robust solution through the Solo Utilities module. This module is specifically designed to handle advanced or edge cases that themes alone cannot manage.

    How to Use the Feature

    1. Install the required modules and theme:
    2. Enable the feature:
      • Navigate to: admin/appearance/settings/solo (or your current active theme).
      • Expand the Global Site Settings section.
      • Enable the "Custom block title visibility" checkbox and save the configuration.
    3. Configure each block:
      • Go to: admin/structure/block.
      • Edit any block.
      • Under Block Title Settings, you'll now see:
        • The "Display title" checkbox has been removed.
        • A new dropdown with the following options:
          • Visible – Renders and displays the title (default behavior).
          • Visually hidden – Renders the title for screen readers only (recommended for accessibility).
          • None – Does not render the title at all (clean markup, used when the block has no semantic purpose).
    4. Heading tag options:
      • If "Visible" or "Visually hidden" is selected, an additional dropdown lets you choose the HTML tag to use for the title:
        • h1h6 for semantic control
        • div for non-semantic output (e.g., when the screen reader title should appear before the main h1)

    This feature helps maintain logical heading structure, optimize SEO, and support accessible screen reader behavior—all in one flexible system.

    Best wishes,
    Alaa

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

Production build 0.71.5 2024