Fieldset
Example
Variants
Basic
white
Visually hidden legend caption
white
Props
<Fieldset />
| Prop | Type | Default | Description |
|---|---|---|---|
| * legend | | Required `<legend />` for fieldset | |
| hideLegend | | Visually hidden `<legend />` for fieldset |
Accessibility
Fieldsets group inputs into logic parts of a form. A screenreader usually announces the filedset legend along with the label of each nested input, which helps users stay in context when tabbing through different inputs within a fieldset. For example a color switch would consist of radio buttons wrapped in a fieldset, with a legend reading "Color". A screenreader would then read each input's label prefixed with the legend contnets (e.g. Color blue, color red, color green...).