Unobtrusive JavaScript is not necessarily accessible JavaScript
Plenty of JavaScript demos and tutorials that you come across on the Web note that they are implemented using unobtrusive JavaScript. While that is great and should always be encouraged, some people seem to believe that unobtrusive JavaScript equals accessible JavaScript. That is not always the case.
Unobtrusive JavaScript is normally mentioned to emphasise that a script uses progressive enhancement to cater for people who use a browser without JavaScript support. But that does not mean that a script is accessible, since two key accessibility issues tend to be overlooked – keyboard navigation and screen readers.
One example of this is most lightbox clones (I expand a bit on that in Lightboxes and keyboard accessibility), which can be difficult to use without a mouse and confusing for screen reader users. There are also many widgets (datepickers, dialogs, custom form controls, etc.) that, despite being unobtrusive, do not work well or at all for keyboard or screen reader users (yes, most screen reader users have JavaScript enabled).
So, just a heads up that even though a script is implemented in an unobtrusive way, it isn’t necessarily accessible.
- Previous post: Embedding video files without JavaScript
- Next post: XHTML Media Types Working Group Note updated