[whatwg] LABEL and radio/checkbox onclick
Ian Hickson
ian at hixie.ch
Thu Aug 26 06:19:42 PDT 2004
On Wed, 18 Aug 2004, Matthew Raymond wrote:
> >
> > <p>The <code>label</code> element's exact default behaviour must
> > match the platform's label behaviour. For example. on platforms
> > where clicking a checkbox label checks the checkbox, clicking a
> > <code>label</code> element must cause a <code>click</code> event to
> > be synthesised and fired at the checkbox.</p>
>
> There are a few problems with this:
>
> 1) When HTML 4.01 markup is transferred to a WF2 document, the <label>
> behavior changes for the same markup with absolutely NO WAY TO RECOVER THE
> PREVIOUS BEHAVIOR.
The clause above does not contradict the HTML4 clause, so this isn't the
case.
> 2) The webmaster cannot reliably predict the behavior of <label> on a
> platform without extensive knowledge of that platform. Therefore, if the
> webmaster is targeting a specific set of operating systems and browsers,
> he must have knowledge of how the native UI handles labels for each
> control he uses, rather than simply depending on the HTML 4.01 specified
> behavior.
This makes no sense to me. If he is targetting a specific set of operating
systems, then the WF2-mandated behaviour is better, since it means the
author doesn't have to worry about sniffing for the platform and doing the
right thing on each platform.
> 3) You're providing no method of detecting whether input is passed to
> the associated control. Therefore, is there not a risk of multiple
> events being fired at the control when Javascript is introduced to make
> up for the lack of event passing on some platforms?
I don't think mulitple events would be a problem here.
> 4) There's absolutely no way to know how <label> should behave when
> associated with an <object> element.
I think we should say that <object> cannot be a form control any more.
Does anyone know of a case where it was made into a form control?
--
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