← All topics

11 posts filed under HTML, newest first.

6 min

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.

HTML Accessibility
6 min

details and summary

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.

HTML Accessibility
6 min

dialog

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.

HTML Accessibility
6 min

The input types nobody uses

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.

Forms HTML
6 min

The popover attribute

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.

HTML Accessibility
6 min

tabindex

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.

Accessibility HTML
7 min

HTML email is stuck in 1997

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.

HTML Cross-Browser Compatibility
7 min

Constraint validation

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.

Forms HTML
7 min

content: "\00a0"

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.

HTML CSS
7 min

The 400 KB hero

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.

HTML Images Performance
6 min

Everything is a div

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.

HTML Cross-Browser Compatibility