Skip to content

Commit d4516cc

Browse files
Mathieu Piotmpiot
authored andcommitted
Add aria-describedBy on input
1 parent 7398499 commit d4516cc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Resources/views/Form/form_div_layout.html.twig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@
309309
<div>
310310
{{- form_label(form) -}}
311311
{{- form_errors(form) -}}
312-
{{- form_widget(form) -}}
312+
{{- form_widget(form, { 'helpBlockDisplayed': true }) -}}
313313
{{- form_help(form) -}}
314314
</div>
315315
{%- endblock form_row -%}
@@ -397,6 +397,7 @@
397397
id="{{ id }}" name="{{ full_name }}"
398398
{%- if disabled %} disabled="disabled"{% endif -%}
399399
{%- if required %} required="required"{% endif -%}
400+
{%- if helpBlockDisplayed is defined and helpBlockDisplayed and help is not empty %} aria-describedby="{{ id }}HelpBlock"{% endif -%}
400401
{{ block('attributes') }}
401402
{%- endblock widget_attributes -%}
402403

0 commit comments

Comments
 (0)