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

http://www.w3.org/Bugs/Public/show_bug.cgi?id=13099

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>
  <option>Ham</option>
  <option>Pepperoni</option>
  <option>Bacon</option>
</select>

-- 
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