Fieldsets and grouping inputs
Fieldsets should be used to group multiple fields that make up one unit of data. Groups of radio buttons should be contained in a fieldset.
Names, addresses, phone number groups, email and password pairs might be good candidates for fieldsets. However, screen readers will announce the fieldset legend as a prefix for each label within, so this might be overkill in situations where the label alone ("First name") is sufficient. In these situations, a visual grouping without <fieldset>
is more appropriate.
Bootstrap input groups
Bootstrap provides input groups and advises that the text in the gray box should not be the field's <label>
.
In Evergreen, in order to avoid disrupting some layouts in older screens that did not include proper form labels, we have adjusted the styles to allow <label>
tags inside the input-group-text
class.