WebAIM - Web Accessibility In Mind

E-mail List Archives

Form validation

for

From: ben morrison
Date: Feb 8, 2006 5:15AM


Hi,

I've just finished improving our javascript form validation and would
be grateful for opinions.

This will be done server side as well once we are happy with the format.

On submission if any errors are found this is what happens:

1. Page title changes to indicate errors
2. Explanation text is written into the page
3. The page jumps to the error text.
3. A list of errors which link to each form element is written in
(uses focus insted of anchors)
4. Each area is flagged up with a coloured background.

The only thing I have left out is a alert box - is this needed?

http://tinyurl.com/aqw4v

sources:
http://www.standards-schmandards.com/index.php?2005/06/25/21-accessible-errors
http://www-306.ibm.com/able/guidelines/web/webforms.html#reqtechniques
http://www.quirksmode.org/dom/error.html
http://www.onlinetools.org/articles/unobtrusivejavascript/chapter5.html

Ben.

PS I'm sure christian will cringe at my javascript.