Almost nobody pays attention to web standards anymore
devops
Screen readers suffer as nearly 90% of top websites tested contain HTML spec violations
Are web coders losing their respect for standards? A recent review of the world’s largest sites suggests so.
ValidateHTML, a project by independent French developer Théo Ducreux, examined the contents of the 5,000 most widely used web domains, as estimated by the Tranco research project. They include the usual suspects (Google, YouTube, Akamai) plus those without public-facing components (Google’s “gstatic,” EZVIZ’s “Ezviz7”).
Ducreux found more than half – 2,656 sites – served a home page readable by humans. Many of the others, such as Google and EZVIZ’s, were just traffic redirection sites, a beacon for a company’s products to call home.
Headless or not, nearly 90 percent of these sites were not serving proper HTML, as specified by the World Wide Web Consortium (W3C) and the WHATWG (Web Hypertext Application Technology Working Group). These standards are important so that different browsers and reading tools can render the requested pages in more or less the same way.
Ducreux tallied a total of 100,305 HTML violations (including the most recent HTML5 specs) across all these sites, plus an additional 18,863 CSS errors. In other words, 87.2 percent of sites violate web specs in at least one place. Only 12.8 percent have fully valid HTML. And only 2.6 percent of all sites are completely clean, returning zero errors and zero best-practice warnings.
More alarming, over a third of sites failed accessibility checks, which to their owners is more of a legal liability (and hence a compliance issue) than an embarrassment, given the potential reach of the 2025 European Accessibility Act. (Here in the U.S., woe be the accessibility-inconsiderate e-commerce site that raises the ire of the National Federation of the Blind.)
Accessibility-wise, 20.4 percent of sites are missing alt text on images, which often contain vital information. Worse, 41.6 percent of pages are missing ARIA labels that identify page regions, potentially leaving screen readers struggling to convey the page's structure. Here’s an iframe, figure it out.
“Screen readers don't have anywhere near the error tolerance Chrome has, so markup that looks totally fine to you can be broken for someone using assistive tech,” Ducreux told The Register.
For the project, he used a home-built web crawler and a set of open-source parsers (HTML-validate, CSS Validator, Lightning CSS, fast-xml-parser). “The site, the scoring, and the crawl logic are my own code,” Ducreux explained by email. Ducreux is the principal maintainer for the project and the site. "No team, no funding, no company."
An electronic Tower of Babel
Does lack of adherence to standards really matter? It's an open question.
“The web is more a social creation than a technical one,” web creator Tim Berners-Lee wrote back in 1999. If we all go off and make our own standards, then it's harder to connect and communicate.
The currently fashionable Dead Internet Theory – in which AI machines and not we meat sticks now make up most internet traffic – won’t get developers off the hook. As Shopify engineers have found, even superintelligence prefers shipshape markup.
Browsers deserve part of the blame. Unless they have a fetish for the short-lived but brutally unforgiving XHTML, browsers today will just ignore any code they can’t grok.
“Browsers are so good at error recovery that nothing forces anyone to fix” their code, Ducreux wrote on the site, “which is exactly why it accumulates.” Indulgence encourages slothfulness.
Front-end frameworks create their own mischief. The single most common failure identified (in more than 59 percent of all the sites) is the misplaced element, aka incorrect tag nesting. Did you know you're not allowed to put a style element within a div box? Many frameworks do, evidently.
“It is a nesting problem created at build time, not in an editor,” Ducreux wrote on the site. “Nobody writes that by hand.”
Many folks believe sloppy HTML is no big deal, including some in the peanut gallery at Hacker News. One contributor noted that “HTML5 defines a method for turning more-or-less any sequence of bytes into the same DOM tree,” DOM being the Document Object Model the browser uses to understand a web page.
Ducreux himself doesn’t see bad HTML as an existential threat to the web, outside of hindering accessibility, which can leave someone guessing at online content they may really need to understand.
“Honestly, most invalid HTML doesn't break anything visible, browsers are built to guess what you meant and just patch it silently,” he wrote by e-mail. But at the same time, the web isn’t just about browsers.
“AI agents reading pages, voice assistants, translation tools, screen readers – none of them have Chrome's 20 years of guessing your intent,” he wrote. “Writing to spec is what makes a page mean the same thing to all of them, not just to whoever's rendering it in Chrome that day.” ®
What's Your Reaction?
Like
0
Dislike
0
Love
0
Funny
0
Wow
0
Sad
0
Angry
0
Comments (0)