Use Fieldset...
- To group multiple related form fields together
Don't use Fieldset...
- To provide labels for a single form element. Use Form Field and Form Input Group instead.
Usage
The preview has been updated.
Accessibility
- All
<fieldset>tags must have a<legend>tag that labels them, for accessibility. If the information in the legend is superfluous to sighted users, the legend can be hidden on screens by usingVisuallyHiddensee docs here. - The
<legend>cannot be (or contain) a heading (H1-H6) tag. If the page structure requires a heading to label the form fields, don't use a<fieldset>tag. Instead, group them using a wrapper tag that has therole="radiogroup"attribute (for radio buttons) orrole="group"attribute (for everything else), plus anaria-labelledbyattribute whose value is the id of the heading.