Skip to content
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

Investigate removing nested option in checkboxes component #4063

Open
andysellick opened this issue Jun 14, 2024 · 0 comments
Open

Investigate removing nested option in checkboxes component #4063

andysellick opened this issue Jun 14, 2024 · 0 comments
Labels
breaking change A breaking change is present in this issue or pull request

Comments

@andysellick
Copy link
Contributor

andysellick commented Jun 14, 2024

We have a nested option for the checkboxes component, which looks like this:

Screenshot 2024-06-14 at 14 57 28

The Design System component on which this component is based doesn't have this option - we added it as a custom option a few years ago. There are some possible accessibility concerns:

  • no hierarchy present for screen reader users to understand that nested checkboxes belong to a parent (was previously in a list, but we've updated the markup to match the DS component, which uses DIV elements instead of lists)
  • no indication for screen reader users that changing nested checkboxes can select/deselect parent checkboxes (is this a problem?)

It's not currently clear how widely used the nested option is. One usage is when choosing 'Get emails' on some finders, which often shows something like this:

Screenshot 2024-06-14 at 15 03 14

This could potentially be a non-nested list with an 'all' option appended.

Other uses to investigate:

  • collections-publisher (1)
  • content-publisher (1)
  • datagovuk_find (1)
  • finder-frontend (2)
  • release (1)
  • signon (7)
  • smart-answers (1)
  • travel-advice-publisher (3)
  • whitehall (21)

If we weren't using the nested option we could remove it and save ourselves a chunk of JavaScript and the general maintenance overhead, but further investigation is needed.

@MartinJJones MartinJJones added the breaking change A breaking change is present in this issue or pull request label Aug 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change A breaking change is present in this issue or pull request
Projects
None yet
Development

No branches or pull requests

2 participants