W3C home > Mailing lists > Public > w3c-wai-ig@w3.org > October to December 2012

Re: javascript thread

From: Elizabeth J. Pyatt <ejp10@psu.edu>
Date: Mon, 17 Dec 2012 15:44:28 -0500
Cc: w3c wai <w3c-wai-ig@w3.org>
Message-Id: <62BC5F01-1FA8-4A81-B41B-9E45C186E82C@psu.edu>
To: Rachel Kane <rmksigns@eircom.net>
In my experience, accessibility errors associated with JavaScript come in several flavors.

1) The JavaScript interface is only usable with a mouse because the code relies exclusively on mouse events. If the code is able to use "focus" or include an alternative keyboard focus, the interface is more accessible. If you search for these terms online you should be able to find some tutorials.

A similar issue is a "keyboard trap" meaning that you can't exit the interface with just a keyboard. A properly coded "close" function activated by a keyboard can help there.

2) Another problem is that JavaScript (or the CSS behind it) can make content inaccessible to a screen reader. Ironically, one object which is accessible to a screen reader is an old fashioned alert window. AJAX can be inaccessible if new content is not announced to a screen reader. ARIA is one technology which allows JavaScript to interface with HTML is a more efficient manner.

A good page on this I've seen recently is http://www.freedomscientific.com/doccenter/doccenter/rs25c51746a0cc/2012-12-12_ARIA/02_ARIAControls.htm which includes links to code samples.

Some additional information is found at Mozilla although I can't say I've tested the output
https://developer.mozilla.org/en-US/docs/Accessibility/Keyboard-navigable_JavaScript_widgets

There are other things that could go wrong with JavaScript, but taking care of these two will solve a lot of issues.

Hope this helps

Elizabeth

On Dec 17, 2012, at 3:19 PM, Rachel Kane <rmksigns@eircom.net> wrote:

> Hey all,
> 
> just following this conversation re: javascript. For our Christmas assignment we have to build a 4 page website with HTML tags. (I get that one) and CSS for styling (I'm not sure about that one) but we also need to have;
> 
> 1. A form with 4 GUI controls
> 2. Validation of user entry on the form using Javascript code
> 3. Javascript code to handle at least 4 events
> 4. A Javascript function
> 
> (we are using XHTML strict 1.0 for validation)
> 
> I am pretty new to programming and my previous project involved a year researching web accessibility and usability testing on mobile devices. The web authoring lecturer brushes aside my accessibility questions,( therein lies the root of a bigger problem) but it just would not feel right to build it any other way.
> 
> How do I ensure my javascript functions and forms are accessible, do I just back it up with HTML tags or is there more I can do apart from including the  "if your page is not javascript enabled..."
> 
> Thank You ,
> Rachel
> 
> 

=-=-=-=-=-=-=-=-=-=-=-=-=
Elizabeth J. Pyatt, Ph.D.
Instructional Designer
Education Technology Services, TLT/ITS
Penn State University
ejp10@psu.edu, (814) 865-0805 or (814) 865-2030 (Main Office)

210 Rider Building  (formerly Rider II)
227 W. Beaver Avenue
State College, PA   16801-4819
http://www.personal.psu.edu/ejp10/psu
http://tlt.psu.edu
Received on Monday, 17 December 2012 20:45:03 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 17 December 2012 20:45:03 GMT