UK Web Focus (Brian Kelly)

Innovation and best practices for the Web

Is The UK Government Being Too Strict?

Posted by Brian Kelly on 9 Feb 2009

I recently noticed a blog post published on the home page of the WASP (Web Standards Project) Web site.  The blog post, UK government browser guidelines: good sense prevails by Bruce Lawson, Opera applauded the UK Government for responding to pressure from the Web standards and Web development communities on its guidelines aimed at providers of UK Government Web services. The document initially stated that

… webmasters need not test in less popular browsers (those with less than 2% in that site’s usage statistics) and that there should be a page on the site listing the popular browsers which had been tested with the message “We advise you to upgrade your browser version as far as your computer allows and if possible to one of those listed above”.

Following over 400 emails made in response to a plea from Bruce, Adam Batenin, author of the document,  published a revised browser testing guidelines, and, according to Bruce “he’s done a great job of including best-practice development.” I too welcome that change.

However the guidelines also state (paragraphs 21-23) that:

All (X)HTML content must validate with respect to your chosen DTD.

Now although I’d agree with Bruce in his comments on the “importance of valid code” I feel that a formal requirement that all (X)HTML content must validate with the appropriate DTD will be counter-productive.

We should recognise that the vast majority of HTML content does not comply with HTML standards – and it will be difficult for one sector to deviate substantially from the norm. This situation is likely to be made worse as use of embedded Web 2.0 technologies grows (e.g. YouTube videos of the Prime Minister embedded in UK Government pages) as embedding these services  typical causes HTML validation problems.

Now such problems are (primarily) the responsibility of the third party Web 2.0 providers. And here we should be lobbying them to ensure that code to embed their content does not break HTML standards. But they might argue that, as global services, they need to be very conservative in making changes to services which work, even if they don’t necessarily comply to published HTML DTDs.  The companies could argue that they are being user-focussed in such considerations, as isn’t there some truth in this?  I can recall one hard-line ‘standardista’ who, on being told that a (University-developed) service didn’t render correctly in Internet Explorer, was told that the user should upgrade to a standards-compliant browser. And of course the university’s provided browser, was Internet Explorer! Such indulgences may occur in the public sector, but a commercial company which behaved likewise would soon find itself out of business.

As well as concerns that a formal requirement that UK Government Web pages must be fully HTML compliant may mean that pages aren’t rendered by the (flawed) browsers which people use, there is also a danger that this requirement will stifle developments and innovation in Government.

HTML itself has, sadly, proven a difficult language to evolve over time.  We are now in a position in which the usability and accessibility benefits which sensible use of AJAX technologies can provide and being made accessible to, for example, screen-reading software and assistive technologies through a standard known as ARIA. However use of WAI-ARIA (to use its official name) will normally mean that strict HTML compliance will not be possible. And when I’ve raised this issue with people involved in development of the standards and assistive technologies the response I have consistently received is that accessibility benefits which can be provided shown be prioritised over strict HTML. And this view has been endorsed in WCAG 2.0, which has dropped WCAG 1.0’s formal requirement for HTML compliance, requiring, instead, that markup elemnts are currectly opened and closed.

I would therefore suggest that the guidelines document should state that:

(X)HTML content should validate with respect to your chosen DTD.

After all, if the Web Standards Project Web site isn’t able to fully comply with the standards, should we expect every government Web site to?

And let’s also remember that these requirements only apply to (X)HTML content. If these requirements are too difficult to achive, won’t we see content being trapped in PDFs? You might, for example, like to think that the Digital Britain – Interim Report would be available as a HTML resource, but no, it’s only available in PDF and MS Word formats. But at least the such PDF documents won’t fail the government guidelines I’ve described. Let’s not pretend that mandating conformance with HTMLK guideines will result in better HTML documents. I’m convinced that it won’t – it will result in documents being provided in formats such as PDFs. And who bothers checking that PDFs conform with PDF standards?

5 Responses to “Is The UK Government Being Too Strict?”

  1. Chris May said

    The validation failure on you point to isn’t an HTML validation error, it’s a non-HTML error document being served with a text/html content-type and a 200/OK status code. If the correct code and content-type had been used, the validator would never have touched that page.

    One could argue that’s validator is partly to blame here, as it appears to have fetched the URL as the result of traversing a [link rel=’pingback’] element, rather than an [a] element. Browsers would never display such a link; end users wouldn’t ever see it, so arguably this is a broken spider.

    As to whether the word ‘should’ or ‘must’ ought to be applied to validation; this document is a guideline, not a rule, so isn’t there already enough wiggle-room without needing to add another cop-out clause? I know that some of the sites that I’m responsible for have validation errors, but I view each and every one of those as a bug that needs fixing, not as something that is acceptable in moderation.

  2. Hi Chris – the first error is a non-HTML errors; however the subsequent errors are HTML errors (e.g. reuse of unique IDs).

    Although the document may be regarded as providing guidelines the danger is it a policy is applied externally which mandates such guidelines.

    That’s not to say that the HTML errors I’ve mentioned shouldn’t be fixed.

  3. bruce said

    You make a good point. It is possible to embed youtube videos using vaild code, see Ian Hickson’s nested object method

    I worry more about WAI-ARIA which is a Jolly Good Thing but doesn’t validate.

    Perhaps it should ben a “should”?

  4. it’s probably the geek in me, but i used to like the bit in a former version of WCAG 2 along the lines of code must be able to be “parsed unambiguously”…and i think that’s the key, not validation. if i add custom or non-standard attributes, or make up new elements, or whatever, as long as the document is well-formed (so as not to trigger potentially different error-handling compensatory actions by different browsers which could result in different DOMs) and still uses correct structural code it should not pose any interoperability, accessibility, etc issues.

    a long-winded way of saying: yes, agree completely.

  5. p.s.: looked into the issue you’re having with not being able to leave comments on WaSP itself…but can’t seem to find any cause for the problem?!

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: