Closed RossDBrown closed 2 years ago
Thanks for taking the time to raise this @RossDBrown.
We need to explore accessibility concerns of doing this vs moving the conditional question to the next page and having the initial question replayed either in hint or a hybrid statement/question. Conditional reveals are charged with a11y concerns (https://accessibility.blog.gov.uk/2021/09/21/an-update-on-the-accessibility-of-conditionally-revealed-questions/). We've asked @abbott567 @jon-houghton for their input, but what you've outlined is in use across services and good discussion point.
@RossDBrown A late update on this. The ability to conditionally reveal on inline radios used to be an option in GOV.UK Elements, way before the design system. GDS removed this because of the problems it caused when mis-used. @abbott567 had this take on the a11y concerns on conditional reveals:
…from an accessibility point of view, conditional reveals are currently a fail on WCAG 2.1 due to the way GDS have tagged them up. They use aria attributes on elements which is not allowed in the HTML5 spec. It seems to work, but its technically a fail on 4.1.2 Name, Role, Value: Radios – GOV.UK Design System (design-system.service.gov.uk)
Conditional reveals add a layer of complexity which is often confusing. We should really discourage designers from using them unless absolutely essential, particularly if there they are revealing more than a single field. Multiple fields being revealed causes big issues for screen reader users: The logical order of conditionally revealed content as it appears within a set of radios or checkboxes can be confusing · Issue #1988 · alphagov/govuk-frontend · GitHub
Your example is considerate, but we need to err on the side of caution with this one based on what we've seen in the past. If we add a component to make it easy for people to do this, they may well introduce barriers to their service for users.
We really appreciate the contribution and time you spent documenting it.
Radio Button - Conditional reveal on inline radios
Why
Anything else