Commit 32f0b7b
committed
minor #44464 [TwigBridge] Provide a default non-empty label on empty options to validate HTML5 (DocFX)
This PR was merged into the 6.2 branch.
Discussion
----------
[TwigBridge] Provide a default non-empty label on empty options to validate HTML5
| Q | A
| ------------- | ---
| Branch? | 6.2
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets |
| License | MIT
| Doc PR |
As described on https://rocketvalidator.com/html-validation/element-option-without-attribute-label-must-not-be-empty, so far this template generates empty options with no value, no content, and no label. This is not a break, but a simple "should".
Not sure how we should recommend handling this, users have the possibility to handle this themselves (https://symfony.com/doc/current/reference/forms/types/choice.html#placeholder), but if they don't we leave a non-stadanrd-compliant output.
The tailwind template is also affected from this, as it extends this one.
I proposed a double-dash default value:
- pretty affordant
- doesn't use translations as users might not use them
- doesn't suffer from language dependent doubtful meaning
I locally fix this by overriding the default templates, but I thought the default ones could get a fix.
Also, to make it quick, I proposed to change this starting 5.4. Maybe we can push this back to 4.4?
Commits
-------
f9aff39706 [TwigBridge] Provide a default non-empty label on empty options to validate HTML51 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
| 64 | + | |
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| |||
0 commit comments