W3C home > Mailing lists > Public > public-html-bugzilla@w3.org > June 2011

[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".

From: <bugzilla@jessica.w3.org>
Date: Thu, 30 Jun 2011 15:56:00 +0000
To: public-html-bugzilla@w3.org
Message-Id: <E1QcJay-0001f6-F2@jessica.w3.org>

Tab Atkins Jr. <jackalmage@gmail.com> changed:

           What    |Removed                     |Added
                 CC|                            |jackalmage@gmail.com

--- Comment #1 from Tab Atkins Jr. <jackalmage@gmail.com> 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>

Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
Received on Thursday, 30 June 2011 15:56:01 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 20:01:53 UTC