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

RE: An accessible way to format Date and Social Security Number form fields?

From: Mike Scott <mscott@msfw.com>
Date: Thu, 30 Oct 2008 09:18:01 -0500
Message-ID: <9C365A59923F4040A7BAD4D2B6B1382073DC0E@office1.office.msfw.com>
To: "Jennifer Gauvreau" <Jennifer.Gauvreau@cgifederal.com>, <w3c-wai-ig@w3.org>
We've had good results using JavaScript to format form field entries after the user finishes (hooked to the field's "onblur" event). You can see an example/test page at http://www.msfw.com/accessibility/tests/ClientSideValidationTest.html.
The goal is to accept any interpretable format, e.g., with or without slashes, dashes, etc. If the user enters something we can't interpret, we use an alert to ask them to re-enter in a specific format.
(Of course, if your application doesn't require users to have JavaScript on, you'd want to do redundant validation/formatting on the server side.)
Hope that helps,

Mike Scott
MSF&W Accessibility Solutions

From: Jennifer Gauvreau [mailto:Jennifer.Gauvreau@cgifederal.com]
Sent: Tue 10/28/2008 8:34 AM
To: w3c-wai-ig@w3.org
Subject: An accessible way to format Date and Social Security Number form fields?


One of my project teams raised a question regarding the most accessible way to apply formatting to a text entry form field.  


Currently, when adding or updating data within a web application, users are required to input identifiers, date, and amounts in a certain format. For example, TIN must be in 12-3456789 format (including the -), date must be in mm/dd/yyyy format (including the /).  Based on preliminary testing, users mentioned that they are tired of inputting the - or /. We want to make it more convenient to the user by filling in the - or / for the user.

The question is when to prefill the hyphen, slash, dollar sign, and/or comma. The team proposed three options:

1. As user is entering their value

2. After the user enters their value and the focus is lost from the field.

3. After saving the entry to the database.

Is one implementation considered more compliant with Section 508 than another? My personal opinion was that the most logical time to apply the formatting would be after the user finishes inputting their value and focus moves off the field option (2). However, I was interested in hearing other people’s perspectives, particularly if there are any blind or motor-impaired users who would be willing to share their personal experiences.

Thank you,
Jennifer Gauvreau

Jennifer Gauvreau, CUA
Senior Consultant
Human Factors Practice
CGI Federal
T: 703-227-6167
F: 703-227-4205
12601 Fair Lakes Circle, 6th Floor
Fairfax, VA 22033
Received on Thursday, 30 October 2008 14:20:47 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 13 October 2015 16:21:38 UTC