alphagov / govuk-design-system

One place for service teams to find styles, components and patterns for designing government services.
https://www.gov.uk/design-system
MIT License
512 stars 232 forks source link

Clarify preselecting radios #2205

Open joelanman opened 2 years ago

joelanman commented 2 years ago

Related documentation

https://design-system.service.gov.uk/components/radios/

Suggestion

Add guidance and possibly an example of where it is useful to pre-select radios

Evidence (where applicable)

When radios represent 'settings' as opposed to a question where the service does not yet know the answer, preselecting makes sense as it conveys the current setting. For example the gov.uk cookies page preselects the 'No' answer to convey what the current setting is.

https://www.gov.uk/help/cookies

Another example might be if radios were used for the sort order of a search. Again one should be selected to show the current state.

joelanman commented 2 years ago

Come to think of it this might apply to checkboxes too

frankieroberto commented 2 years ago

We use a pre-selected radio option on Find postgraduate teacher training, once you get to the results page.

The filters contains radio options for degree grade accepted, with the default (2:1 or First) being pre-selected.

Some of the checkboxes are also pre-selected, (although I did explore whether we should change this).

Screenshot

Screenshot from service 'Find postgraduate teacher training' showing a set of filters in the left hand column, including some radios and checkbox options, with some pre-selected