[whatwg] Suggestion: New "input-redirect" CSS property.

Ian Hickson ian at hixie.ch
Thu Aug 26 06:15:11 PDT 2004


On Tue, 17 Aug 2004, Matthew Raymond wrote:
> 
> 1) The new behavior is not backwards compatibility with HTML 4.01, thus 
> resulting in unexpected behavior when webmasters who wish to start using 
> our new markup.

I think this is a specious argument. I have yet to meet an author (except, 
apparently, you) who is using <label> because they specifically want focus 
transfer even when the user's platform wouldn't have it.


> 2) The existing HTML 4.01 behavior is already implemented on many 
> browsers.

This is a UI bug, IMHO.


> 3) The HTML 4.01 behavior is generally not an "expensive" feature to 
> implement in browsers.

It isn't related to expense, it is related to having all the form controls 
seem, look, and act, as if they were native controls.


> 4) There is no existing method to determine the correct native behavior 
> for a <label> when associated with an <object>, and even if there were, 
> the browser vendors would have to depend on plug-in makers to report 
> what behavior should be used, so there's no way of knowing if the 
> plug-in is reporting the correct native behavior.

I've never ever seen anyone use <label> with <object> and would be tempted 
to say, in the WF2 draft, that using <object> as a form control is no 
longer allowed. In practice I'm not aware of anyone who has ever actually 
done this. The NSPAPI doesn't, to my knowledge, even support it.


> 5) The HTML 4.01 spec makes the behavior of labels more consistent, 
> because all controls have a single label behavior.

No, it makes labels _less_ consistent, since they are different to the 
platform's native behaviour.


> 6) The HTML 4.01 spec makes the behavior of markup more consistent, 
> because a <label> for two different controls will always do the same 
> thing on the same platform.

No, they won't. A <label> for a control in a Web page will do something 
_different_ to a label in a dialog.


> 7) As it stands now, <label> is underused on the web. Many webmasters 
> use text only. Removing focus passing to the control will only encourage 
> this trend.

I don't see why. The reason to use <label> has nothing to do with focus 
passing, it has to do with semantic markup, aiding accessibility tools, 
and so forth.


In any case, what you are asking for is _not_ what HTML4 requires.

HTML4 says:

# When a LABEL element receives focus, it passes the focus on to its 
# associated control.

It doesn't say how <label> elements can get focus. On all platforms I'm 
familiar with, in fact, labels _can't_ get focus. Clicking a label doesn't 
give it focus, for instance.

And that behaviour doesn't describe the behaviour that one would want with 
checkboxes, which is that clicking the label actually clicks the checkbox.

The clause that WF2 resolves all these problems, and, more importantly, 
it does not contradict the clause from HTML4 that you want to keep:

| The label element's exact default behaviour should match the platform's 
| label behaviour. For example, on platforms where clicking a checkbox 
| label checks the checkbox, clicking a label element must cause a click 
| event to be synthesised and fired at the checkbox. In any case, events 
| targetting at form controls within a label must not be handled by the 
| label itself.


> To this end, I suggest a compromise: let a CSS property specific to 
> <label> control the behavior.

Proposals for CSS properties should be sent to www-style at w3.org.

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