In Drupal, hiding a block title using the "Display title" checkbox might seem straightforward, but what many developers and site builders don’t realize is that the title isn’t truly removed. Instead, it's visually hidden using CSS, typically via display: none.
While this is not a bug, it has important implications for SEO, accessibility, and semantic HTML — especially when default system blocks like Main Navigation or Breadcrumbs come into play.
What’s Going On?
When you uncheck “Display title” on a block:
Drupal still renders the block title markup (usually an
<h2>) in the page’s HTML.It simply hides it visually using CSS.
The markup remains in the DOM and still impacts heading structure and screen reader output.
This applies to core/system blocks like:
Main navigation (
<h2>Main navigation</h2>)Breadcrumb
Footer menus
Custom blocks, on the other hand, behave differently. When “Display title” is unchecked, the title is usually excluded entirely from the rendered HTML — giving developers more control over semantics and heading hierarchy.
Why This Matters for SEO
Let’s say the main menu block is rendered before your main content. If it contains a hidden <h2>, it will appear above the page’s <h1> in the HTML source.
This causes two problems:
Heading order is broken, violating semantic best practices (h2 before h1).
Search engines and screen readers may misinterpret the page structure, potentially lowering SEO performance and accessibility clarity.
Real-World Example: A Practical Enhancement
To address this issue, I built a new feature into the Solo Utilities module designed specifically for use with the Solo theme
Key Features:
A new “Block Title Visibility” dropdown is added to the block configuration UI.
Developers can choose from:
VisibleVisually HiddenNone
A second field allows choosing the HTML tag used (
h1toh6, ordivfor non-semantic output).Fully controlled via theme settings at
admin/appearance/settings/solo.This feature empowers developers to enforce clean semantic markup without compromising accessibility.
Is This a Bug in Drupal Core?
No, this is intentional design behavior in Drupal core.
Why Core Does This:
Drupal uses the
label_displaysetting to determine visual presentation, not semantic inclusion.When
label_displayis disabled, the label is hidden but not removed.This ensures screen readers can still identify regions by label.
But…
Custom blocks and some programmatically rendered blocks do omit the label when requested.
There is inconsistency across block types:
Views blocks, menu blocks, and system blocks handle label rendering differently.
Accessibility vs. SEO A Design Tension
Drupal’s default behavior aims to support accessibility by labeling regions, but in doing so, it can break semantic heading order expected by SEO engines and assistive technologies.
For SEO-conscious theming, visually hidden headings that come before the actual
<h1>are undesirable.Conclusion: Not a Bug, But a Limitation
To summarize:
This behavior is by design, but it's a limitation for semantic output.
There is no core setting to remove the block title markup entirely, even when hidden.
The Solo Utilities enhancement offers a clean, developer-friendly fix.