AJAX, or Asynchronous Javascript and XML (eXtensible Markup Language), is one of the latest popular technologies to drop into a web developer’s bag of tricks. Although quite complicated to work with, the technique can provide an incredible variety of rich web application methods to work with. If you’ve ever visited any of the myriad "Web 2.0" applications, one common feature is the use of AJAX technologies.
The fundamental principle behind AJAX programming is that it works, as in the name, asynchronously. Most interactive web programming requires regular requests to a server. The general information flow is that you, the user, request a document. That document contains a form, where you fill in your information. You press submit, the page sends your information to the server, which does something with it such as signing you up for a mailing list, and then sends back a response – usually, an indication of success or failure.
In this process, every request requires a full refresh of the web page. However, AJAX works differently. Using the ability of Javascript to manipulate the DOM (Document Object Model) of a page (that is, edit page elements without refreshing) combined with the ability to make XML requests to the server, AJAX can send queries to the server and post the response to the web page without performing a page refresh.
For a web application, this is tremendous – although a server request may not actually be any faster than it was before, a programmer can now create a site which reacts to the information a user puts into the site instantaneously. Handling the server request no longer interrupts whatever the user is doing – they can continue working, reading, or moving ahead without having to wait each time for the page to refresh.
But! (And you knew there would be a but!) Accessibility and dynamic behavior have always had some significant conflicts. In a traditional format, a page refreshes and a user simply has to start reading from the beginning. Usually, at the beginning of the content section of the page, there will be a notice of what has happened – either "this section was not filled out" or "your submission was successful", or some response to that effect. Very easy to deal with from an accessibility point of view. AJAX changes all that. Suddenly, a dynamic site is updating areas all over the page without a refresh. How does a blind user know that anything has changed? To a visual user, you can see that a section of the page blanks out and refreshes. The content is now different. A blind user sees nothing, experiences no change.
This obvious issue with refreshing data is not the only accessibility concern with AJAX and DHTML. Thankfully, the new popularity of the AJAX technology family has spurred many large organizations to pioneer new methods of managing accessibility for dynamic technologies. Recently, the Mozilla Foundation teamed up with IBM to establish DHTML accessibility in Mozilla’s open-source browser, Firefox.
This accessibility is still rudimentary – but it’s definitely a start. The W3C (World Wide Web Consortium) has also begun to establish their own roadmap towards accessible dynamic content, having released their working draft on April 5th, 2006.
At this time, I will only employ AJAX in very limited circumstances – usually, for administrative backends where I can be certain that only a few specific people will have need to use it, and I can be assured that I will not be creating problems for others. However, the day may yet come when AJAX technologies are ready for truly accessible use.
Tags:
- ajax
- dhtml
- accessible web design