Wednesday, August 13, 2008

Accessible government

Dizzy is getting in a tizzy with the Number 10 website.
Clearly the disabled, especially those who might be blind and using braille readers (how ironic) are not expected to look at the new Number 10 website. After all, it fails on numerous occasions to conform to accessibility compliancy which are apparently Government policy.

As you can see, by way of proof, Dizzy has run the site through the W3C Markup Validator and it has returned a number of errors. There is only one problem with his analysis...

The Markup Validator has almost nothing to do with Web Accessibility.

Anyone who thinks that their site is Accessible simply because their markup (that is the HTML, XHML, etc.) or CSS is entirely validated is deluding themselves. If you want to ensure that your site really is Accessible, then you'll want to start reading through the WAI guidelines. Don't get too into it though: there is a new set of guidelines coming out in the autumn.

As regular readers will know, your humble Devil works for a company whose main selling point is that our websites are Accessible, so I do regard myself as being something of an expert in this field (and there are others here who know far more than I do). Designing Accessbile websites is a lot more complicated than merely validating your markup; there are issues with colour contrasts, image tagging, link and form field labelling, media players and a whole host of other things. There are accessibility issues with the Number 10 website (a few of which I listed at Dizzy's), but they are not particularly serious from an actual accessibility point of view (although they are problems under the rules which the government has passed).

However, there are a number of problems with relying on the W3C validators—for markup or for CSS. The most pressing is that the W3C is hopelessly behind the times in terms of the technologies now being employed.

Take the issue of rounded corners, for instance, which I have written about before. Being able to render these through CSS saves an incredible amount of time and effort; at present, only the Gecko (Firefox, Camino, etc.) and Webkit (Safari, Webkit) engines support them and the standard has not yet been finalised by W3C. As a result, the two engines use a slightly different syntax when rendering separate corners, and you need to write the target browser into the code.

So, Mozilla browsers use this to give a top left corner with a 5 pixel radius:
-moz-border-radius-topleft: 5px;

And Webkit browsers use this to give a top left corner with a 5 pixel radius:
-webkit-border-top-left-radius: 5px;

However, writing these two lines of code is still considerably easier and less time-consuming than having to place background images and deal with all of the markup complications that go with it. Furthermore, these lines of code, targeted as they are, do not affect other browsers—such as the bastard IE7 and the absolute total bastard IE6—which simply see square corners (you can, of course, use conditional comments to apply the image corners to IE).

So, the code is not only easy, but a large selection of browsers can use this code to render the corners correctly. However, because W3C has not approved this code, it will come up as an error when run through their CSS Validator. And, naturally, this applies to all of the other cool attributes—CCS-rendered drop-shadows, masks, reflections, gradients, transforms, animations and more—which are being built into browsers as part of CSS3.

So how long will it be until the W3C finalises the CSS3 standard? Well, the estimate that I have heard bandied about is of the order of fifteen years! Fifteen. Fucking. Years. (And we can expect IE to implement CSS3 about fifteen years after that. If we're lucky.)

So, stuff IE and stuff W3C and stuff their fucking validators. Whilst they are a good place to start, be wary of putting your faith in them; you should certainly not rely on them to tell you whether your site conforms to Web Accessiblity rules, because they cannot do so.

If Web Accessibility matters to you, you might consider hiring us instead...

UPDATE: both Dizzy and Mike Rouse wonder if using WordPress was a good idea. Personally, I am a fan of Open Source web software, and anything which helps to keep down the cost of public sector websites is probably a good thing. The only thing that I would say is that personally I dislike WordPress intensely, both because of its dodgy installation procedure (buggered .htaccess files) but also because I find its templating system to be an absolute nightmare.


Stu said...

Hear Hear. Well said.

I use Wordpress, but largely because it was the first system I successfully installed and it's just too much effort to try and port my entire blog over to something else at this point.

It's my considered opinion, though, that Dizzy shouldn't be throwing stones!

FlipC said...

I am confused as to why anyone would conflate validation with accessibility. Sure it helps if your tags are correctly nested and you have alt text for all your images, but as you say that's not the be all and end all.

It's like... ah it's like this post when people complained about its position the first response of the council was that it met with all the guidelines as to distancing. Hardly the point though.

Anonymous said...

Even such a basic "environmentally friendly" feature as a print stylesheet is missing from the Number 10 website. Also the Government has very good standards guidelines on their own websites which this one fails to live up to. I cover these issues at:

Jeremy Clulow

NHS Fail Wail

I think that we can all agree that the UK's response to coronavirus has been somewhat lacking. In fact, many people asserted that our de...