WebAIM - Web Accessibility In Mind

E-mail List Archives

Thread: Using JavaScript to modify forms

for

Number of posts in this thread: 2 (In chronological order)

From: Rachel
Date: Mon, Apr 07 2003 10:42AM
Subject: Using JavaScript to modify forms
No previous message | Next message →

I noticed this form on WebAim

From: Jared Smith
Date: Mon, Apr 07 2003 11:44AM
Subject: Re: Using JavaScript to modify forms
← Previous message | No next message

Rachel-

We decided in this case, that it wasn't necessary to inform the user
that we would be modifying the form, but would appreciate any feedback
to the contrary. The functionality that this feature provides seems to
outweigh any very minor issues it might cause. Through testing, we
found the JavaScript function, which checks or unchecks the boxes, made
the form use much easier than forcing the user to select or deselect
each of the boxes independantly. This very logical feature would also aid
individuals with motor or cognitive disabilities.

As far as Section 508 compliance goes, it states:
When pages utilize scripting languages to display content, or to create
interface elements, the information provided by the script shall be
identified with functional text that can be read by assistive technology.

In this case, the check boxes are manipulated, but they can most
definitely be read by the assistive technology, so I don't see a
problem there. A bigger issue comes into play when the focus is
changed or important data is manipulated that is not made available to
the user.

Another recent use of JavaScript that facilitated accessibility was a
form in which users were allowed to modify their password. The
password text box contained their previous password when they entered
the page. The user could navigate to the password box, change the
password, then submit the form. We found that screen reader users
were consistently entering their new password in the password box
before their old password (i.e., newpasswordoldpassword), then
submitting the form. The screen reader did not select the text within
the box when it was tabbed to and they were unaware that the old
password was even there. We added a small script which selected
the text when the focus was placed on the box, so that when the user
began to type, the old password was replaced with the new. All of our
complaints and difficulties disappeared.

In my opinion, as long as the JavaScript facilitates ease-of-use on
the page, does not create accessibility barriers, and the page is
still useable without JavaScript enabled, then why not use it?

Jared Smith
WebAIM (Web Accessibility In Mind)
Center for Persons with Disabilities
Utah State University


***************
On Monday, April 07, 2003 you sent:
R> I noticed this form on WebAim