Problem/Motivation
The form-element.html.twig
template in Classy wraps inline error messages in a <strong>
element.
- The minor issue is that it makes no sense to denote the whole error message.
- The bigger one is that inline form errors may contain html elements, such as an item list, and in that case, the raw markup breaks validation:
<strong>
cannot contain grouping elements such as<div>
orul
, these can be used only where flow content is expected.
W3C Current recommendation, W3C Working draft
Proposed resolution
Remove the <strong>
element from the core/themes/classy/templates/form/form-element.html.twig
template and add `font-weight: bold;` for `.form-item--error-message`.
Remaining tasks
Provide a patch.
User interface changes
Themes that extending Classy should (must?) be reviewed.
API changes
Nothing.
Data model changes
Nothing.