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 14573 - Make so you can put <hr> inside <select>. Many times I've seen people use hacks such as <input disabled>--------</input> as a separator/divider in select. For people who want to have a selection with no default value preselected. Example: <select> <opti
Summary: Make so you can put <hr> inside <select>. Many times I've seen people use hac...
Status: RESOLVED WONTFIX
Alias: None
Product: HTML WG
Classification: Unclassified
Component: 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-10-27 12:52 UTC by contributor
Modified: 2011-11-01 06:07 UTC (History)
6 users (show)

See Also:


Attachments

Description contributor 2011-10-27 12:52:20 UTC
Specification: http://dev.w3.org/html5/spec/
Multipage: http://www.whatwg.org/C#top
Complete: http://www.whatwg.org/c#top

Comment:
Make so you can put <hr> inside <select>.

Many times I've seen people use hacks such as <input disabled>--------</input>
as a separator/divider in select.
For people who want to have a selection with no default value preselected.

Example:
<select>
  <option value="Select a car">Volvo</option>
  <option disabled>------</option>
  <option value="saab">Saab</option>
  <option value="opel">Opel</option>
  <option value="audi">Audi</option>
</select>

Posted from: 212.247.162.243
User agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1
Comment 1 Anne 2011-10-27 12:58:50 UTC
I think this is planned for Forms v3.
Comment 2 Tab Atkins Jr. 2011-10-27 15:55:46 UTC
Having a select with a "default"/"not selected" value is already possible.  Just make the select @required, and make the first option have a value=''.

Separating options into groups can already be done with <optgroup>.
Comment 3 Ian 'Hixie' Hickson 2011-11-01 06:07:44 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: Rejected
Change Description: no spec change
Rationale: see comment 2

(I'm pretty sure we can't do this for legacy parsing reasons, anyway.)

I seem to recall we had some magic for disabled <option>s whose values only contained hyphens and spaces at some point... but I don't recall where. Probably was in WF2 and we lost it in the transfer?