Make sure the error message is announced to screen reader users when it is triggered.
Interactive demo - Sainsbury's
<RadioButtonField
label="Who’s travelling?"
name="radio-button-field-5"
options={[
{value:"single",label:"Just me"},
{value:"couple",label:"Couple"},
{value:"group",label:"Group"},
]}
error="Please select how many people will be travelling"
/>
Standalone
Standalone radio buttons let you remove text for more flexibility with the position of the radio button. Make sure that context is provided to the user by the surrounding content of the radio button and that the radio button has an accessible name.
Interactive demo - Sainsbury's
<React.Fragment>
<RadioButton
name="radio-button-with-hidden-label"
label="Hidden label"
hideLabel
/>
<RadioButton
name="radio-button-with-hidden-label-checked"
label="Hidden label (default checked)"
defaultChecked
hideLabel
/>
</React.Fragment>
Copy guidelines
When using radio buttons:
They should be introduced by a clear heading
Start your radio button labels with a capital letter
Don't use commas or any punctuation at the end of each label
Don't use more than three words per label
Was this page helpful?
Get in touch
Our team can answer any questions about using radio buttons or give you a helping hand with your next project.