Problem/Motivation
Inline error messages for radio buttons in fieldset elements are not visible.
In form-element.html.twig (lines 96-100), errors are properly styled with Bootstrap alert classes:
<div class="form-item--error-message alert alert-danger alert-sm">
{{ errors }}
</div>
However, in fieldset.html.twig, errors lack these classes:
<div>
{{ errors }}
</div>
This results in inconsistent inline errors where text fields show the red error icon and alert styling, but radio button groups do not.
Steps to reproduce
Create a webform with a required radio button field inside a fieldset
Submit the form without selecting a radio option
Error message appears but lacks the in-line alert and error icon
Proposed resolution
Update fieldset.html.twig to match the error styling used in form-element.html.twig:
Add the form-item--error-message alert alert-danger alert-sm classes to the error div
Move the error block after , this positions the error message near the label text, consistent with how errors appear for other form elements.
</legend>
{% if errors %}
<div class="form-item--error-message alert alert-danger alert-sm">
{{ errors }}
</div>
{% endif %}
<div class="fieldset-wrapper">
User interface changes
Before: radio button does not have in-line alert icon

After

Error messages for fieldset elements (radio buttons) will display with consistent styling matching other form elements.
| Comment | File | Size | Author |
|---|---|---|---|
| image (1).jpg | 25.35 KB | sankeer | |
| image.jpg | 44.28 KB | sankeer |
Comments
Comment #2
avpadernoComment #3
avpadernoComment #4
liam morland