This is a new service that we're still developing. Try the service and send us your comments and suggestions. Your feedback will help make the service easier to use for everyone.

Radio Buttons

When to use this component

Use the radios component when users can only select one option from a list.

When not to use this component

Do not use the radios component if users might need to select more than one option. In this case, you should use the checkboxes component instead.

How it works

Group radios together in a <fieldset> with a <legend> that describes them, as shown in the examples on this page. This is usually a question, like ‘Where do you live?’.

If you are asking a question as the heading for the page , you can set the contents of the <legend> as the page heading. This is good practice as it means that users of screen readers will only hear the contents once.

Always position radios to the left of their labels. This makes them easier to find, especially for users of screen magnifiers.

Unlike with checkboxes, users can only select one option from a list of radios. Do not assume that users will know how many options they can select based on the visual difference between radios and checkboxes alone.

If needed, add a hint explaining this, for example, ‘Select one option’.

Do not pre-select radio options as this makes it more likely that users will:

  • not realize they’ve missed a question
  • submit the wrong answer

Users cannot go back to having no option selected once they have selected one, without refreshing their browser window. Therefore, you should include ‘None of the above’ or ‘I do not know’ if they are valid options.

Order radio options alphabetically by default.

In some cases, it can be helpful to order them from most-to-least common options. For example, you could order options for ‘Where do you live?’ based on population size.

However you should do this with extreme caution as it can reinforce bias in your service. If in doubt, order alphabetically.

Inline Radios

If there are only 2 options with short labels, you can display them inline.

Example Inline Radios

Add special instructions for buttons and inputs here.

Exemple de boutons radio horizontaux

Ajoutez ici des consignes particulières pour les boutons et les entrées.

Stacked Radios

When there are more than 2 options, or if labels are long, radios should be stacked.

Example Stacked Radios

Exemple de boutons radio verticaux

Radio items with hints

You can add hints to radio items to provide additional information about the options.

Radio items with hints example

This space can be used to describe the radio group in general and give more details about the options below.
Additional text that describes the specific option can go here. This space is meant to give more details about the option and can be as long as needed.
Additional text that describes the specific option can go here. This space is meant to give more details about the option and can be as long as needed.

Exemple des éléments de bouton radio avec des conseils

Cet espace peut être utilisé pour décrire le groupe radio en général et donner plus de détails sur les options ci-dessous.
Le texte supplémentaire qui décrit l'option spécifique peut aller ici. Cet espace est destiné à donner plus de détails sur l'option et peut être aussi long que nécessaire.
Le texte supplémentaire qui décrit l'option spécifique peut aller ici. Cet espace est destiné à donner plus de détails sur l'option et peut être aussi long que nécessaire.

Radio items with a text divider

If one or more of your radio options is different from the others, it can help users if you separate them using a text divider. The text is usually the word ‘or’.

Radio items with a text divider example

or

Exemple des éléments de bouton radio avec un séparateur de texte

ou

Conditionally revealing content

You can conditionally reveal content when the user selects a particular radio, so they only see content when it’s relevant to them.

For example, you could reveal a phone number input when the user selects the ‘Contact me by phone’ option.

Conditionally revealing content example

Select one option.

Exemple de contenu révélateur conditionnel

Sélectionnez toutes les options qui vous concernent.

Smaller radios

Use standard-sized radios in nearly all cases. However, smaller versions work well on pages where it’s helpful to make them less visually prominent.

For example, on a page of search results, the primary user need is to see the results. Using smaller radios lets users see and change search filters without distracting them from the main content

Smaller radios example

Exemple de petites boutons radio

Legend as a label

Sometime in forms with more than one input type the legend styling can be too prominent. Use this example if you want the radio legend to blend in wth other fields on the page.

Legend as a label example

Exemple quand la légende est l'étiquette

Error messages

Display an error message if none of the radios are selected.

Have you changed your name?

This includes changing your last name or spelling your name differently.
Error: Select yes or no before you continue

Avez-vous changé votre nom?

Cela inclut le changement de votre nom de famille ou l'épellation de votre nom différemment.
Erreur : Sélectionner « Oui » ou « Non » avant de continue.