[whatwg] [WA1] menus
Ian Hickson
ian at hixie.ch
Wed Dec 8 13:29:09 PST 2004
On Sat, 13 Nov 2004, Matthew Raymond wrote:
>
> Addition to Web Forms 2.0 section "2.3. Changes to existing controls":
>
> "The presentation of a label should match that of the operating system
> unless overridden by styling. For example, if selecting a control causes
> the label to be rendered with a dashed border in the operating system,
> that should be the default presentation in the user agent.
I added "presentation" to the paragraph that recommended the default
behaviour to be platform-like.
> "A <label> element should be able to associate with an immediate sibling
> control element ("sibling association"), so long as no other association
> exists. The <label> element should first attempt to associate with the
> next sibling, then the previous sibling. If no immediate sibling control
> exists, the <label> element will be unassociated.
I'm reluctant to make <label> any harder to implement than it already is.
Also, one problem with that definition is it starts getting quite
confusing when you have cases like:
...
<input type="checkbox">
<label> ... </label>
<input type="checkbox">
<label> ... </label>
<input type="checkbox">
<label> ... </label>
<input type="checkbox">
...
Sibling association is something I'd rather avoid in general -- I'm not
particularly fond of it when it comes to the Web Apps menu stuff either.
(The more I think about it, the less I like the current <menubar> stuff.)
> "An unassociated <label> element has no semantic meaning."
It's a label. It just doesn't label anything. I don't see any reason to
say that it stops being a label just because it isn't labelling anything.
> It's really annoying to go to a page where they don't associate the
> labels with their corresponding radio buttons in particular. Sibling
> association would be a huge benefit when viewing most of those sites.
Do sites really use the <label> element and not associate it, though? I
mean, sure, they _omit_ the <label> element, but I can't think of any case
where I've just seen an empty one. Do you have any examples?
--
Ian Hickson U+1047E )\._.,--....,'``. fL
http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,.
Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
More information about the whatwg
mailing list