Ajax accessibility

I am designing a small search-engine in javaScript at www.artimap.com and it is only accesible if you have css and javaScript on. But as the web evolve more and more toward web page that are not just html but full fledged applications, I wonder if it is really neccessary in 2010 to make a page work even without css or javaScript enabled. It is so much more work…

I am not sure, but for certain types of web sites, the lost market could be insignificant, other peoples could just as well use a text-only browser and they will get all the content of my page anyway. So is it really worth it to make all that additional work when there is so much to do and so little time ?

Simply put, yes it is. It’s been estimated that up to 10% of people do not have access to JavaScript or influentially have it turned off (it’s hard to measure those stats as Analytics packages are themselves dependant on scripting in most cases - no scripting could account for anywhere upward of 500 million people worldwide!). It’s not so much an issue of accessibility in terms of mechanics as most screen readers are able to function with JavaScript (though bare in mind people may be using older versions because those products are prohibitively expensive!) but it does have accessibility implications and usability issues on it’s own depending on the way it’s implemented. Out of consideration for the 1 in 10 people that can’t use scripting, I would always offer a server-side alternative to AJAX processing, because in a world where JavaScript is optional… you can’t afford to make demands on the end user, it would be like demanding your whole website was powered by Flash. :slight_smile:

For the 3 months my site was on line, the stats program of my webhosting company tells me that everybody that came had javaScript activated.
JavaScript is standard equipement on a browser. Flash you have to add as a plugin. If somebody has flash or javaScript deactivated, their web experience must be very poor. I think that there is a lot of web programers like me that are busy enough with building great web applications in javaScript and do not have the time to make a server alternative. If I look at my statistics it would be only a waste of time.

There’s a very real problem with your argument which I mentioned previously… the reason why the stats of your hosting company report that everyone has JavaScript enabled is because the only statistics packages which can make such a determination of the end-users browsing functionality (such as scripting, the OS used, the screen resolution, et al - which can’t be gotten from general server logs) REQUIRE JavaScript to be enabled for logging to even occur. Essentially those stats packages ignore anyone visiting your website with such non-scripting ability. You say it’s a standard piece of equipment on every browser but that’s not factually accurate, while most browsers do have the ability to render scripting, it’s utterly false to claim that all people using all devices and all browsers can make use of such an environment. You posted your question in the accessibility and usability section, and as such I’m stating for the record, on average it works out that around 10% of people don’t have access to JavaScript (for whatever reason), and more importantly, such dependence can cause serious accessibility and usability issues. What you chose to do with that information is up to you, but personally I prefer to avoid discriminating against such a proportionate amount of my audience whenever possible. :slight_smile:

Unless national legislation says otherwise, it’s up to you. But if you decide that lessening your workload is more important than giving as many as possible access to your sites, do not complain when you find an inaccessible site. And that includes when you reach middle age and start needing glasses, or if you break your wrist and can’t use the mouse for a while, or – heaven forbid – if you acquire a permanent disability through illness or an accident.

With some forethought it’s quite possible to write an application that works both with and without JavaScript, without having to write much extra code. Very few apps really require JavaScript, and those that do don’t really belong on the Web, in my opinion.

Look at your own problems. Alex hit your biggest issue on the head, you are already suffering from inactive Javascript on your site. We have numerous anecdotal cases of people who have Javascript turned off because of personal choice or corporate security policy. And while IE has Javascript enabled by default, only geeks like us download it. 90% of the rest of the world have it preinstalled on their computers and there are OEMs which turn Javascript off for the web as part of their “security” features. So the fact that you are showing 100% javascript usage tells us that it completely fails unless Javascript is running.

Further, this is not even an issue of accessibility, this is about application design. Accessible design takes no more time or money than inaccessible design. It’s simply an issue of getting it done. There are many ways to accomplish any web development task. I appreciate that you’re a beginner who is just learning, so you may not have that flexibility in your toolbox yet.

However, don’t make the mistake of some guys who aren’t newbies (but who certainly aren’t professionals yet) that don’t take time outside of their projects to learn which ways are accessible and which aren’t. There is an education curve to accessible / universal design just like there if for any best practice. Guys who aren’t interested in best practices don’t just write inaccessible applications, they write unmaintainable applications, they write incomprehensible applications, they write slow applications, they write unusable / awkward applications… they write bad applications in sloppy code. So what we’re saying do a great job, and take some pride in it. Learn how you can do what you do better, because the opposite path will lead you to frustration and failure. I’ve met those guys, and you do not want to be one of them.

JavaScript does things that a server script will never be able to offer: on www.artimap.com when the user write in the search box there is an instantaneous keywords cloud tag that is generated and as soon as he types more than two letters results are generated. This kind of functionality would be very slow if we had to rely only on server side scripts.

I think that accessibility is important to some point. But you have to focus on a market and for me it is peoples that have enough income to want to visit art galleries, and I think this kind of peoples will surf from home on a normal browser (javascript enabled). The web is evolving and things like ie6 and incapacited browsers should vanish.

That’s where the concept of progressive enhancement comes in. First build a basic function that works without JavaScript, then add the client-side behaviour to improve usability and performance for those who can benefit from it.

It’s not like generating a tag cloud in real-time is in any way a critical feature.

Tommy hit the nail on the head, there is nothing that JavaScript can or should do which is mission critical. Having a working search box is one thing, but those visual flourishes like keyword clouds are not required in order for a search box to function… yes their nice, but their not mission critical. No-ones saying don’t use JavaScript or don’t add that functionality where you can… but don’t presume to claim your in a position to force people to use technologies when it’s perfectly clear (and factually accurate) that a wide range of people will not be able to make use of it (your only fooling yourself), they therefore do require a fall-back mechanism. :slight_smile:

You clearly have the wrong idea about what accessibility is… accessibility is NOT about the technology a web browser does or doesn’t have, and it’s not some sort of mythic condition which only a handful of people suffer. Accessibility is by far the single most important element of any website design (IMO) as it concerns the very ability of people to be able to enter and use your website from the offset - rather than telling those with disabilities to go away. Though your claims about “the market” are entirely redundant, do you really think life chooses who will and will not suffer disease, disability or other conditions which may prevent them successfully using a website? Life doesn’t work that way, you could have more money than an entire nation but still suffer dementia, arthritis, blindness or one of the many thousands of medical ailments which affect computer ability. When you say “normal browser” with JavaScript enabled, were you aware that the browsers which most commonly cripple JavaScript for security or other reasons are Internet Explorer and Mozilla Firefox? The two MOST used browsers on the planet. Just because JavaScript is enabled by default does NOT mean that system admins, home users or software on those machines won’t cripple them for the end user’s own safety.

In essence, while it’s good your thinking about the end users: don’t trick yourself into thinking that JavaScript is some godly force that has power over everyone, because when it comes to using a website… if you don’t ensure there’s fall-back mechanisms for the very LARGE amount of people who are turning it off by default, you’re just going to lose a lot of visitors, traffic, and customers. The problem at it’s core seems to be that you’re making a lot of assumptions as to what kind of visitors you will have, and what they require or need in order to make use of your website. And losing anything up to 10% of your client base seems a rather crazy strategy. :slight_smile:

I am no accessibility expert, but here is how I understand it.

Using your search box as an example, to be accessible the basic search functionality (enter keyword->submit->get response from server) should work for anyone regardless whether or not they have CSS, Javascript, hands, eyes, etc.

You don’t need to find a way to make the cloud appear without Javascript as it is not an essential part of performing the search.

I think you guys are right. A real time cloud tag is very nice but not essential, so if javaScript is off it should just not appear. For the search box it seem a little more complicated because in my design there is no submit button ( all search box operations are done on keyup ), so for it to work without javascript I would have to add a submit button that would stay hidden when javascript is enabled.

And for my site AWstats program, I searched about it and it seems to depend on javascript to detect visitors browser features, but I still do not fully understand it…
Do you know php program that could give better javascript stats ?

And it is also true that I am a beginer with PHP, so for the moment I will stick with my usual rule of 20/80: I am getting 80% of results with 20% of the work, getting the 20% remaining results cost 80% efforts. So for some times I will stick with the javaScript only solution because there is an urgent need to add CONTENT to www.artimap.com and that will bring more visitors to the website, even if some peoples will still not be able to see it.

I don’t since I work mainly with .NET but this is one of the beautiful things about PHP, it’s so simple you literally can build your own. I found this sample at http://php.net/manual/en/function.apache-request-headers.php

$headers = apache_request_headers();

foreach ($headers as $header => $value) {
    echo "$header: $value <br />\

There are also ways to grab specific header elements like using the server variable with the names of the Apache header elements (e.g. [/SIZE]$_SERVER[‘REQUEST_METHOD’] [SIZE=2])

[/SIZE]This makes it really easy to grab all the information you want to know about your visitor since the information you want on the server side is coming to you in the HTTP Request Headers. I played around with this in PHP one time, and then built a version in my .NET application using the equivalent C# technique.