Re: Patch for <label> in HTML_QuickForm

From: Date: Tue, 15 Mar 2005 23:34:01 +0000
Subject: Re: Patch for <label> in HTML_QuickForm
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-36693@lists.php.net to get a copy of this message
Alexey Borzov wrote:
The patch is definitely not sufficient, as it does not take into account numerous possibilites. One of the obvious questions: what happens if someone is adding labels with <label> tags already appended?
That is a fair point, but consider this... A <label> tag does nothing without a "for" attribute. The @for takes a DOM element id. That id is generated randomly by QuickForm during rendering and would thus be innaccessible when setting the label of the element. So the user of QuickForm can't include @for. Granted, there are other attributes of <label> like @title. http://www.w3.org/TR/REC-html40/interact/forms.html#h-17.9.1 But without @for there's no point because the label is not associated with any form element. Since QuickForm 3.2 can't have @for, if a user is including <label> in their element label, it's not doing them any good. If they do choose to include <label>, it simply nests within the <label> I'm generating. In Firefox, the inner one dominates. So I think this point you raise is not reason to reject this valuable feature in QF 3.2. Do you have any other objections? -Turadg

« previous php.pear.dev (#36693) next »