Web Accessibility — Javascript

Posted on Thursday, October 18th, 2007

Continuing in my series of posts on different things to think about when considering web accessibility this week I want to look at JavaScript.

I actually had some inspiration in this post from my girlfriend. I accidentally left JavaScript disabled one night after doing some testing on a site and came home the next day to be told there was “something wrong with the internet.” I quickly realised what had happened and rectified the situation, but the sites that she thought had broken may surprise you. Three major ones caught my attention and there’s a fourth I’d like to mention as well.

Sites That Rely On JavaScript

Windows Live Mail (formerly Hotmail)

First up is a huge disappointment. Hotmail, and, following it now, Windows Live Mail, is used by millions around the world. Try to access your mail without JavaScript enabled and you get nothing. Well, not nothing, you get a message telling you JavaScript is required. No help though, no helpful links and certainly no way of logging on without JavaScript enabled. Taking a closer look at the login page and it turns out that the whole page is just one JavaScript file that is run as the page is loaded.

JavaScript can help to enhance programs like webmail, all the big providers use JavaScript and AJAX to speed up the service and make it seem more like a desktop client like Outlook, but where’s the fall back for Windows Live Mail? GMail gives you the option for an HTML only version that works perfectly well without JavaScript. Live users can’t even get to the Live help section when JavaScript is disabled to find out what’s wrong!

Nationwide Building Society

Visiting the Nationwide to do some online banking without JavaScript enabled seems OK to start with, but click on “Sign On” and you are presented with a blank page. No sign of what has gone wrong. It turns out that the blank page you are met with is merely performing a JavaScript redirect to another page, when the redirect doesn’t fire, nothing else happens. This sort of thing could easily be done by the server rather than the browser, but that choice leaves users locked out of their bank.

Facebook

Popular social network Facebook has a popular feature known as the Wall, where you can post messages to your friends. Visiting Facebook and navigating around without JavaScript enabled is fine, but posting to someone’s Wall falls apart, you just can’t. These days, Wall posts are handled by AJAX and your post appears on your friend’s Wall without the page refreshing. Previously, I remember posts being processed normally, by submitting the form and the page refreshing, something that can certainly be accomplished without JavaScript.

I am particularly disappointed with Facebook for that fact. In a recent post I recommended that the first rule of AJAX was not to use it. In fact you should always be able to complete essential tasks without JavaScript or AJAX first, then you can enhance the site employing those technologies for those who have access to them. Facebook had non JavaScript functionality in place, but instead of enhancing it, they replaced it with JavaScript dependent functionality.

MySpace

I actually discovered MySpace’s problem while listening to one of the open mic slots at Future Of Web Apps. AbilityNet were talking about accessibility and web 2.0 sites when MySpace came up. They showed an interview with a blind user who spoke about their experience with using a screenreader and MySpace. If you use MySpace you will know that you can edit who your top friends, those that appear on your profile, are. The only way to do this is by dragging and dropping (powered by JavaScript) them into place. This is not a problem for those with JavaScript enabled and a mouse, but blind users are unable to use a mouse or even access the friends to move them in any way. Screen reading software can manage some JavaScript too, but visual positions on a screen are no use to a blind user and the lack of any fall back through normal HTML, say by entering a number for the position you want your friend to appear on your list, leaves users with Tom as their top friend.

Why Does This Matter?

Not all internet users have JavaScript enabled. I’m not just referring to girlfriends of developers who occasionally get stuck without a clue what is going on either. Some people and companies (therefore all users online at work in those companie, though they shouldn’t be using Facebook anyway!) prefer to surf without JavaScript enabled for security reasons, some people don’t have JavaScript enabled browsers and others can’t use certain methods that JavaScript makes available (drag and drop when you can’t see or can’t use a mouse, for example).

The w3schools site collects browser statistics from their logs, including JavaScript. While they aren’t the most accurate (the site is mainly used by people learning about web technologies), they do show that a small percentage of users do not have JavaScript enabled, 6% at the last count in January 2007.

The important thing is that your website functionality doesn’t need JavaScript. Everything important should and can be done by the server first, you can then enhance the experience with JavaScript for those who have it available, instead of locking out those who don’t.

If you enjoyed this post, why not subscribe to Unintentionally Blank

Comments

  1. Lance Jonn Romanoff Says:

    Some people have entirely valid reasons for visiting Facebook while working.


  2. Phil Says:

    Hi Lance, I did of course mean that line as tongue in cheek. I myself feel guilty about using Facebook at work as it is not part of my job (at least tagging pictures of myself on my last night out isn’t), but for those who require it for higher level networking and relationships then of course they have a valid reason for using it.
    My point is, if those people with a valid reason worked at a company who disables JavaScript for security reasons, they would be unable to post Wall messages when on Facebook. This is avoidable by providing methods to do it via normal HTML and server side methods and then enhancing with JavaScript. I hope you’re not in that situation yourself.


  3. Lance Jonn Romanoff Says:

    I have yet to work anywhere that actually disables JS as a policy, although I do not doubt that such places exist.

    Unfortunately I do run into problems regularly like those you mention. One company I am doing some business with presently serves numerous international markets but if you aren’t using JS the mechanism to switch from one country to another disappears entirely from their sites.


  4. Phil Says:

    Another major loss of functionality due to JavaScript overuse! I hope you’re talking them into changing that!


  5. Lance Jonn Romanoff Says:

    It’s on my list of improvements for 2008, so hopefully.


  6. James Says:

    Websites that don’t work without JS really annoy me, JS is more like the walnut on a walnut whip. It’s nice but you don’t need to have it.

    If I had £1 for every time I’ve heard that there is “something wrong with the internet.”


  7. Phil Says:

    Lance: Glad to hear it! Good luck.

    James: The fact is, there are other ways to do things without resorting to JavaScript and that’s what annoys me, particularly the Facebook example. Doing things in a flashy JavaScript way may look fancy, but allowing everyone to use your site (and perhaps adding the fancy stuff later, without replacing the core functionality of course) is more important in my opinion.


  8. Ian Lloyd Says:

    Phil, this has been passed on to me - I work for Nationwide and am very much an accessibility evangelist. I have passed this on, and hope that we can do something about it, but no promises. I suspect that there are legacy reasons for the empty form being submitted, and maybe it can now be done away with but as you can probably imagine, no-one will make a change without properly investigating why it was done like this in the first place and without testing the impact of changing it. Bear in mind that Nationwide’s Internet Bank has been around in one shape or form for 10 years, so it would not surprise me if that was originally in place for the likes of Netscape 4, which has long ago been dropped from support. So, just a note to say “Thanks, I’ve seen it and I’m going to raise it to see if someone can address it”.


  9. Pingback by csskarma.com/blog » Thanksgiving

Leave a Comment