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

Skip to content

Commit 53d7857

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

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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

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

150150
{% block checkbox_label -%}
151+
{%- set label_attr = label_attr|merge({'for': id}) -%}
152+
151153
{{- block('checkbox_radio_label') -}}
152154
{%- endblock checkbox_label %}
153155

154156
{% block radio_label -%}
157+
{%- set label_attr = label_attr|merge({'for': id}) -%}
158+
155159
{{- block('checkbox_radio_label') -}}
156160
{%- endblock radio_label %}
157161

0 commit comments

Comments
 (0)
0