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 13099 - Why doesn't the SELECT element have a placeholder attribute? Often a dropdown box contains an initial text like "Please make a choice".
Summary: Why doesn't the SELECT element have a placeholder attribute? Often a dropdown...
Status: RESOLVED NEEDSINFO
Alias: None
Product: HTML WG
Classification: Unclassified
Component: LC1 HTML5 spec (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: ---
Assignee: Ian 'Hixie' Hickson
QA Contact: HTML WG Bugzilla archive list
URL: http://www.whatwg.org/specs/web-apps/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-30 15:47 UTC by contributor
Modified: 2014-06-17 04:04 UTC (History)
7 users (show)

See Also:


Attachments

Description contributor 2011-06-30 15:47:13 UTC
Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/the-button-element.html
Multipage: http://www.whatwg.org/C#the-select-element
Complete: http://www.whatwg.org/c#the-select-element

Comment:
Why doesn't the SELECT element have a placeholder attribute? Often a dropdown
box contains an initial text like "Please make a choice".

Posted from: 88.242.25.224
User agent: Mozilla/5.0 (Windows NT 6.1; rv:5.0) Gecko/20100101 Firefox/5.0
Comment 1 Tab Atkins Jr. 2011-06-30 15:56:00 UTC
It does, it just doesn't use @placeholder to do it, because there's already an established pattern for "placeholders" in a <select>.  Just put @required on the <select>, then the first <option> is a placeholder if its value is the empty string.

That is, something like this:

<select required>
  <option value>Make your meat choice!</option>
  <option>Ham</option>
  <option>Pepperoni</option>
  <option>Bacon</option>
</select>
Comment 2 Aryeh Gregor 2011-06-30 20:52:33 UTC
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are
satisfied with this response, please change the state of this bug to CLOSED. If
you have additional information and would like the Editor to reconsider, please
reopen this bug. If you would like to escalate the issue to the full HTML
Working Group, please add the TrackerRequest keyword to this bug, and suggest
title and text for the Tracker Issue; or you may create a Tracker Issue
yourself, if you are able to do so. For more details, see this document:

   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Additional Information Needed
Change Description: no spec change
Rationale: Per comment 1, we already have a mechanism for this, which relies on a convention that long predates the placeholder attribute.  Is there something specifically wrong with it that would justify supporting a redundant mechanism to do the same thing?
Comment 3 Michael[tm] Smith 2011-08-04 05:03:52 UTC
mass-moved component to LC1