question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

The expanded/collapsed state of conditional reveals is not available to all assistive technologies

See original GitHub issue

What

As part of an internal accessibility audit of GOV.UK, conditional reveals† was flagged as failing WCAG 4.1.2:

4.1.2 Name, Role, Value: For all user interface components (including but not limited to: form elements, links and components generated by scripts), the name and role can be programmatically determined; states, properties, and values that can be set by the user can be programmatically set; and notification of changes to these items is available to user agents, including assistive technologies. (Level A)

It was flagged as failing because:

  • the additional ‘role’ of the checkbox or radio button is not clear
  • changes to the expanded ‘state’ of the radio buttons is not available to assistive tech, and so users may be unaware that something else has changed on the page as a result of selecting a radio.

We use aria-expanded on these controls, but that is technically invalid according to the spec, which only allows aria-expanded on certain roles. Some screen readers still announce the expanded state, but those that don’t have no reason to implement it because it’s against the spec. ARIA 1.2 (which is currently in draft) extends support of aria-expanded to checkboxes but not radios.

The fact that aria-expanded is not valid is recorded as a separate but related issue (https://github.com/alphagov/govuk-frontend/issues/979).

As of September 2019, this is known to affect:

Update

As of June 2021, we removed conditional reveals from our accessibility statement.


† The page being audited uses the conditional reveals in an unusual way, as what’s being revealed is effectively contextual help (like a hint) that would help the user to make the right choice. Whereas the way we intend the component to be used is to reveal additional form controls that ‘follow on’ from the initial question. We think that revealing text in this way is ‘worse’ in terms of accessibility, so we have a separate issue to discourage users from using conditional reveals to reveal text (https://github.com/alphagov/govuk-design-system/issues/1362)

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:13 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
36degreescommented, Oct 6, 2020

Thanks @paulwaitehomeoffice – that’s really helpful. Out of interest, did you try a variation with an explicit role of radiogroup on the fieldset? I believe the default role for fieldset is just group.

Either way, it’s interesting to note that the current draft of ARIA 1.2 removes support for aria-expanded on a radiogroup. It looks like this was done in https://github.com/w3c/aria/pull/972, which ‘[revises] aria-expanded definition to state it aria-expanded belongs on interactive, focusable, controlling element’ – which again suggests to me the attribute should be added to the control rather than the group (ignoring the fact that this is still technically invalid).

I think there’s a possibility that we’re going to end up raising an issue against the ARIA spec making the case for extending aria-expanded support to radios as they have in checkboxes. Would you be happy for us to include your research as part of that issue, with a credit?

0reactions
CharlotteDownscommented, Jul 1, 2021

We’ve removed ‘(WCAG 2.1 4.1.2 Name, Role, Value)’ from this issue as part of removing conditional reveals from our accessibility statement.

Read more comments on GitHub >

github_iconTop Results From Across the Web

An update on the accessibility of conditionally revealed ...
In September 2020, the GOV.UK accessibility team found an accessibility issue with conditional reveals. They discovered that users are not ...
Read more >
Understanding Success Criterion 4.1.2 - W3C
The focus state of a control can be programmatically determined, and notifications about change of focus are sent to user agents and assistive...
Read more >
Guide to Accessible Web Design & Development
Do you know how to create accessible digital products and services? This guide recaps relevant Web Content Accessibility Guidelines (WCAG)requirements and ...
Read more >
If HTML and ARIA don't allow it, it's probably a bad idea
Sounds obvious, but in practice it's not always that simple! ... or “Text message” are the available responses; The conditionally revealed ...
Read more >
Almost one billion children and adults with disabilities and ...
A new report published today by WHO and UNICEF reveals that more than ... and prioritize access to assistive technology and give everyone...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found