[Accessibility_sig] question re javascript libraries

James Craig james at cookiecrook.com
Mon Feb 12 20:29:30 CST 2007


Amy Gelfand wrote:

> The "accessible" part of JavaScript for me is just the notion of progressive
> enhancement. If the user has a smart modern browser, he gets a little
> something extra. If the browser doesn't understand the DOM or if javascript
> is turned off, the user won't realize he's missing something. I never rely
> on JavaScript as the only means to display vital content.

That's the only way to do it, but be careful you don't add "something
extra" that makes the page inaccessible. For example, all the
libraries would make it really easy for you to cancel "click" events
and replace them with "mousedown" events, making some links
inaccessible to the keyboard (it's not as stupid as it sounds; there
are reasons for doing this, but almost none of them have anything to
do with accessibility).

Most modern screen readers have no problem with JavaScript, and there
is nothing inherently inaccessible about any of the JavaScript
libraries but there are many implementations and examples that are
entirely inaccessible.

The biggest gotchas usually come from updating content via ajax
(typically known as an update panel) that 1) is unavailable w/o
JavaScript, and 2) has no way of indicating to the screen reader that
the content has been updated. The other main gotchas come from
forgetting to make sure your progressively-enhanced interface can be
accessed from the keyboard or through an otherwise spoken interface.

Dojo and YUI seem to be the libraries that have included the most
conscious accessibility work, though they still have a long way to go.
If that's not depressing enough, here's a good article by James
Edwards (brothercake) that explains why accessible ajax is still next
to impossible.

Accessible JavaScript: Beyond the Mouse
http://www.sitepoint.com/article/accessible-javascript

Dojo JavaScript Toolkit
http://dojotoolkit.org/

Yahoo User Interface (YUI) JavaScript Library
http://developer.yahoo.com/yui/

Cheers,
James



More information about the Accessibility_sig mailing list