Ethan Marcotte now blogs at Unstoppable Robot Ninja.

Weblog entry:

Better living through standards

Dear, sweet weblog: how I’ve missed you.

Apologies to the three of you for falling out of a regular posting schedule. Things at the Harvard gig have been busy of late: you see, I’ve been rediscovering what a poor, deluded web developer I used to be.

A little backstory (oh, you knew this was coming): about two years ago, I was leading up the UI development for this new application my team was building. The big shiny-shiny-shiny request from the marketing team was, of course, DHTML menus.

Our users should be able to access every page of our site through, you know, drop-down menus, they said.

No problem, I said.1

Oh, and it has to work in Netscape 4, they said.

No problem, I said.

Thus tasked, I set to work. Sparing no time or resource, I hauled out my trusty DHTML API, my sexy little browser detector, militant little object constructors: in short, lines and lines (and lines and lines) of gorgeous, sexy, pristine, JavaScript. I scripted, I tested, I spun code like a fiend. I exulted in my document.write()-fu, poring over the gospel words of Brattli, LePera, Champeon. I was, of course, a fiery, golden god of onmouseout proportions.

Never mind about the markup. We’ll get to that later.

After a few days of work, my beloved menus were ready.

Looks great, they said. Even better, Netscape 4 loves them!

I know, I said.2

Never mind about the markup. We’ll get to that later.

Of course, the punchline is that now is later. I’ve taken on converting parts of the application’s UI to valid XHTML/CSS, in order to quickly clear up some of the accessibility problems with which the application’s been plagued—the result is that I’ve been reaping what I’ve sown. The mess of divs and tables I’d used to make Netscape 4 play nicely looked like an absolute horror to anyone not JavaScript-enabled. So while the solution I’d implemented was the right one, it probably wasn’t a good one: our wonderful little application may have been inaccessible to roughly 13% of our users. So I bid a fond farewell to my beloved JavaScript, and spent the next few days slogging through horrible, horrible markup. It was a housekeeping initiative best undertaken with liberal amounts of napalm…and all I had was my disarming smile.

Of course, at the end of the day, I’ve had something reaffirmed for me as well: folks, it’s not worth working without web standards any more. That’s it: no zealotry, no nothing. If I’d started with a foundation of valid, well-structured markup that was styled by CSS and scripted through the DOM, I wouldn’t be ranting at you today.3 But now, I’ve a solution in place that’s about 60% lighter than the previous one, degrades gracefully to older, non-compliant browsers, and ensures that I won’t have to deal with another “later” in another two years.

Less code, more accessible, longer lasting.

Thus endeth the rant.

1 I may have nodded sagely in my markup munificience, or some such thing. I was such a dick.

2 Probably again with the nodding. Damn, but I hate the old me. You should, too.

3 And yes, you’d be much happier for it.


Hooray, technical difficulties.

There’s a WordPress issue that’s currently preventing old comments from displaying correctly. Sorry for the inconvenience, but hopefully we’ll be back online soon.