ZF-11628: DijitParam "required" collides with the HTML5 attrib

Description

Zend_Dojo_Form_Decorator_DijitElement always sets the "required" attribute since issue #7660:


$dijitParams['required'] = $element->isRequired();

This causes invalid browser behavior as the HTML5 "required" attribute (http://w3schools.com/html5/…) defines an element as required if the attribute is present, regardless of the attribute value. So e.g. Firefox 5 displays "Fill out this element" on hover.

Rendering a non-required Zend_Form_Element_Text in an dojo-enabled (programmatic mode) form results in following html:


Additionally: Shouldn't the attribute be rendered as required="false" / required="true" as other boolean attributes are rendered in Zend_Dojo_ and as it was before the changes of #7760?

Required elements render with "1" as attribute value instead of "true":


Comments

Check ZF-11953, I just posted a workaround.