E-mail List Archives

Re: Accessible web forms: default text in edit boxes and text areas


From: Jukka K. Korpela
Date: Feb 23, 2005 4:13AM

On Wed, 23 Feb 2005, c.brys wrote:

> The current Web Content Accessibility guidelines advise to put default text
> in edit boxes and text areas.

Ignore that. Or, rather, apply almost the opposite: never put any initial
text in an edit box or text areas, unless there are good reasons to expect
that the text would be a sensible default value.

It's simply a mistake in the guidelines. If you ask the W3G WAI group,
you'll get the answer that it's conditional under "until user agents..."
and that the checkpoint has become obsolete because current user agents
can handle initially empty fields well. But in reality it was a bad idea
from the beginning, causing trouble to the great majority (while
admittedly helping some people who used faulty user agents, long ago).

Unfortunately the WCAG guidelines are frozen. There's long process meant
to produce WCAG 2.0. Meanwhile, for years, WCAG 1.0 remain as once
written, and several authorities swear by them, usually without
understading much of them, or about their being out of date, in part.

> However, I have found that people who don't
> use a screen reader tend to skip these fields. My guess is that because they
> see a non-empty field, they tend to ignore it, assuming it doesn't need
> their .

That's one of the original problems. The initial content, if present, is
meant to provide a default value, not filling instructions. The very idea
of a default value is that it is expected to be suitable in many

> Using JavaScript to clear the field when you click it is not a solution
> because people will not click in the field, they just skip it.

And because JavaScript might, and often should, be turned off.
And because the JavaScript code will also wipe out user input, if
the user later returns to the field to fix a typo, for example.

> Greying out the default text is also not a perfect solution because visually
> impaired people may see there is text there but may be unable to read it.

It's not a solution at all but creates a new problem: greyed-out text in a
field normally means _disabled_ input field.

Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/