RE: place-holding characters in form elements

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 UTC