javascript and ‘accessibilty’

A response to an nypl post. (As I’m often doing these days, I made a comment there, and then created a 2d edition here with a bit more content. )

It’s quite possible to build websites that work fine without javascript, even though they work BETTER with javascript. Javascript provides sophisticated convenient functionality for those who have it, but the website is still useable for those without.

I think that’s an imperative, and I try to do it with all my projects. Sure, people talk about how it’s important for accessibility to the “disabled” (meaning sight-impaired, mainly). I think most screen-readers these days do javascript pretty well, but that STILL doesn’t mean they’ll work with your js. I think most screen readers will not update a page in response to a js timer event, for instance. (This isn’t a lack of functionality, it’s a design choice. Can you imagine if your browser kept announcing every three seconds that there was new content loaded in a div in the middle of a page?)

But even aside from screen-readers, there are reasons to design for non-js user agents.

1) Things like the Kindle, which have web access, but poor or no javascript.

2) Machine access. A well-designed HTML with proper classes and ids can actually be pretty efficiently ’scraped’ by software even without a separate API. But once you start putting javascript all over the place, this gets a lot more challenging and less maintainable.

In general, I think you’re designing your website better for the unpredictable vagaries of the future if you make sure it works without js.  And it’s quite possible to do that.

Xerxes, in addition to degrading well if the user agent doesn’t do javascript at all, also allows a user to _choose_ to turn off all javascript elements, in case their user agent does javascript (partially or completely), but the js still isn’t working with it.

http://en.wikipedia.org/wiki/Unobtrusive_JavaScript

This entry was posted in General. Bookmark the permalink.

One Response to javascript and ‘accessibilty’

  1. I like to design for a) people who don’t have javascript enabled, b) people who don’t load images automatically (because until recently I’d turn off images every time I was coming close to my monthly bandwidth limit; it’s astounding the difference it made), and c) people who do neither. When I’m really enthusiastic I check to make sure the content displays usably without CSS, though I don’t know if/where that’s an issue.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s