Rants
Questions
Soapbox
Best Practices
Apply today for a FREE subscription to CIO Magazine!
Mon, Dec 3, 2007 16:23 EST

|
Posted by: Esther Schindler in Soapbox Topic: DevelopmentBlog: You're the Boss
Current Rating: |
There are good reasons to insist that developers take extra time to make Web sites accessible—such as enabling it for the screen readers that blind users need—not the least of which is ADA legislation. But who's paying attention to making a site run well without JavaScript? It might be more necessary than you imagine.
For the last several weeks, I've been living in the future. I interviewed some of the smartest people around about where the world of Web development is headed, much of which centers around "Web 2.0" — which means AJAX, which means JavaScript.
Concurrently, my spouse just launched his client's Web site for a specialty bookstore. He took the time to ensure that its e-commerce system worked even when JavaScript is disabled. It's ugly, he says, but it works. However, he was astounded to see that, in its first week, about 40% (yes, 40%!) of people buying mystery books online (such as a first edition of Diana Gabaldon's Outlander or a signed copy of Joe Garagiola's Just Play Ball) make the purchase with JavaScript turned off.
Is this common? We spent some time puttering through popular sites to see how well they worked with with the feature disabled in the browser, and as expected most of the sites are ugly, lose functionality, or are essentially useless. (CIO.com is better than some, worse than others. But you won't be able to reply to this message unless you turn JavaScript back on.) Yet—as I wrote in that Beyond Ajax set of articles—the world is poised to use more JavaScript, not less. Do you see a problem here?
Before you rush to examine your own site statistics, look at how those metrics are gathered. Your site may not know about the visitors who have turned off JavaScript, giving you questionable numbers (I'm not quite certain of that; I'm sure the SEO techies will clarify for me) and moreover giving you the idea that everybody is using JavaScript when that's not the case.
For example, the Google Analytics UrchinTracker uses JavaScript to collect customer data, using a combination of server and client-side technology including cookies. It promises to let you track events on your site that do not generate a pageview. "Using the urchinTracker JavaScript, you can assign a specific page filename to Flash events, JavaScript events, file downloads, outbound links, and more," they say. The site tracking software we use for CIO.com said that 100% of our visitors use JavaScript; and although it did log our experimental visit (100% minus 1), I'm not sure if I believe it.
Essentially: If your tracking data incorrectly implies that all site visitors use JavaScript, you may be coming to the wrong conclusions.
This sidesteps the issue of why someone would turn off JavaScript, and whether they're dumb to do so. Some people see JavaScript as a security hole; others want to block advertising; still others see user tracking as an invasion of privacy. Some companies turn it off as corporate policy. This isn't about whether they should do so; the bottom line is that they do, and what (if any) consequences that has for your Web site development efforts.
Your developers probably hate to invest the time in writing and testing code for the site to make it "play nice" with screen readers and other legally-mandated accessibity/ADA issues. I understand why. Programmers design apps that do what they must, and use the best technology available, and it's time consuming and annoying
As more applications require javascript, it will create a competitive advantage for screen readers and search engines that can work with javascript. The problem will eventually be solved.
If search improves and brings the non-JavaScript people to your site, but your site is still unusable without JavaScript, how would this solve anything?
If you write a program to do something you should start with no browser. Get that working. Then write a front-end. Write the no javascript version. Then build the javascript version. If you have the javascript one detect no javascript then redirect using http. You can do that various ways. Cookies and session state.
Using xml to render and decorate as needed.
Yes ... The other consideration people do not take in to consideration is that if you want page rank your site needs to be open to the crawlers and spiders. Having a two or three phased approach is recommended. You would be shocked to find that some sites server different content when the google bot stops by. It's hard to do it right and think about all those angles.
No sadly most do not develop sites that way. It's a problem with maturity in the business.
For example this site has the preview for comments as a way to deal with second submit.