Skip to content

Update the guidance on when to use the checkboxes component #4059

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Pablo-MHCLG
Copy link

The guidance currently says you can use the component when you need to help users toggle a single option on or off. For these cases, it would be better to use 2 radios with yes/no or on/off because it makes users deliberately choose the option they want. Otherwise, there's the risk that users miss the single checkbox on the page and end up not selecting something they might have had selected if the page was using radio buttons.

The guidance currently says you can use the component when you need to help users toggle a single option on or off. For these cases, it would be better to use 2 radios with yes/no or on/off because it makes users deliberately choose the option they want. Otherwise, there's the risk that users miss the single checkbox on the page and end up not selecting something they might have had selected if the page was using radio buttons.
Copy link

netlify bot commented Aug 20, 2024

You can preview this change here:

Name Link
🔨 Latest commit 9b26055
🔍 Latest deploy log https://app.netlify.com/sites/govuk-design-system-preview/deploys/680b8a580afaed0008459457
😎 Deploy Preview https://deploy-preview-4059--govuk-design-system-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@romaricpascal
Copy link
Member

@CharlotteDowns @Ciandelle @hazalarpalikli @mia-allers-gds I think this change needs more of a design review than a tech one. Would any of you be able to have a look, please?

@Pablo-MHCLG
Copy link
Author

Pablo-MHCLG commented Sep 30, 2024 via email

@mia-allers-gds
Copy link

@romaricpascal @Pablo-MHCLG I think this update makes sense from a usability and a guidance perspective. I'm wondering if we could add another line to the proposed guidance explaining why a radio button is better than a single checkbox? The explanation provided in this PR makes sense to me and would give the user some helpful context

@owenatgov
Copy link
Contributor

@Pablo-MHCLG Just checking if you've seen @mia-allers-gds's comment above? If you don't have capacity to update this pull request with the suggestion, we can try to do this for you.

Pablo-MHCLG added a commit to Pablo-MHCLG/govuk-design-system that referenced this pull request Apr 24, 2025
Pulling the change as requested by Owen and Mia in alphagov#4059
@Pablo-MHCLG
Copy link
Author

@owenatgov I'm not sure how to update the pull request, I'm not very familiar with Github, I would appreciate if you could update it for me, thank you!

Copy link
Contributor

@owenatgov owenatgov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Pablo-MHCLG I've addressed @mia-allers-gds's comment above. I'm now happy with this!

This just needs a second approval then it can roll on in.

@querkmachine
Copy link
Member

I wonder if there is a little nuance to this? Accepting terms and conditions is effectively a binary on/off choice, but using a checkbox for that is pretty standard, likewise for "remember me" functionality on a login screen, or opting in or out of marketing materials.

Is there a risk of making people think they need to use radio buttons for those? Should they be using radio buttons for those?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants