WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Default, place-holding characters

for

From: jukka.korpela@tieke.fi
Date: Feb 18, 2002 3:52AM



Jean Watkins wrote:

> If you include the place holders in a text field, the user then has to
delete
> the default information out before placing their own information in to
the field.

That's one of the problems with placeholders. Another problem: they are
illogical, since the default information is intended to be _default_
(initial) data. It should be something meaningful that could be accepted by
the user. Typical examples: a field for the user's name might be prefilled
from a data base or via cookies, and a field for date might be prefilled
with the current date. "Placeholder" use conflicts with such use and might
even lead to submitting wrong data, when the user assumes that he can
actually default a field.

In my opinion, the WAI recommendation on "placeholders", i.e. item 10.4 at
http://www.w3.org/TR/WCAG10/#gl-interim-accessibility
is an attempt to deal with some old poor technologies and causes quite some
problems, irrespectively of browser. Text input fields that are initially
empty are very common (actually, the normal case) in Web forms, so if
someone's user agent cannot handle them, the problem really needs to be
fixed where it is.

> In some cases, can I provide a value of " " or would that create a new
problem?

Who knows? I haven't met a browser that cannot handle initially empty input
fields, but if there's such a browser, who knows whether it can handle a
blank-filled field either.

> Doesn't the text preceding the field explain what is wanted in the field?

It definitely should. So if you put an explanation into the field itself
too, it would look rather redundant.

> The guidelines also say that a radio button must be selected to satisfy
this requirement.

I was unable to find such a statement. I must admit I'm somewhat confused
with the structure of WAI material at times, so I might well just have
missed it. Anyway, it _is_ a good principle to make one radio button in
each group initially selected. This is basically for having well-defined
behavior, not primarily for accessibility. If there is no initial
selection, then HTML specifications and browsers disagree on what should
happen when the user makes no selection. See
http://ppewww.ph.gla.ac.uk/~flavell/www/testradio.html
http://www.cs.tut.fi/~jkorpela/forms/choices.html#intro

> What if a user has to select either apples or oranges, but doesn't want
either one?

Using radio buttons, you should include a third alternative corresponding
to that selection, and probably make it the default choice, and make it
first so that the situation becomes clearer.

Alternatively, you could use checkboxes. This would let the user select
either, or neither, or both.

P.S. Jean, I'm sorry that you get this twice. I first sent my reply to you
only. Apparently there was something in the message headers that made my
E-mail client do that, and only later did I notice my mistake.

--
Jukka K. Korpela, erityisasiantuntija / senior adviser
TIEKE Tietoyhteiskunnan kehitt