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)
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)
Updated•16 days ago
|
Comment 1•16 days ago
|
||
: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>).
| Reporter | ||
Comment 2•15 days ago
|
||
(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
headingin the tree - perhaps they could display asheading(<level>).
Sure, I filed Bug 2044590 for this
Comment 3•11 days ago
|
||
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.
| Reporter | ||
Comment 4•10 days ago
|
||
(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
headingin the tree - perhaps they could display asheading(<level>).Sure, I filed Bug 2044590 for this
We already had bug 1588784 for this, so I did the work there
Description
•