WORK-659
ID:WORK-659Status:draft

section's header grammar is anchored to the headline, with a header attribute and a slot-role warning

section reads a leading paragraph as an eyebrow even when no heading follows. A composition that places prose in a section gets it re-roled without any warning, and so does a standalone section used as a region with media. ADR-046 anchors the grammar to the headline, adds a header attribute, and warns when slot content lands in a header role it is not named for.

It lands before WORK-653 and WORK-654, which both compose over section.

Priority:highComplexity:moderateMilestone:v0.43.0Source:ADR-046,SPEC-160
changeset-release/main View source

Criteria completion

Criteria completion: 0 of 9 (0%) checked; tracking started on Oct 24, no incremental history yet0%25%50%75%100%Oct 24Oct 28

Tracking started Oct 24 — check back for trends.

Branches 3
History 1
  1. 65f872e
    Created (draft)by github-actions[bot]

Acceptance Criteria

  • Before anything changes, fixtures record today's output for: SPEC-169 D4's steps example, a composed testimonial placing quote and attribution slots, character with and without its metablock, a standalone section with only paragraphs, and a standalone section with media and paragraphs
  • With no heading, a section has no header and all content is body; an eyebrow is only a paragraph directly before the headline, and a blurb only a paragraph directly after it
  • section accepts header (auto | headline | none, default auto); headline lifts only the headline, and none reads no header
  • Content carrying a slot marker that fills a header role whose name differs from the slot's produces a build warning naming the composed rune, the slot, the role and both remedies; the rendered output is unchanged by the warning
  • The existing composed fixtures (bond, character, lore, realm, faction) render unchanged and raise no warning
  • The recorded fixtures' new output is reviewed and every change explained in the resolution
  • inspect, reference and the section docs page show the header attribute and the anchored grammar
  • Contracts are regenerated on both copies and the diff reviewed; the SEO baseline does not move
  • The changeset names the change for content with no heading

Approach

  • The slot markers (SPEC-145 D10a) are on the AST before transform, so the check reads the marker of whichever node fills eyebrow, headline or blurb.
  • Give the warning its own error id, so it can be disabled through validation.disableIds like any other.
  • The native page-section runes keep pageSectionProperties (ADR-046 decision 4). This item changes only section.

Blocked by

  • WORK-651: the body role, so the anchored grammar's body is the declared one

References

  • ADR-046
  • SPEC-160: D9.
  • SPEC-169: D4.