ZF-2154: formLabel should be "for" ID, not NAME
Description
The "for" attribute of the formLabel view helper is populated with the name parameter it is given, however, the "for" attribute should reference the ID attribute of its related form field (http://w3.org/TR/xhtml-modularization/…).
This is not much of an issue using the default components as NAME is generally equal to ID, but when overriding the Zend_View_Helper_FormElement::getInfo() function to use a different algorithm to generate IDs (for example to remove illegal "[" & "]" characters) the connection between the label and the form field breaks.
Comments
Posted by Brenton Alker (brenton) on 2007-11-05T20:43:16.000+0000
Proposed Patch
Posted by Matthew Weier O'Phinney (matthew) on 2007-11-16T10:48:01.000+0000
Scheduled for 1.0.3 release
Posted by Michal Minicki (martel) on 2008-01-11T08:12:00.000+0000
Fixed in revision ZF-2154. Thanks, Brenton.
Posted by Michal Minicki (martel) on 2008-01-11T08:12:38.000+0000
I mean revision 7389. Wrong clipboard :)