This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 18621 - 4.10.7.3.12 The placeholder attribute The phrase "when the element's value is the empty string and/or the control is not focused" does not make sense with an the "and/or" option. The way Chrome has implemented this attribute is more appropriate. This wou
Summary: 4.10.7.3.12 The placeholder attribute The phrase "when the element's value is...
Status: RESOLVED NEEDSINFO
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: Unsorted
Assignee: Ian 'Hixie' Hickson
QA Contact: contributor
URL: http://www.whatwg.org/specs/web-apps/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-19 08:15 UTC by contributor
Modified: 2013-03-27 23:20 UTC (History)
4 users (show)

See Also:


Attachments

Description contributor 2012-08-19 08:15:40 UTC
Specification: http://dev.w3.org/html5/spec/single-page.html
Multipage: http://www.whatwg.org/C#top
Complete: http://www.whatwg.org/c#top

Comment:
4.10.7.3.12 The placeholder attribute

The phrase "when the element's value is the empty string and/or the control is
not focused" does not make sense with an the "and/or" option.

The way Chrome has implemented this attribute is more appropriate.  This would
result in the above phrase being changed to "when the element's value is the
empty string".	ie. display the placeholder until such time that data is
entered into the input, regardless of focus.

I also disagree with the statement that the placeholder should not be used as
a replacement for a label.  On small displays it could be particularly useful
to use the space inside the control to display the label.

Posted from: 58.96.126.172
User agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.79 Safari/537.1
Comment 1 Ian 'Hixie' Hickson 2012-10-19 21:24:21 UTC
1. Why does it not make sense?

2. placeholder="" can't be used as a replacement for label since it isn't visible when there's a value. That doesn't mean you must have a label; sometimes a form control is understandable even without a label. (The Google search UI has no label, for instance.)
Comment 2 Ian 'Hixie' Hickson 2013-01-29 01:27:10 UTC
simon@proatomic.com.au: please see comment 1, it would really help me out if you could let me know what the problem was with #1 and whether you disagree with #2. Thanks!