Open Bug 2044336 Opened 16 days ago Updated 10 days ago

Surface "computed" heading level in markup view when it's different from what the tagName implies (i.e. when headingoffset is used)

Categories

(DevTools :: Inspector, enhancement, P3)

enhancement

Tracking

(Not tracked)

People

(Reporter: nchevobbe, Unassigned)

References

Details

The headingoffset attribute can impact the level of heading used in the subtree (see https://html.spec.whatwg.org/multipage/sections.html#heading-levels-&-offsets)
This level is properly surfaced in the Accessibility panel, but it's a bit hidden.
Maybe we could somehow display the actual level directly in the markup view
Maybe we could have a :heading(<level>) text displayed after the closing tag (in a similar way to our non-interactive badges)

See Also: → 2044348
Priority: -- → P3

:heading(<level>) in the inspector sounds ideal.

Given how important the level is for accessibility, I also think it should be clearer in the accessibility panel. Right now headings display as heading in the tree - perhaps they could display as heading(<level>).

(In reply to Jake Archibald [:jakea] from comment #1)

:heading(<level>) in the inspector sounds ideal.

Yeah, we might also have some kind of warning icon with a useful title when the heading level was capped (if I read the spec correctly, it can't go over 9)

Given how important the level is for accessibility, I also think it should be clearer in the accessibility panel. Right now headings display as heading in the tree - perhaps they could display as heading(<level>).

Sure, I filed Bug 2044590 for this

See Also: → 2044590

Yeah, it can't go above 9. There are some screen readers that can't cope with anything above 6 https://adrianroselli.com/2024/05/level-setting-heading-levels.html, but maybe we can assume they'll eventually fix that.

(In reply to Nicolas Chevobbe [:nchevobbe] from comment #2)

Given how important the level is for accessibility, I also think it should be clearer in the accessibility panel. Right now headings display as heading in the tree - perhaps they could display as heading(<level>).

Sure, I filed Bug 2044590 for this

We already had bug 1588784 for this, so I did the work there

See Also: 20445901588784
You need to log in before you can comment on or make changes to this bug.