View Full Version : option labels -- not yet
10-03-2004, 01:19 AM
From W3C HTML 4.01:
OPTION Attribute definitions
label = text [CS]
This attribute allows authors to specify a shorter label for an option than the content of the OPTION element. When specified, user agents should use the value of this attribute rather than the content of the OPTION element as the option label.
Umm... why are there little things like this that browsers do not implement...
Will they ever live up to the spec? :confused:
10-03-2004, 03:05 AM
<option value="actual value">Shown Value</option>
Which actually does work in today's UAs...
10-03-2004, 03:37 AM
The label should be the shown value, according to the spec.
10-03-2004, 12:39 PM
So what's the advantage to that then? I, and apparently most everyone else, have been getting along fine with what's available...
<option>This is the assumed value.</option>
<option value="This is the assumed value.">This is NOT the assumed value.</option>
10-03-2004, 09:27 PM
The W3C decided that such a feature was important, and should be implemented by user agents.
Here is their demonstration of its use:
In this example we use the OPTGROUP element to group choices. The following markup:
<FORM action="http://somesite.com/prog/someprog" method="post">
<OPTION selected label="none" value="none">None</OPTION>
<OPTGROUP label="PortMaster 3">
<OPTION label="3.7.1" value="pm3_3.7.1">PortMaster 3 with ComOS 3.7.1</OPTION>
<OPTION label="3.7" value="pm3_3.7">PortMaster 3 with ComOS 3.7</OPTION>
<OPTION label="3.5" value="pm3_3.5">PortMaster 3 with ComOS 3.5</OPTION>
<OPTGROUP label="PortMaster 2">
<OPTION label="3.7" value="pm2_3.7">PortMaster 2 with ComOS 3.7</OPTION>
<OPTION label="3.5" value="pm2_3.5">PortMaster 2 with ComOS 3.5</OPTION>
<OPTION label="3.7R" value="IRX_3.7R">IRX with ComOS 3.7R</OPTION>
<OPTION label="3.5R" value="IRX_3.5R">IRX with ComOS 3.5R</OPTION>
represents the following grouping:
Does it actually work? No! Why? Because nobody bothered to implement it.
10-03-2004, 09:35 PM
Seems to work for me. What exactly is the problem?
Oh I see... Label on <option>, not colgroup...
Wait, so, wtf? Why on earth would you want to do that? The <option> tag's contents then become useless, no?
10-03-2004, 09:39 PM
Why on earth would we want to have any features from the standard? :rolleyes:
10-03-2004, 09:43 PM
Dude, you aren't following... User Agents didn't implement it because it's redundant. Why would you want to do that? I'll change my mind if you can detail one situation where it'd be useful to do this...
Much like a:link (also a standard) it's redundant.
10-03-2004, 10:08 PM
The WDG provides detailed reasoning, here:
Redundancy is a good thing, btw; it reduces the likelihood of failure.
10-03-2004, 10:55 PM
Ah, so it's there just for backward compatibility. Not sure why it was left out, as it'd be easy to do, but I bet that example of why it'd be useful wasn't in the spec, so UA makers were as baffled as I was as to why it'd ever be used :S
10-03-2004, 11:06 PM
Imagine a day when developers stop second guessing the spec., and give us a full implementaion. (I bet that never happens, the fools...)
10-03-2004, 11:08 PM
The spec is huge. If they implemented everything, I wonder how big browsers would be... I'd like to think they implement what's most likely to be used, and which bits are being asked for the most (which are probably the same bits.)
10-04-2004, 01:05 AM
Half-assed implementations are the whole problem... ok, that's enough complaining on my part. ;)
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.