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 9473 - add wording to explicitly indicate that option/@selected cannot be used unless as a descendant of select/@multiple
Summary: add wording to explicitly indicate that option/@selected cannot be used unles...
Status: CLOSED FIXED
Alias: None
Product: HTML WG
Classification: Unclassified
Component: pre-LC1 HTML5 spec (editor: Ian Hickson) (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Ian 'Hixie' Hickson
QA Contact: HTML WG Bugzilla archive list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-10 01:40 UTC by Michael[tm] Smith
Modified: 2010-10-04 14:32 UTC (History)
5 users (show)

See Also:


Attachments

Description Michael[tm] Smith 2010-04-10 01:40:37 UTC
I can't find anywhere in the spec that states the conformance constraint that option element which is a descendant of a select elements can have a "selected" attribute only if its ancestor select element has a multiple attribute.

In contrast, the section on the file-upload state for the input element has a paragraph that says, "Unless the multiple attribute is set, there must be no more than one file in the list of selected files".

I suggest adding a similar paragraph in the section on the option element and/or select element. For example: "The select element cannot have more than one selected option element descendant unless the multiple attribute is specified."
Comment 1 Ian 'Hixie' Hickson 2010-04-13 08:14:53 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: Accepted
Change Description: see diff given below
Rationale: Concurred with reporter's comments.
Comment 2 contributor 2010-04-13 08:15:51 UTC
Checked in as WHATWG revision r5023.
Check-in comment: Make <select><option selected><option selected> non-conforming due to too many 'selected's.
http://html5.org/tools/web-apps-tracker?from=5022&to=5023
Comment 3 Michael[tm] Smith 2010-04-15 03:09:30 UTC
cheers
Comment 4 Martin Kliehm 2010-09-14 14:16:06 UTC
Verified, 4.10.9 [1] says: 

If the multiple attribute is absent, whenever an option element in the select element's list of options has its selectedness set to true, and whenever an option element with its selectedness set to true is added to the select element's list of options, the user agent must set the selectedness of all the other option element in its list of options to false.

[1] http://dev.w3.org/html5/spec/the-button-element.html#the-select-element