BT

Accessibility Remains a Concern with Web 2.0 Applications

| by Brian Smith Follow 0 Followers on Jun 04, 2008. Estimated reading time: 2 minutes |

Making sure your website is accessible is both an important business and legal issue. In 2006 Target was sued because their website was inaccessible to the the blind. With an ever increasing number of featuring javascript to create dynamic pages, the issue of how to to keep the websites accessible must be considered.

On any dynamic website that is driven by javascript there are two levels of accessibility that need to be considered before making the site live for the world to see and use. The first is people who have javascript disabled, will your site work for them? The next is people who have disabilities, what will their experience be when they use the site?

The first one can be handled by what is know as progressive enhance or graceful degradation. There are essentially two separate viewpoints of the same solution. With progressive enhancement the idea is to make sure your site works without javascript and then slowly start adding the interactive features unobtrusively. Graceful degradation, on the other hand, looks at the problem in reverse by making sure that when javascript is disabled the site still falls back to the basic functionality. Christian Heilmann has a great guide to developing with progressive enhancement where he outlines seven rules for progressive enhancement. The rules can be summed up as:

  1. Separate as much as possible
  2. Build on things that work
  3. Generate dependent markup
  4. Test for everything before you apply it
  5. Explore the environment
  6. Load on demand
  7. Modularize code

The second level is handling users with disabilities. This can be accomplished by using what is know as the ARIA specification. This basically consists of adding specific attributes to html elements that will have interactivity. The team behind Google Reader recently went about implementing this specification to their product. They then took what they learned and created a library that will automatically inject accessibility enhancements called AxsJAX. John Resig, creator of the jQuery library, also gives a quick overview of how to use ARIA attributes to specify that a certain region of the page will be dynamically updated. John gives the following example code for a section of code updated by an ajax request:

        <b>Active Users:</b>
<p id="users-desc">A list of the currently-connected users.</p>
<ol aria-live="polite" aria-relevant="additions removals"
aria-describedby="users-desc" id="users">
<li>John</li>
<li>Mary</li>
<li>Ted</li>
<li>Jane</li>
</ol>

The Filament Group has a few more guides for using the ARIA specification to develop interactive components that are accessible as well. The first one with developing accessible graphs using the canvas tags. The are based off tabular data so that if javascript is disabled they will degrade nicely. The next one details how to create a very attractive accessible slider control using javascript. This one uses data from a select element to build the slider so that control will still work and have similar functionality without javascript. Both components will automatically add the appropriate aria attributes to the inserted html. Another blogger, Marco Zehe shows just how easy it is to start using the ARIA specification on your site in his two articles on easy ARIA tips. The first is on using aria required to denote a required field. The next covers using aria-labelledby and aria-describedby in order to have form fields complete a sentence such as "Delete History after X days".

Rate this Article

Adoption Stage
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Discuss

Login to InfoQ to interact with what matters most to you.


Recover your password...

Follow

Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.

Like

More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.

Notifications

Stay up-to-date

Set up your notifications and don't miss out on content that matters to you

BT