Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit b953e85

Browse filesBrowse files
committed
bug #26328 [Form][WCAG] Fixed HTML errors (Nyholm)
This PR was squashed before being merged into the 3.4 branch (closes #26328). Discussion ---------- [Form][WCAG] Fixed HTML errors | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | According to my friend and WCAG2 expect [Sandra](https://twitter.com/sandrability): > Fix your HTML errors. Should I fix the same issues on other forms as well? Or could someone claim that is a BC break? Commits ------- fe66819 [Form][WCAG] Fixed HTML errors
2 parents 4261b19 + fe66819 commit b953e85
Copy full SHA for b953e85

File tree

1 file changed

+4
-0
lines changed
Filter options

1 file changed

+4
-0
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_4_layout.html.twig
+4Lines 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)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.