BUG Apply HTML5 required attributes when fields are required.

This commit is contained in:
Mateusz Uzdowski 2013-08-12 09:30:31 +12:00
parent c78c0aa828
commit 090f07d978

View File

@ -360,6 +360,11 @@ class FormField extends RequestHandler {
'disabled' => $this->isDisabled(), 'disabled' => $this->isDisabled(),
); );
if ($this->Required()) {
$attrs['required'] = 'required';
$attrs['aria-required'] = 'true';
}
return array_merge($attrs, $this->attributes); return array_merge($attrs, $this->attributes);
} }