Forma says<fieldset> groups related controls and <legend> titles the group — structure that helps everyone, especially screen readers.
Wrap related controls in a <fieldset> and give it a <legend> caption. Visually it draws a labeled border; semantically it tells assistive tech "these inputs belong together" (essential for radio-button groups).
Use fieldsets for sections of a long form — "Shipping address", "Payment" — so the form reads as organized chunks rather than an undifferentiated wall of inputs.
Power-ups you unlock
<fieldset> groups controls · <legend> names the group
Critical context for radio-button groups
Screen readers announce the legend with each control
Use it to chunk long forms into sections
Captain Invalid Input attacks — common mistakes
Radio groups with no fieldset/legend → unclear what they answer
Putting a legend anywhere but first inside the fieldset
Overusing fieldsets for single, unrelated inputs
Boss battleGroup a set of "contact method" radios inside a fieldset with a legend, so the question is announced with each option.