The Accessible Web

barbie on 2004-03-17T13:58:47

A friend recently asked me about whether I knew about the JAWS screen reader. Unfortunately I'd never heard of it, although I suspect another friend of mine (who works for the RNIB and is blind) may use it. However, it did prompt me to wonder.

In October 2004, the final phase of the DDA comes into force, which will mean many websites will need to be changed so they don't fall foul of the law. Especially seeing as the RNIB have already funded cases that have appeared in Crown Court. Allowing accessibilty to people who use screen readers and the like, I think its quite an important area of web design, as it enables as many people as possible to view your web pages. Previously my friend at the RNIB has made comments on my websites to prompt me to fix tags and such. But that was back in the days when I was just starting (1998). However, it should be noted that only services offered via the web (eg Airline ticket booking) are currently covered by the Act.

So I wondered if there is anything (in Perl) that can check your HTML to see whether it meets the requirements. As yet I haven't found anything. My thought was to create a module called HTML::Accessibilty, which can be called similar to Test::Pod, and can report on failings, missing titles, tab indices, etc. I've gone so far as to find a a few really useful sites. So when I have more time I may attempt this, unless someone with CFT decides to give it a go before me.

Interesting aside: use.perl striped all the 'title' attributes above, which are part of the accessibility requirement.


Bobby

ajt on 2004-03-17T14:26:46

There is Bobby which is Java based. It's not perfect but it's good at pointing out possible problems.

Bobby tests for both W3C WAI or US 508, but it's not perfect. I don't know of other tools, if anyone else does I'd like to know about them.

I beleive that Betsie the BBC's screen reader is Perl based, and open-source, but it's a little antiquated and it does struggle with really awful sites.

I believe that use Perl; hijacks the title tag to show the TLD of the link, if you have your settings configured to add domain details.

Re:Bobby

barbie on 2004-03-17T14:51:12

Thanks for the links will look into them. I did have the TLD flag setting in my preferences, so will have to see if that makes a difference in my next link :)

Decided a better name for the module might be HTML::Lint::Accessible seeing as it really is just an extension of HTML::Lint.

Re:Bobby

ajt on 2004-03-17T15:09:05

I've used Bobby on and off for a while. It's not perfect, it often says thinks like "have you checked this?" rather than tell you anything specific. As a result it reports both false positives, and misses actual problems, but it's a good first line.

I think that the more recent HTML Tidy does some WAI checks too. As it's now a c library, and accessabile from Perl, (HTML::Tidy) that's another avenue to look at.

At the end of the day, automated tools can only go so far, but they are a good place to start.

It's nice to know that there is at least one more person thinking about accessability.

Re:Bobby

vsergu on 2004-03-17T21:54:11

To be fair, I don't think any automated tool can avoid having false positives or false negatives, barring amazing advances in AI. For example, a tool can't know whether an image is purely decorative (and thus needs an ALT attribute of "") or whether any ALT text is meaningful (as opposed to some mindless combination of filename and file size, as some authoring tools have been known to generate).

Re:Bobby

ajt on 2004-03-18T09:12:33

This is true, it's an automated tool, and it can't know if object on the page is accessible, important or trivial padding. It's a good first line, but that's all.

Many web automated web page creation tools do produce awful and inaccessible web pages, so at the end of the day all pages need to be checked by hand to be sure that they are good. Like you said simple minded rules in Dreamweaver are not going to make web sites accessible, people need to think for them selves to produce good sites, instead of relying on design crutches.

Re:Bobby

hex on 2004-03-26T10:14:27

I beleive that Betsie the BBC's screen reader is Perl based

Ew, regex based HTML parsing!

Re: The Accessible Web

domm on 2004-03-17T16:36:06

I was in a project some time ago that involved converting ~20.000 HTML pages of inferior quality (coded by civil servants of various departments) to valid, WAI-conform HTML.

We used tidy to validate WAI-level 1 conformity and it worked quite well. (although we used the command line version, as the lib wasn't really finished then).

To convert the messy HTML to valid HTML we used HTML::Parser and a hell lot of code specially tailored to this project. I do not think that you can write up a generally working converter (unless you don't care about the design :-)

Re: The Accessible Web

barbie on 2004-03-17T17:30:55

I wasn't thinking of a converter, more a simple checker, that can spot whether titles appeared in links, or that tabindex entries didn't clash, etc. If HTML::Tidy does that then so much the better. I can't see me ever having time to write a converter, as that would be way too much work for all the edge cases that might appear. A list of simple warnings is much better, so that you can fix your templates [1] by hand.

[1] I couldn't envisage editing 20,000 pages!

if you use mozilla/firebird/netscape...

wickline on 2004-03-18T14:12:22

checky will let you run most/all of those tools (and many others) at the click of a mouse or press of a button.