Summary: The HTML Standard has for the longest time defined a feature
whereby you could exclusively use the h1 and sectioning elements, and
user agents would take care of adjusting the heading level according
to the nesting depth. Due to the complexity it never got adopted.
There’s an alternative proposal that amounts to counting sectioning
element ancestors for h1 elements only (and h2-h6 if their parent is
hgroup), which is much more doable performance-wise. That proposal
might see some further refinements for behavior around hgroup, based
on discussion in the issue linked below.
(https://annevankesteren.nl/2019/10/heading-levels goes into the
high-level idea a bit more.)

The idea is to ship this by default on Nightly and maybe Dev, but not
ride the trains (until the standard is more fully agreed and there's
an intent to ship).

Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=998590.

Standard: https://github.com/whatwg/html/pull/3499 coupled with
https://github.com/whatwg/html/issues/5002.

Platform coverage: All.

Preference: accessibility.heading-element-level-changes.enabled.

DevTools bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1588784.

Other browsers: Have expressed mild interest to get to it eventually,
us having some code hopefully gets them more fully on board.

web-platform-tests: Unclear how to test heading levels, but once
there's a corresponding CSS pseudo-class to expose them there will be.

Secure contexts: No, bifurcating an existing HTML feature like that
doesn’t seem like a good idea.

Is this feature enabled by default in sandboxed iframes? Yes.
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to