Zend Framework

Captcha label incorrectly paired with its input field

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.7.8
  • Fix Version/s: 1.8.4
  • Component/s: Zend_Captcha, Zend_Form
  • Labels:
    None

Description

Rendering Zend_Form_Element_Captcha in Zend_Form with a label decorator results in invalid HTML, where <label> is not correctly paired with the captcha's <input> field.

<dt><label for="captcha" class="required">Captcha</label></dt>
<dd>
<img alt="" src="/images/captcha/..."/><br/>
<input type="hidden" name="captcha[id]" value="..." id="captcha-id" />
<input type="text" name="captcha[input]" id="captcha-input" value="" />
</dd>

As can be seen, <label> with its for attribute points to "captcha" element, while there is no element with this id. Proper behavior would be pointing to "captcha-input", as it is a text input field for captcha value.

Activity

Hide
Stanislav Malyshev added a comment -

fixed, thanks

Show
Stanislav Malyshev added a comment - fixed, thanks

People

Vote (1)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: