Skip to content
SprecherEast
Issue 577

bug: Post articles can contain a second Heading 1

Back to our plan
Open
bugfrontendcmspriority: low

Problem

In plain words: the post editor lets writers add a "Heading 1" inside the article, but the page title is already the page's one Heading 1. Two of them confuse screen readers and search engines, and would make a messy "On this page" list. Events already allow only Heading 2 to 4.

Checked: src/modules/news/cms/posts.ts has HeadingFeature({ enabledHeadingSizes: ['h1', 'h2', 'h3', 'h4'] }); src/modules/events/cms/events.ts has ['h2', 'h3', 'h4']. Whether any live post uses an h1 couldn't be checked from this session.

Proposed fix

  • Posts allow h2 to h4, like events (Payload's native option; no migration, the field's stored shape doesn't change).
  • Draw any h1 already saved inside an article as an h2, so old posts stay correct (in the heading converter added by "Section links inside articles").
  • Check live posts in Admin for h1 headings and note the result here.

Acceptance criteria

  • Not done: The post editor's heading menu offers Heading 2, 3 and 4 only.
  • Not done: A post page has exactly one h1 (the title), even for a post saved with an h1 inside it; a test covers it.
  • Not done: axe passes on a post page; light and dark, 320 and 1280 wide checked.

Area

frontend, cms

Priority

low


Generated by Claude Code, opens in a new tab

See it on GitHub, opens in a new tab