Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

BUG Apply HTML5 required attributes when fields are required.

  • Loading branch information...
commit 090f07d9788076fb4f11129b3e31f51f929c1230 1 parent c78c0aa
@mateusz mateusz authored
Showing with 5 additions and 0 deletions.
  1. +5 −0 forms/FormField.php
View
5 forms/FormField.php
@@ -360,6 +360,11 @@ public function getAttributes() {
'disabled' => $this->isDisabled(),
);
+ if ($this->Required()) {
+ $attrs['required'] = 'required';
+ $attrs['aria-required'] = 'true';
+ }
+
return array_merge($attrs, $this->attributes);
}
Please sign in to comment.
Something went wrong with that request. Please try again.