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

RE: 508 Form fields question

From: Derek Featherstone <feather@wats.ca>
Date: Mon, 29 Dec 2003 14:17:10 -0500
To: "'Beheler Kim'" <beheler_kim@bah.com>, <w3c-wai-ig@w3.org>
Message-ID: <00be01c3ce40$5ba8be00$fe01a8c0@faottcan001>

Kim wrote:
> My first question is does the textbox that counts down
> "number of characters left" need to have a label associated
> with it since the text cannot be modified by the user?

Certainly -- a form field is a form field, whether or not you are
programmatically removing the ability to edit its content or not. This begs
the question though, should you really be using a form field for this
functionality? Or would it possibly be better done through some other means,
such as dynamically manipulating the DOM to include this text rather than
via a form field?

You also recognize that there are a few other issues:
> My second question is how do I make this compliant?  I
> understand that when a blind person enters text in the
> textarea they will not know that the textbox is changing.

The most important questions to me are: what is the functionality that you
are providing via the (I am assuming) JavaScript based character countdown,
and how can you provide that to everyone, regardless of the technology they
use (i.e., if using a screen reader, or if JavaScript is off etc...)

In terms of the functionality, you are trying to provide a method for users
to know how many characters they are able to type, so a few things come to
mind:

1. I'd suggest adding an appropriate statement to the form before the
textarea that explicitly states the number of characters allowed in the text
area. Screen readers will read this, its low tech, and it doesn't rely on
JavaScript, so you are enhancing accessibility.

> Number of Characters Left: <input type="textbox">   Question:
> <textarea> 

2. Order is important. The code that you provided shows the textbox before
the textarea. I'd suggest reversing this so that the textbox is after the
textarea. That way when a user of assistive technology such as JAWS leaves
the textarea, their next focus will be the textbox and they will be able to
read the critical information you provided in that form field.

With the textbox coded before the textarea, a user may get confused as to
what the purpose of the textbox, even with an appropriate label. If you put
it after, at least they will have a chance to read the text (whether in a
text box or as part of a DOM node) before they navigate to the submit
button.

3. What happens when they run out of characters? Do you no longer allow them
to type? This could be confusing for anyone. How do you let them know they
have reached the limit other than by showing the number of characters
remaining to be zero? And how will you let them know when JavaScript is off?
It would be prudent to support this functionality with some form of server
side solution as well, that will also monitor the content of the textarea
after submission to deal with situations where JS is off, and other
"unknowns".

4. This one is a bit more sketchy, and mostly thinking out loud. From a
cognitive perspective, might it be more useful to have a character count of
how many characters have been typed, with an appropriate message, rather
than simply how many characters are remaining? The reason I think this is
that if you include a statement at the start of the form as to how many
characters are allowed in the textarea (i.e., Your text submission should be
limited to 500 characters), it might make more sense to follow up with "Your
text submission is currently 424 characters out of the 500 character limit"
or some other appropriate text. Perhaps? Like I said, this last one is more
sketchy and I'm just thinking out loud...

Hope this helps!

Best regards,
Derek.
--
Derek Featherstone  feather@wats.ca
Web Accessibility Specialist / Co-founder of WATS.ca
Web Accessibility Testing and Services
http://www.wats.ca   1.866.932.4878 (North America)
Received on Monday, 29 December 2003 14:21:47 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 19 July 2011 18:14:13 GMT