Closed Bug 626629 Opened 13 years ago Closed 13 years ago

the label attribute from the OPTION element in HTML is not shown

Categories

(Firefox :: General, defect)

x86
Windows XP
defect
Not set
minor

Tracking

()

RESOLVED DUPLICATE of bug 40545

People

(Reporter: almiro.perez, Unassigned)

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13 ( .NET CLR 3.5.30729; .NET4.0C)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13 ( .NET CLR 3.5.30729; .NET4.0C)

In HTML the specification says: "When rendering a menu choice, user agents should use the value of the label attribute of the OPTION element as the choice. If this attribute is not specified, user agents should use the contents of the OPTION element".

I've created a <SELECT> with <OPTION label="text">My Info</OPTION></SELECT> and it shows "My Info" instead of "text".
It works well in Internet Explorer, but not in Firefox.

You can find the text of the specification at: http://www.w3.org/TR/html401/interact/forms.html#h-17.6.1 (a bit below).

Reproducible: Always

Steps to Reproduce:
1.Create an HTML document.
2.Insert a <SELECT> element with <OPTION label="whatever"> elements inside
3.View the HTML document in the Firefox Browser
Actual Results:  
The label attribute is not shown. Instead, the contents of the OPTION element is shown.


Expected Results:  
The label attribute, in this case "whatever" should be shown.

I could agree that in the specification says "SHOULD" instead of MUST. But when there's no content in the element, it doesn't show the label attribute either. So, that's a bit confusing.
Status: UNCONFIRMED → RESOLVED
Closed: 13 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.