Bug 19072 - Allow placeholder for color and date+ types
Allow placeholder for color and date+ types
Status: RESOLVED REMIND
Product: HTML WG
Classification: Unclassified
Component: HTML5 spec
unspecified
All All
: P2 enhancement
: ---
Assigned To: This bug has no owner yet - up for the taking
HTML WG Bugzilla archive list
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-25 22:25 UTC by contributor
Modified: 2013-01-30 07:52 UTC (History)
14 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description contributor 2012-09-25 22:25:21 UTC
This was was cloned from bug 12868 as part of operation REMIND convergence.
Originally filed: 2011-06-03 01:26:00 +0000
Original reporter: rasamassen@gmail.com

================================================================================
 #0   rasamassen@gmail.com                            2011-06-03 01:26:01 +0000 
--------------------------------------------------------------------------------
Per the definition (http://dev.w3.org/html5/spec/common-input-element-attributes.html#attr-input-placeholder): The placeholder attribute represents a short hint (a word or short phrase) intended to aid the user with data entry. A hint could be a sample value or a brief description of the expected format.

Dates, numbers, and colors could use placeholders as well to display a brief description of the expected format.

Reasoning: Because users aren't as smart as computers; for the date type, a placeholder of "##-##-####" or whatever format is expected by the date input would make a lot of sense.

<fieldset>
 <legend>Mail Account</legend>
 <p><label>Color: <input type="color" name="hex-value" placeholder="Example: #000000"></label></p>
 <p><label>Time: <input type="time" name="hours-and-seconds" placeholder="##:##:##"></label></p>
 <p><label>Time: <input type="time" name="hours-and-seconds" placeholder="Military format"></label></p>
 <p><label>A large number: <input type="number" name="big" min="1000000" placeholder="94520318359"></label></p>
</fieldset>
================================================================================
 #1   Tab Atkins Jr.                                  2011-06-04 01:11:00 +0000 
--------------------------------------------------------------------------------
Color and date are specifically intended to *not* expose a standard text-input box.  type=color should expose a dropper or something, and type=date should expose a calendar picker.

type=number is a bit different, but the UA should still make it clear by default that it expects a number.  You shouldn't have to do anything special by yourself.
================================================================================
 #2   Edward O'Connor                                 2011-06-16 22:17:33 +0000 
--------------------------------------------------------------------------------
I agree with Tab that <input type=number> is a sufficiently different case from the others, and have separated it into its own bug: http://www.w3.org/Bugs/Public/show_bug.cgi?id=12974
================================================================================
 #3   Edward O'Connor                                 2011-06-16 22:20:27 +0000 
--------------------------------------------------------------------------------
Updated the bug title to match new scope.
================================================================================
 #4   Ian 'Hixie' Hickson                             2011-06-16 22:43:55 +0000 
--------------------------------------------------------------------------------
I don't really understand what a placeholder would look like for type=color or the date-related types. Will have to examine how browsers implement these types to see if it makes sense.
================================================================================
 #6   Ian 'Hixie' Hickson                             2011-08-11 21:15:23 +0000 
--------------------------------------------------------------------------------
Marking REMIND for now. Gotta wait for Firefox to implement them and to see if WebKit's UI changes to be more like Opera's or not. Will reopen in ~6 months (feel free to do it for me if I am late in doing so — I do check the REMINDs every few months).
================================================================================
 #7   Ian 'Hixie' Hickson                             2011-08-14 06:22:27 +0000 
--------------------------------------------------------------------------------
*** Bug 13169 has been marked as a duplicate of this bug. ***
================================================================================