• Is there a way to disable the H1 (and H6) options in the core heading block? People seem to agree that the H1 should usually be reserved for the page title and not used elsewhere on a page.

    If H1 is available as an option in the headings block, people who use our themes will inevitably put H1s in the middle of pages, where they should not be used, upsetting the semantic structure.

    Similarly, we hardly ever need H6 so it would be best if people could not select it.

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    I think the simplest solution is simply hide the buttons with some custom admin CSS. For example:

    button.components-button.components-dropdown-menu__menu-item.is-icon-only.has-icon:first-child {
        display: none;
    }

    While it’d be possible for someone to un-hide it, it’ll deter nearly everyone. Anyone that wants it that badly could just do custom HTML anyway.

    AFAIK, misuse of H1 only impacts SEO. I’m not convinced it’s a theme’s job to protect users from implementing bad SEO, but if that’s the way you want to go, do it ??

Viewing 1 replies (of 1 total)
  • The topic ‘Gutenberg: disable H1 option in core heading block’ is closed to new replies.