News for hackers. Stuff that matters.
Re:Default styles for h1 elements are changing by superkuh on Thursday April 10, 2025 @10:40PM (#43649992)
Good. <h1> tag should be <h1> no matter where it is. It shouldn't change; at least not by default. Even better that this change back to the old way will fix a problem for accessibility for screen readers.
Re:Default styles for h1 elements are changing by mjevans on Thursday April 10, 2025 @11:04PM (#43650117)
I agree with this.

Further <h1> with only the default style SHOULD NOT BE A WARNING. At least make it only warn if 'h1's are nested.

Re:Default styles for h1 elements are changing by sfink on Friday April 11, 2025 @12:01AM (#43650406)
The article seemed to repeatedly suggest that any <h1> without a font size set would be a warning, but reading more closely I'm pretty sure it's only talking about <h1> nested within <section> etc. (So I believe Lighthouse and Firefox are both already doing what you describe in the last sentence.)
Re:Default styles for h1 elements are changing by alexpetros on Friday April 11, 2025 @12:20AM (#43650481)
I'd love the article to clarify this, because it stuck out to me as well. But as you pointed out, I think that's what they meant: the lighthouse warning is called "H1UserAgentFontSizeInSection"
Re:Default styles for h1 elements are changing by mjevans on Friday April 11, 2025 @12:26AM (#43650503)
I still think even one within a section (or even div like nested sections) shouldn't be a warning... but I hadn't heard of <section> until today (seemingly it's been in browsers for decades, I just hadn't seen it USED anywhere) so I'm not sure if that implies something other than a logical structural block. From the context it seemed like a different type of div or span.
Re:Default styles for h1 elements are changing by Cthulhu_ on Friday April 11, 2025 @03:32AM (#43651358)
"decades" I had to look it up, it's been 15 years apparently, with HTML5 being 17 years old... I quipped to my colleague that I'm still stuck at XHTML. Mind you, that's also because in 2008 we still had to support Internet Explorer 6.
Re:Default styles for h1 elements are changing by marcosdumay on Friday April 11, 2025 @12:53PM (#43655918)
Sections are a very good idea for a tag that embedded a document in a lower hierarchy inside your document. The way that it should be from the beginning instead of having the global h1, h2... and hacking a structure out of them.

But then screen readers universally decided that no, instead of using sections to navigate a page, they will just ignore the spec and flatten everything into the top of the hierarchy. So nobody uses them.

(And yes, it shouldn't be a warning to use an h1 in a section with the default style either. They are just making a non-backwards-compatible change to the default style, fucking own it and have the old pages change.)

Re:Default styles for h1 elements are changing by zcorpan on Friday April 11, 2025 @06:04AM (#43652246)
This is already the case, the warning is only for h1 in article/aside/nav/section. I'll fix the article to make this clearer, thanks.