Re: place-holding characters in form elements

and of course, if It never is sensed that onfocus has been triggered,
you still have to clear it manually but at least you know what format
the date should take.

----- Original Message -----
From: "Nick Kew" <nick@webthing.com>
To: <w3c-wai-ig@w3.org>
Sent: Thursday, May 23, 2002 7:01 AM
Subject: RE: place-holding characters in form elements


On Thu, 23 May 2002, Jukka Korpela wrote:

> > place-holding characters.
>
> (You mean Guideline 10.4. (It is at priority level 3.))
>
> > This is causing us some grief
>
> Many people share your opinions and views.

Myself included, FWIW.  IMNSHO, guidelines should always steer well
clear of advocating anything likely to be harmful (e.g. confusing)
either

> My advice is: Don't use place-holding characters. (They are sometimes
> claimed to give information about the kind of data that is expected,
but any
> need for such hints is caused by lack of adequate explanations and
labels
> before the fields.)

Agreed.

A technique I occasionally use is to populate a field with a help
string, and use an onfocus event to clear it the first time the
field gets focus.  But whether that is a good idea is more a matter
of usability than accessibility.

<input name="date" value="YYYY-MM-DD" onfocus="value=''">

shouldn't be too confusing, but can never be more than an ad-hoc usage.

--
Nick Kew

Available for contract work - Programming, Unix, Networking, Markup,
etc.

Received on Friday, 24 May 2002 07:07:02 UTC