Browsers are the wrong place to report HTML validation errors

January 20, 2007

A popular idea for dealing with 'malformed' HTML is to have the browsers warn users about it (the most recent example I've run across is in comments here), on the theory that this will cause authors to make their HTML validate. Unfortunately, doing this is about as useful as showing error pukes to website visitors, and for the same reason: it is reporting the problem to the wrong person.

Almost everyone visiting your site is a visitor, not the site's author. It follows that almost every time this hypothetical 'page is malformed' error would go off it would go off to a visitor, who can't do anything about the problem, instead of to the site's author (who can).

The usual retort is that the site's author can visit the page as the final step in publishing and see the warning and do something about it. This is a marvelous theory, but (I argue) incorrect in fact, in part because it assumes that site authors actually bother to check their work, and in part because it assumes that site authors are going to notice a little status notice any more than they notice any of the other little broken things that they let slip by now.

(And if site authors do care about validated HTML they are probably already using one of the validation tools to check their pages, and this feature would not be a particularly big bonus to them.)

This is also a terrible feature from a pragmatic user interface point of view: on today's Internet, it would be the boy who screams wolf all the time, because a rather large number of the pages out there do not pass validation. Such a warning notice would be on a lot; if it is intrusive it gets in your face almost all the time (about something you can't do anything about), and if it's not intrusive it's pretty much a noisy waste of space. This is not a winning user interface element.

(But if you really want it, you can get Firefox extensions that do this.)


Comments on this page:

By DanielMartin at 2007-01-20 15:07:37:

It would seem to me then that the natural thing would be either HTML validation in editing tools (which won't help those of us who edit HTML in vi) or to have validation done by firefox plugins that do something very obvious on invalid pages, but only where you (the user) have configured the plugin to report invalid pages.

What I imagine is a validation plugin that by default displays something very subtle - a small smiley face or "Mr. Yuck" face in the bottom-right corner - however, on any page you can right-click on the validation face and say "warn me prominently about errors on this domain" or "warn me prominently about errors on pages whose URLs start with http://utcc.utoronto.ca/~cks/". Prominent warnings would likely take a form similar to the bar you get at the top of the browser when firefox blocks a pop-up.

There are at least three types of potential web authors when it comes to validation: those who will never care, ever; those who will set up automatic validators to check everything periodically; and those who care a little bit, and will validate their stuff if it's easy to do. Obviously, I'm trying to address that third group.

By cks at 2007-01-20 18:18:12:

An optional plugin is OK, because only interested people will install it. One that is present by default is not, because most people are not going to be interested in what it reports (most people could care less if the HTML of the web page they're visiting validates); this makes it, as a minimum, a waste of UI space and user attention.

(You could make it have no visible presence unless specifically configured, but then the question is why are you carrying around a not insignificant pile of code in the default build that most people are never going to use?)

From 67.181.30.74 at 2007-01-22 19:16:37:

I think you're missing one small, but important detail. As a site author, I'm not interested in what validators have to say about my HTML. Any time I tried to use a validator, it was a major pain in the ass to no discernable effect. Plus, they can't make their freaking minds about anything. Today they want your P to be closed with /P, tomorrow they bitch about /P. However, I'm quite interested in what the actual browser thinks about my HTML.

I am sorry if I worded it wrong, but I still think it would be great if browsers reported errors, in a separate window available from Tools menu (Oh and BTW, it seems that Firefox 2 adds just that! I'm going to examine it further.).

Written on 20 January 2007.
« Link: Peter Gutmann on PKI
Weekly spam summary on January 20th, 2007 »

Page tools: View Source, View Normal, Add Comment.
Search:
Login: Password:
Atom Syndication: Recent Comments.

Last modified: Sat Jan 20 00:29:18 2007
This dinky wiki is brought to you by the Insane Hackers Guild, Python sub-branch.