Intent to Prototype: headingoffset & headingreset attributes

402 views
Skip to first unread message

Keith Cirkel

unread,
Jul 1, 2025, 9:18:54 AMJul 1
to dev-pl...@mozilla.org
Summary:
  Adds the `headingoffset` and `headingreset` global attributes, which provide a way to create containers with dynamic heading structures.

Bug:

Specification:

Standards Body:
  W3C

Platform coverage:
  all.

Preference:
  dom.headingoffset.enabled

DevTools bug:
  N/A

Link to standards-positions discussion:
  N/A

Other browsers:

web-platform-tests:
  None yet, will be written during prototyping phase.

Websites which allow users to write comments or documents (User Generated Content - UGC) rely on users to produce meaningful heading structures for their written content. This can be difficult for a user where this content is presented on different surfaces (web pages or applications) that have different document structures. Giving web developers a headingoffset attribute frees users from trying to pick the correct heading level (they can always start their comment or document at h1), and makes it significantly easier for web developers to render blocks of UGC without rewriting the UGC authors defined heading structures.

In combination with the `:heading`/`:heading(AnB#)` selectors (https://groups.google.com/a/mozilla.org/g/dev-platform/c/SlPKz6WrEv4/m/M54qEUuBAgAJ) this will provide feature a robust mechanism for an opt-in replacement of the structured headings feature recently removed from the HTML specification.
Reply all
Reply to author
Forward
0 new messages