[whatwg] [WF2] Clear On Focus attribute

Matthew Paul Thomas mpt at myrealbox.com
Thu May 24 08:59:06 PDT 2007


On May 23, 2007, at 12:31 PM, Charles Iliya Krempeaux wrote:
> ...
> On 5/22/07, Matthew Paul Thomas <mpt at myrealbox.com> wrote:
>>
>> On May 22, 2007, at 3:35 AM, Stijn Peeters wrote:
>>>
>>> It is becoming increasingly common to have an input field clear its
>>> value when it is first focused. Though in a lot of cases this is
>>> actually wrong usage of the value=""  attribute for something which
>>> should actually be done with <label> (such as a search box filled 
>>> with "Enter search query here" that becomes empty when you first 
>>> click it),
>>
>> Indeed.
>>
>>> it is possible to come up with legitimate use cases; the first thing
>>> that comes to mind are input fields with placeholder or default 
>>> values that may need to be changed. This goes well together with 
>>> WF2's new abilities for prefilling forms.
>>>
>>> It makes sense to clear these values when the field is focused, as 
>>> the user will probably want to insert a new value rather than edit 
>>> the value that is currently in it.
>> ...
>>
>> I don't understand. What use is a default value if you can't edit it?
>> Why not make the field empty to begin with?
>
> It's a Usability issue mixed with a Graphical design / aesthetics 
> issue.,
>
> You need a label for the field... but don't want to put one beside it.
> So the label goes inside the field... until you click on it.  (At
> which point the label disappears.)
> ...

No, we already addressed the label use case. I asked specifically about 
the default value use case.

-- 
Matthew Paul Thomas
http://mpt.net.nz/




More information about the whatwg mailing list