[whatwg] Placeholder option for text input boxes

timeless timeless at gmail.com
Sat Oct 4 16:07:51 PDT 2008


On 10/4/08, Adrian Sutton <adrian.sutton at ephox.com> wrote:
> That would be platform and implementation dependant. On OS X the text should
>  without doubt disappear on focus as that's the behavior users would expect.
>  On Linux or Windows they might expect something different.  There's no
>  reason the presentation has to be identical in all implementations.

a more helpful implementation would move the hint outside the text
field so that users can refer to it while entering their values. at
which point you'd hopefully understand that their correct place is in
an alternate presentation (in firefox this is view>use style>some
style).

an example from a real intranet application which should not exist.
its job is to enable employees to report expenses:

(the exact details do not follow as i only encountered this nightmare once)
item number (1)
description: (_____________________)
date: (_____________________!v)
type: (_____________________!v)
currency: (_____________________!v)
cost in currency: _____________________
exchange rate to euros: _____________________

this last field has an error hint when you enter a number incorrectly
e.g. because you used too many digits. - it shows you a very long
number (something like 999999.9999999) and says your number should
have this format. now it helpfully hides the error after a few moments
- long before you figure out how your number doesn't correctly match
its hint. this might be a useful placeholder however the form prefills
a very outdated exchange value. the correct design for this is with a
span, probably an aria role and a default stylesheet which hides it.
but which can be displayed on request of the user to the user agent.

anyone interested in fixing this application is welcome to contact me,
helpwanted :)

but again, unless all user agents choose this implementation, i'm not
sure how creating yet another html bit will do anything but enable
more bad web applications like the one i've described. this
application was almost certainly not aria friendly and i'd encourage
people to seriously consider the actual needs of their users. usually
you will probably not find hints that run away to be truly helpful.
fwiw, i can't recall whether the hint from this application used a
title or a floating div, but either way html enabled bad design and
the current proposals which should speak to my real world problem will
fail as miserably as the current available dhtml did. whereas a
simpler implementation and recommendation to use a span + aria markup
would help everyone.



More information about the whatwg mailing list