[whatwg] Proposal: Allow block content inside label element
Křištof Želechovski
giecrilj at stegny.2a.pl
Wed May 9 03:28:20 PDT 2007
The restriction on LABEL behavior is not a clarification, it is a change.
The browser vendor has to choose whether it is compliant with version 4 or
5. Therefore the current behavior can hardly be called a bug. Note that
this change is not reported on the Wiki
<http://wiki.whatwg.org/wiki/Changes_from_HTML4#Changed_Elements>; I did not
update the content because I strongly oppose this idea. It seems it has
strong support
<http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2004-July/thread.html#1
366> - where Mr. Raymond's opinion unfortunately sank - but there is a
possibility to overthrow it by making it void on a legal basis:
The Microsoft Windows environment does not provide a native LABEL control.*
It there was one, the restriction of version 5 would perhaps apply. But you
cannot tell how the native control behaves when it does not exist. You can
assume it would redirect the focus to the input control if it existed, and
introduce the feature to the browser upon that assumption.
Cheers
Chris
--
*The GUI allows to associate text with a control. The result of associating
text with a control that is not allowed to contain text is making the text
into a label; otherwise, the text goes into the control as its content. I
imagine that the user agent can transform a labeled checkbox into a checkbox
with caption set to the text of the label (ignoring markup and style) and
get the desired functional behavior. But this procedure does not work for
text controls, therefore you cannot infer anything about the behavior of
such a label.
-----Original Message-----
From: whatwg-bounces at lists.whatwg.org
[mailto:whatwg-bounces at lists.whatwg.org] On Behalf Of Matthew Paul Thomas
Sent: Wednesday, May 09, 2007 3:28 AM
To: 'WHAT-WG'
Subject: Re: [whatwg] Proposal: Allow block content inside label element
On May 8, 2007, at 9:06 PM, Kristof Zelechovski wrote:
> ...
> From the behavioral point of view: The purpose of a LABEL control is to
> redirect focus on click. It does not make much sense with a TEXTAREA
> control that is usually big enough to click upon.
> ...
If a browser redirects focus to a *text field* when you click its
<label>, on a platform where that doesn't happen in native GUIs (e.g.
Windows, Mac OS, Gnome, or KDE), that's a bug in the browser. Web Forms
2 clarifies this.
<http://www.whatwg.org/specs/web-forms/current-work/#label>
Cheers
--
Matthew Paul Thomas
http://mpt.net.nz/
More information about the whatwg
mailing list