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 27207 - Rendering option element with empty label attribute
Summary: Rendering option element with empty label attribute
Status: RESOLVED FIXED
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: Unsorted
Assignee: Ian 'Hixie' Hickson
QA Contact: contributor
URL: https://html.spec.whatwg.org/#the-sel...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-31 13:17 UTC by contributor
Modified: 2014-12-04 01:25 UTC (History)
4 users (show)

See Also:


Attachments

Description contributor 2014-10-31 13:17:54 UTC
Specification: https://html.spec.whatwg.org/multipage/rendering.html
Multipage: https://html.spec.whatwg.org/multipage/#the-select-element-2:concept-option-label
Complete: https://html.spec.whatwg.org/#the-select-element-2:concept-option-label
Referrer: https://html.spec.whatwg.org/multipage/index.html

Comment:
Rendering option element with empty label attribute

Posted from: 91.180.155.79
User agent: Mozilla/5.0 (X11; Linux x86_64; rv:34.0) Gecko/20100101 Firefox/34.0
Comment 1 Ms2ger 2014-10-31 13:24:55 UTC
http://software.hixie.ch/utilities/js/live-dom-viewer/?saved=3277 renders "text" for the option in Firefox (because it doesn't implement [label] at all), Safari (thanks to Anne for checking), IE11 and Chrome.

Note that this does not match what they all implement for HTMLOptionElement#label.
Comment 2 Ian 'Hixie' Hickson 2014-11-04 00:40:05 UTC
> Note that this does not match what they all implement for
> HTMLOptionElement#label.

What do you mean by "HTMLOptionElement#label", exactly?

Chrome and Firefox seem to work as specced (modulo treating label="" with the empty string as if the attribute was missing):
   http://software.hixie.ch/utilities/js/live-dom-viewer/saved/3285
Comment 3 Simon Pieters 2014-11-04 07:11:24 UTC
Foo#bar is shorthand for Foo.prototype.bar.
Comment 4 Ms2ger 2014-11-04 08:56:52 UTC
(In reply to Ian 'Hixie' Hickson from comment #2)
> modulo treating label="" with the empty string as if the attribute was missing

That's exactly what I filed this bug for, yes.
Comment 5 contributor 2014-12-03 21:30:52 UTC
Checked in as WHATWG revision r8868.
Check-in comment: Match reality: the label in <option label=''> is ignored if empty.
https://html5.org/tools/web-apps-tracker?from=8867&to=8868
Comment 6 Ms2ger 2014-12-04 00:18:17 UTC
This broke the IDL attribute...
Comment 7 Ian 'Hixie' Hickson 2014-12-04 01:06:12 UTC
Oh, I see. I thought you were talking about setter behaviour, but you were talking about the getter behaviour.
Comment 8 contributor 2014-12-04 01:25:13 UTC
Checked in as WHATWG revision r8871.
Check-in comment: Fix mistakes resulting from earlier checkins (meta, <option>.label)
https://html5.org/tools/web-apps-tracker?from=8870&to=8871