mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
BUG Apply HTML5 required attributes when fields are required.
This commit is contained in:
parent
c78c0aa828
commit
090f07d978
@ -360,6 +360,11 @@ class FormField extends RequestHandler {
|
||||
'disabled' => $this->isDisabled(),
|
||||
);
|
||||
|
||||
if ($this->Required()) {
|
||||
$attrs['required'] = 'required';
|
||||
$attrs['aria-required'] = 'true';
|
||||
}
|
||||
|
||||
return array_merge($attrs, $this->attributes);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user