Conditionally revealing a related question on Radio buttons and Checkbox components - smbc-digital/patterns GitHub Wiki
Contents
– User needs – How it works – Status – Error messages – Accessibility statement – Examples – Research – Discuss
User needs
Conditionally revealing a related question is not a pattern, but is part of the radio button and checkbox components: use it to ask the user a related question when they select a particular checkbox or radio button. They will then only see the question that is relevant to them.
How it works
Use when you need to ask the user a related question when they select a particular checkbox or radio button. They will then only see the question that is relevant to them.
See GOV.UK Design System for guidance on how to use 'Conditionally revealing a related question' for radio buttons and checkboxes (scroll to halfway down the page to the section titled 'Conditionally revealing a related question') using the following links:
GOV.UK Design System radios component GOV.UK Design System checkboxes component
Status
Working progress - See GOV.UK Design System for the status of using 'Conditionally revealing a related question' for radio buttons and checkboxes (scroll to halfway down the page to the section titled 'Conditionally revealing a related question') using the following links:
GOV.UK Design System radios component GOV.UK Design System checkboxes component
There are some known accessibility issues that GOV.UK discuss in the 'An update on the accessibility of conditionally revealed questions' blog.
However, use the current guidance on each component from the links above for how to use them.
The guidance on this GitHub page will need updating if/when further information is provided by GOV.UK.
To read about the known accessibility issues, scroll halfway down the page to the section titled 'Known issues' using the following links:
GOV.UK Design System radios component GOV.UK Design System checkboxes component
Error messages
Use an error message to identify when the user has not provided the information in the format you are expecting. To help the user, you should show an error message that allows them to fix the problem.
Use the error message examples on the GOV.UK Design System - Checkboxes page and GOV.UK Design System - Radios page. You'll have to scroll down the page to the example error messages. You can also find further guidance on writing error messages on the GOV.UK Design System - Error message page.
Use the examples in the GOV.UK Design System, but if you need further help with writing an error message where you can't find an example, then speak to someone in the Content and UX team for help.
Accessibility statement
This pattern has a rating of ##
There are some known accessibility issues that GOV.UK discuss in the 'An update on the accessibility of conditionally revealed questions' blog.
To read the GOV.UK guidance on known accessibility issues, scroll halfway down the page to the section titled 'Known issues' using the following links:
GOV.UK Design System radios component GOV.UK Design System checkboxes component
The guidance on this GitHub page for accessibility will need updating if/when further information is provided by GOV.UK.
Please see our accessibility statement.
Improvements
To make it AAA, we need to:
Examples
GOV.UK Design System radios component GOV.UK Design System checkboxes component
Research
More research is needed to develop this part of the radio button and checkbox component.
Check GOV.UK Design System Community Backlog and GOV.UK Design System Components for further updates: GitHub GOV.UK Design System Community Backlog GOV.UK Design System radios component GOV.UK Design System checkboxes component
Discuss
Pause