Skip to content

Commit

Permalink
Update radios and checkboxes guidance on ordering options
Browse files Browse the repository at this point in the history
  • Loading branch information
amyhupe committed Feb 5, 2019
1 parent b0ece63 commit ac6a6d2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions src/components/checkboxes/index.md.njk
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,15 @@ Unlike with radios, users can select multiple options from a list of checkboxes.

If needed, add a hint explaining this, for example, 'Select all that apply'.

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

- not realise they’ve missed a question
- submit the wrong answer

Order checkbox 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 ‘What is your nationality?’ based on population size.

There are 2 ways to use the checkboxes component. You can use HTML or, if you’re using [Nunjucks](https://mozilla.github.io/nunjucks/) or the [GOV.UK Prototype Kit](https://govuk-prototype-kit.herokuapp.com), you can use the Nunjucks macro.

{{ example({group: "components", item: "checkboxes", example: "default", html: true, nunjucks: true, open: false, size: "m", id: "default-2"}) }}
Expand Down
2 changes: 1 addition & 1 deletion src/components/radios/index.md.njk
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Users cannot go back to having no option selected once they have selected one, w

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.
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.

Expand Down

0 comments on commit ac6a6d2

Please sign in to comment.