Take the 2-minute tour ×
User Experience Stack Exchange is a question and answer site for user experience researchers and experts. It's 100% free, no registration required.

I was wondering if someone has a article of common practices a web developer should practice while using Javascript on a web page, keeping in mind the web page should be 508 compliant. I saw some articles where people were talking about two versions of code one working with javascript and other working without javascript giving the users the same level of functionality. Is this the most common approach? Are some functions in Javascript which one could use without worrying about being a issue with 508 compliance and others where we have to carefully make the equivalent functions using non javascript language like simple HTML?

share|improve this question
    
What is 508 compliance? Like W3C-Access-Levels? –  giraff Aug 14 '11 at 18:19
3  
Section 508 is an amendment to the US Rehabilitation Act of 1973 that requires federal agencies to make their information technology accessible to people with disabilities. –  Rahul Aug 14 '11 at 18:34

1 Answer 1

up vote 8 down vote accepted

In order to comply with web accessibility guidelines including Section 508, you must make functionality available to people using assistive technology. This could mean people might be using text-based browsers or screen readers that don't necessarily take advantage of the interactive functionality added using Javascript. Therefore, your best bet is to design for browsers without Javascript. You won't be able to rely on any functionality of Javascript if that's your goal.

The most common approach is to use progressive enhancement and graceful degradation to provide enhanced functionality to those with richer clients while preventing those with different abilities from being unable to complete their goals.

In practice, you want to look at the practice of unobtrusive javascript, use event listeners to capture interactions without degrading default behaviour, and follow accessibility guidelines that I'm sure you're already aware of.

share|improve this answer
    
Thanks Rahul. :) –  varun86 Aug 14 '11 at 19:09
    
Hi Rahul, Do you know of some examples or websites having some javascript and Ajax techniques successfully implemented and still accessible? I think I am trying to find some examples, the problem is I am getting conflicting opinions based on several readings on web about javascript usage and it's final reading by the screen readers. Some key interactions which bother me in my design 1. On button click I want the page not to refresh and convert couple of text to text input box 2. Error validation, I don't want the page to refresh and I want to do some basic error checking before submitting form –  varun86 Sep 14 '11 at 5:31
    
3. The user gets pop up without having a page refresh, this pop might be of different nature a list view with various options or a confirmation message for certain action. If you have examples of such interactions I would appreciate if you could share. Thanks a lot. –  varun86 Sep 14 '11 at 5:33
    
@varun86 I don't have any examples off the top of my head, but Google "unobtrusive javascript" and start following some guides. You'll be able to do what you want to do easily. It boils down to capturing the click event on a hyperlink and executing some javascript (such as displaying an overlay over the page) while preventing the hyperlink from running (using preventDefault and return false). –  Rahul Sep 14 '11 at 11:25

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.