[whatwg] LABEL and radio/checkbox onclick

Ian Hickson ian at hixie.ch
Sat Aug 28 07:49:34 PDT 2004


On Tue, 24 Aug 2004, Matthew Thomas wrote:
> On 23 Aug, 2004, at 11:56 AM, Matthew Raymond wrote:
> > ...
> > > It raises a question, though, which is "how do you determine which 
> > > form control is associated with the "Flavor:" label above?".
> > 
> >    A <label> element is semantically worthless without an associated 
> > control, because, fundamentally, a label actually has to label 
> > something.
> 
> Similarly, a heading has to be a heading for something. And similarly, 
> the <h1>-<h6> elements don't require you to specify exactly what part of 
> a document they are a heading for. Worse, unlike <label>, with <h1>-<h6> 
> you can't do so even if you want to.

You can in WA1 now. :-)


> >    Now suppose you want to style labels that pass the focus to their 
> > associated controls. In HTML 4.01, it's simple. You just style 
> > <label>.
> > 
> >    How do you do the same when the behavior is platform specific? Do 
> > you add a new CSS pseudoclass? Perhaps "focuspassing"?
> 
> If that was really necessary, then GUI toolkits would make such a 
> distinction, and UAs would follow the toolkit's appearance in their 
> default <label> rendering. There's no need for an author to fiddle with 
> it unless they're trying to be confusing. And I would be surprised and 
> disappointed if What-WG codified a new CSS pseudoclass, or anything 
> else, that had the sole purpose of allowing authors to be confusing.

I agree. (Also, pseudo-class requests really should go to the CSS working 
group, not WHATWG.)

-- 
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