4f3822bba9
Most types of form field will now include aria-required="true" if the field is marked as required. This causes assistive technology to inform users that the field is required. Before this change, in some cases (e.g. screen reader users tabbing through fields) users were not informed that a field is required.
37 lines
1.2 KiB
Plaintext
37 lines
1.2 KiB
Plaintext
{{< core_form/element-template-inline }}
|
|
{{$element}}
|
|
{{^element.frozen}}
|
|
<select class="form-control custom-select {{#error}}is-invalid{{/error}}" name="{{element.name}}"
|
|
id="{{element.id}}"
|
|
{{#element.multiple}}multiple{{/element.multiple}}
|
|
{{#element.size}}size="{{element.size}}"{{/element.size}}
|
|
{{#error}}
|
|
autofocus aria-describedby="{{element.iderror}}"
|
|
{{/error}}
|
|
{{#required}}
|
|
aria-required="true"
|
|
{{/required}}
|
|
{{{element.attributes}}} >
|
|
{{#element.optiongroups}}
|
|
{{#text}}
|
|
<optgroup label="{{text}}">
|
|
{{/text}}
|
|
{{#options}}
|
|
<option value="{{value}}" {{#selected}}selected{{/selected}} {{#disabled}}disabled{{/disabled}} {{{optionattributes}}}>{{{text}}}</option>
|
|
{{/options}}
|
|
{{#text}}
|
|
</optgroup>
|
|
{{/text}}
|
|
{{/element.optiongroups}}
|
|
</select>
|
|
{{/element.frozen}}
|
|
{{#element.frozen}}
|
|
{{#element.optiongroups}}
|
|
{{#options}}
|
|
{{#selected}}{{{text}}}{{/selected}}
|
|
{{/options}}
|
|
{{/element.optiongroups}}
|
|
{{/element.frozen}}
|
|
{{/element}}
|
|
{{/ core_form/element-template-inline }}
|