yatil/accessifyhtml5.js — pull request #14 by nfreear (2013-03-18 16:07:21+00:00)
Title: Pull: support for arbitrary HTML 4 documents, plus unit tests

Hi Yatil,

As proposed in #12 and #13, I've implemented support for arbitrary HTML 4 documents via a second argument to the function:

```Javascript
AccessifyHTML5( false, {
"My selector": {
role: "banner",
"aria-label": "My label"
}
/* More fixes.. */
});
```

There are two unit-test pages,

* [OU: .. accessifyhtml5.js/test/bjs1.html](http://iet-embed-acct.open.ac.uk/dev/accessifyhtml5.js/test/bjs1.html)
* [OU: .. accessifyhtml5.js/test/bjs2.html](http://iet-embed-acct.open.ac.uk/dev/accessifyhtml5.js/test/bjs2.html)

As I have noted in the code `//Question: ..?`,

1. In calls to `document.querySelectorAll`, should we catch exceptions and report (or ignore) bad selector syntax?
2. And, should we accept poor spelling/ variations in some attributes? For example, `aria-labeledby`, `labelledby-ref`...

To help explore these points, I've knocked together a rough 'validator',

* [Dropbox: .. wai-aria/validator.html](http://dl.dropbox.com/u/3203144/wai-aria/validator.html)

Thanks, Nick