A Call for Consensus on HTML Semantics

Jan 20, 2024

HTML is supposed to be easy to learn. And sure, the basics are pretty clear, like when to use a p over an a. (But, lol, watch out for when to use a vs button)

There are several scenarios I think will plague me til the end of my webdev days, especially with a push towards components and templates that are to assume a consistent hierarchy (ha!) particularly when aiding dynamic and/or user-generated content but should also be accessible, scalable, maintainable, and provide an inclusive user experience. Woof.

Perhaps you want to build something that seems simple on the surface, like a blog. Suddenly you are faced with some gray-area scenarios, such as:

Or heck, let’s back up and examine the home page, too.

You'll find a few opinions on each of these things (particularly section vs article) but my point is that it's never clear cut and certainly not simple.

Oh look, a dashboard has entered the chat.

(But really, start with your landmarks, and work to deeply understand your workflows, content hierarchy, and users before you simply choose an off-the-shelf component with no semantic flexibility, mmmk?)

WHO HAS THESE ANSWERS? WE’RE ALL JUST DOING OUR BEST! AND NOW WE HAVE TO DEAL WITH AI PRETENDING TO BE OMNISCIENT AND DELIVERING CONFIDENTLY WRONG ANSWERS TO MILLIONS OF DEVS OF ALL SKILL LEVELS HOW WILL WE EVER GET IT RIGHT IS HUMANITY DOOMED TO BECOME AN ABLEIST HELLSCAPE WHAT EVEN IS THE WEB.

Ahem. Pardon me.

All this to say... HTML markup is a skill that is honed in the fires of experience that may be learned but never mastered, but it is an honorable and worthy battle.

Please help.

(Also, you should hire front-of-the-front-end specialists who actually care about these nuances and accessibility specialists to help jump these hurdles and ux researchers to put in the work and find out about your real users and and and… don’t rely on AI, please. Pretty pretty please.)