Site Title block: do not force h1 on all pages #20333
Labels
[Feature] Blocks
Overall functionality of blocks
[Status] In Progress
Tracking issues with work in progress
[Type] Enhancement
A suggestion for improvement.
Is your feature request related to a problem? Please describe.
The
site-title
block currently uses anh1
element at all times:gutenberg/packages/block-library/src/site-title/index.php
Line 14 in 32aaed9
Subpages and archives will wrap the site title in an h1 as a result. This is less good for accessibility and SEO, because the site title is not normally the most important title on those pages — the page/post/archive title is.
Popular themes typically use
h1
only if( is_front_page() || is_home() ) && ! is_page()
, and adiv
orp
at other times.From Twenty Twenty:
Genesis does something similar, but lets users choose whether to use h1 or p on the homepage, defaulting to h1 for “latest posts” and p for static pages.
Describe the solution you'd like
Should WP behave like Twenty Twenty, Genesis, and others instead of forcing an h1 everywhere and placing the burden on theme developers to adjust it?
Users could still filter the result if they wish, but it would be more optimal by default.
Describe alternatives you've considered
Users who care about accessibility and SEO will need to filter
site-title
block output or use a theme or SEO plugin that handles this for them.The text was updated successfully, but these errors were encountered: