'Select / Unselect all' functionality?
Ian1West1 opened this issue · 6 comments
I am working as a SD on the HMRC help and support email service (along with a UR - a team of two). The user logs into the service with their email address, and that email address is then matched with email subscriptions from various HOD data stores. The user is presented with a list of their current email subscriptions, with the checkboxes ticked by default. They are also presented, below that, with a lis of H&S topics which may also be of interest to them (ie topics to which they are not currently subscribed, with the checkboxes unticked). There are a total of 18 topics.
In some cases, eg an Agent/Accountant, the list of subscribed topics may be quite long.
If a user is subscribed to many topics, and therefore has a lot of checkboxes ticked, is there a pattern to allow for 'uncheck all'?
This is the sort of thing we'd like to do...
I don't think there is a standard approach yet, but I think there's some discussion in the main Checkbox thread:
I think for accessibility it would be a button rather than a link
I agree it should be a button (because buttons do things, links go places), but can't find an appopriate button style... ;-)
Thank you for the link!
...there are a few disussions on that page, but they date from 2018/19, and the links to various prototypes don't work any more ;-)
it would be the standard secondary button:
https://design-system.service.gov.uk/components/button/#secondary-buttons
I have sorta wondered if this would be a button, as opposed to a checkbox with special functions, such as the 'none of the above' functionality.
Check it to automatically check all other checkboxes in the set. Uncheck it to uncheck all of the other checkboxes in the set. Likewise, if all other checkboxes are checked, check it; if not, don't.
yeh I think either could work, pending testing with users. I think a button might be simpler to implement, as you don't have to do the work to keep the states in sync that you mentioned