Console warning when using h1 in article/aside/nav/section without author-defined font-size or block margins
Categories
(Core :: Layout, task)
Tracking
()
People
(Reporter: zcorpan, Assigned: emilio)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
See https://github.com/whatwg/html/issues/7867#issuecomment-2541654834
I envisioned logging a message when h1 in a sectioning element is rendered but doesn't have author-defined font-size or block margins. When the change has shipped everywhere, there's no need for the warning anymore.
This would need to differentiate author-origin styles vs UA-origin styles.
Reporter | ||
Comment 1•2 months ago
|
||
From discussion with :emilio
We have ways to know whether a property is author-specified
But it'd be a bit expensive having to walk the ancestor chain unconditionally
Maybe we can have a UA-origin-only custom property added to the UA stylesheet
:is(section, aside, article, nav) h1 { -moz-has-sectioning-ancestor: 1 }
Then check the value of that somewhere?
Well sure, that'd at least use the bloom filter I think
Still probably overkill
Reporter | ||
Comment 2•2 months ago
|
||
A use counter would be nice here also.
Assignee | ||
Comment 3•2 months ago
|
||
Updated•2 months ago
|
Updated•1 month ago
|
Reporter | ||
Comment 6•1 month ago
|
||
Comment 7•1 month ago
|
||
A patch has been attached on this bug, which was already closed. Filing a separate bug will ensure better tracking. If this was not by mistake and further action is needed, please alert the appropriate party. (Or: if the patch doesn't change behavior -- e.g. landing a test case, or fixing a typo -- then feel free to disregard this message)
Comment 9•1 month ago
|
||
bugherder |
Description
•