Google was very lucky to hire Mark Pilgrim, web standards expert and cranky genius. Congratulations to him on for the launch of Google Doctype, a website that documents fancy HTML, CSS, and DOM tricks that we all use. The current practice of rich webapps is way beyond the official standards and it's good to see Google take some leadership in documenting how things should work.

So it's a bit mind-boggling to me to find this bit of HTML on the front page (URLs elded) that breaks the most basic element of the web; clicking on a link.

<a href="http://code.google.com/..."
  onclick="window.location='http://code.google.com/...';
  return false
">Browse Google <span class="doctype">Doctype</span></a>
What's that? Well, it looks like a link to the actual important content; "Browse Google Doctype". But because someone put an onlick handler on it, it's not actually treated like a URL when you click on it. Instead, when you click on it the Javascript is executed to navigate you to the URL. Unfortunately, when you shift-click on it the Javascript also navigates you. Rather than doing what the user would expect, open the link in a new window.

I know, it's a little thing. But it's a horrible little thing, the kind of thing that so many "smart websites" do wrong and break the web standard UI. My understanding of Google Doctype is that it's a whole project about helping developers avoid this kind of mistake.

Update: the site has been modified; just plain HTML links now. Hooray!
techbad
  2008-05-14 21:52 Z