A legend can explain what a required marker means. Each required input still needs its own accessible required state.
Worked example
// components/RequiredFieldLegend.tsx
export default function RequiredFieldLegend({
label = "Display name",
hint = "Visible to your team",
}: { label?: string; hint?: string } = {}) {
return (
<fieldset>
<legend>{label}</legend>
<p>{hint}</p>
<label>
Value (required)
<input required />
</label>
</fieldset>
);
}Implementation notes
Do not rely on a red asterisk alone to convey a requirement. Pair visible instructions with native field semantics.
Try it yourself
Submit the form with one required field blank.
Open the React example →Editorial date April 15, 2026 · Published December 6, 2026