Hi Benji!

Benji York wrote:
yuppie wrote:
Adding additional complexity for getting the label issue perfectly right doesn't fit much to the rest of the code. And I doubt any browser will have trouble with 'for' attributes pointing to a non-control element.

The "for" attributes in labels are used heavily in zope.testbrowser functional tests. If the human readable labels no longer correctly identify the controls, control IDs or names would have to be used instead, which is not conducive to good tests.

This is already broken for choice checkbox and radio widgets. In these cases we have no 1:1 relationship between widget labels and controls. (Though sometimes additional 1:1 labels within the widgets do work.)

AFAICS this is a limitation of the HTML specs and no change in zope can really fix this. If the 'for' attribute is omitted for checkbox and radio widgets (as Fred proposes) there is no relationship at all. If the 'for' attribute points to a div surrounding the controls (as I propose), you can find the ListControl if you are willing to rely on that non-standard behavior.



Zope3-dev mailing list
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com

Reply via email to