8000 Use for=ID on radio/checkbox label. · symfony/symfony@1c1d530 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1c1d530

Browse files
committed
Use for=ID on radio/checkbox label.
This is required for some screen reader like Jaws
1 parent 0082981 commit 1c1d530

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_base_layout.html.twig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,10 +147,14 @@
147147
{% endblock choice_label %}
148148

149149
{% block checkbox_label -%}
150+
{%- set label_attr = label_attr|merge({for: id}) -%}
151+
150152
{{- block('checkbox_radio_label') -}}
151153
{%- endblock checkbox_label %}
152154

153155
{% block radio_label -%}
156+
{%- set label_attr = label_attr|merge({for: id}) -%}
157+
154158
{{- block('checkbox_radio_label') -}}
155159
{%- endblock radio_label %}
156160

0 commit comments

Comments
 (0)
0