W3C home > Mailing lists > Public > w3c-wai-ig@w3.org > April to June 2002

RE: place-holding characters in form elements

From: Jukka Korpela <jukka.korpela@tieke.fi>
Date: Thu, 23 May 2002 13:50:26 +0300
Message-ID: <621574AE86FAD3118D1D0000E22138A95BDCE3@TIEKE1>
To: "'w3c-wai-ig@w3.org'" <w3c-wai-ig@w3.org>
Scarlett Julian wrote:

> I was (am) under the impression that whatever I, as an author,
> decide to put in a text area to designate it's intended use
> is the actual place-holding characters.

What you put in a text area, e.g.

<textarea name="address" rows="5" cols="50">
Salomonkatu 17 A
10th floor
FIN-00100 HELSINKI
FINLAND
</textarea>

specifies the "initial value", or "default value", for the field (or
"control", to use the HTML 4 terminology). This means that if the user does
nothing about it and submits the form, that value will be sent as the value
of the field. This is great e.g. in applications that generate a form from
data base information or from previous user input. For example, in a form
for making modifications to a database entry, the program that generates the
form would simply put the current entry into the form fields, letting the
user see them all and modify those that need to be modified.

Similarly for <input type="text">. The value="..." attribute assigns an
initial value to the field.

> What then, is a place-holding character and how does it differ from,
> for example, my decision as an author to put "enter your name here"
> in a text input that is for a user to type in their name.

It doesn't differ from that - "enter your name" or just "your name" are what
the Guidelines mean by "place-holding characters", though the characters
could presumably be just dummy character data, like "*", when intended just
to deal with some old browsers' inability to treat initially _empty_ input
fields properly.

> If there is a difference between the two and I do not use 
> place-holding characters how can I achieve AAA accessibility?

If you use initially empty input fields, you don't achieve AAA
accessibility. One might say that you then need to decide between
accessibility and compliance with some rules for accessibility. :-) For
example, when asking for a person's name, there's no point in putting any
initial value into the field _unless_ you have some information of what the
user's name might be.

-- 
Jukka Korpela
TIEKE Tietoyhteiskunnan kehittämiskeskus ry
Finnish Information Society Development Centre 
Salomonkatu 17 A, 10th floor, FIN - 00100 HELSINKI, FINLAND
Phone: +358 9 4763 0397 Fax: +358 9 4763 0399 
http://www.tieke.fi  jukka.korpela@tieke.fi
Received on Thursday, 23 May 2002 06:49:52 GMT

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