Heading levels are an outline
On a page I audited last month the only `h1` was the logo, the section headings were all `h4` because `h4` was the right size, and the actual page title was a `div` with a class on it.
11 posts filed under HTML, newest first.
On a page I audited last month the only `h1` was the logo, the section headings were all `h4` because `h4` was the right size, and the actual page title was a `div` with a class on it.
An FAQ page arrived on my desk with about 200 lines of JavaScript running an accordion, and the two elements that do it natively have been in every browser since 2020 and got the missing feature last winter.
I have built the same modal four times across four projects, each one slightly different, each one getting a different two of the six behaviors wrong, and there has been an element for it since before the second one.
A 60 KB JavaScript date picker, and a plain text input for the phone number. Exactly the wrong way round in both cases, and the most common configuration I see.
I replaced a dropdown component last month and it went from about 180 lines of JavaScript to an attribute, and the six behaviors I'd hand-written were all better in the version I deleted them for.
I pressed Tab once on a client's homepage and focus went straight to a chat widget in the footer, past the entire page, because somewhere in that widget's markup was a positive number.
A client asked for the newsletter to match the new site, which is a completely reasonable request, and the answer involves explaining that the largest corporate email client in the world renders HTML using a word processor.
I reviewed a 400-line validation module last month and about 380 lines of it were reimplementing things the browser has done natively since roughly 2011.
Why the most-used string in my stylesheets is an invisible one, how CSS escapes will silently eat the character after them, and the parts of the content property that aren't strings at all.
Every conversation about page weight goes straight to minification. Meanwhile there is a 2 MB image on the page that nobody has opened since Photoshop.
Div soup is what you write before you learn what the other hundred elements are for. The argument for fixing it isn't screenreaders or SEO, it's the next person who opens the file.