8000 [Form][WCAG] Fixed HTML errors · symfony/symfony@fe66819 · GitHub
[go: up one dir, main page]

Skip to content

Commit fe66819

Browse files
Nyholmfabpot
authored andcommitted
[Form][WCAG] Fixed HTML errors
1 parent 80f993f commit fe66819

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,10 @@
103103
{% if type is not defined or type != 'hidden' %}
104104
{%- set attr = attr|merge({class: (attr.class|default('') ~ ' form-control' ~ (type|default('') == 'file' ? '-file' : ''))|trim}) -%}
105105
{% endif %}
106+
{%- if type is defined and (type == 'range' or type == 'color') %}
107+
{# Attribute "required" is not supported #}
108+
{%- set required = false -%}
109+
{% endif %}
106110
{{- parent() -}}
107111
{%- endblock form_widget_simple %}
108112

0 commit comments

Comments
 (0)
0