-
Notifications
You must be signed in to change notification settings - Fork 0
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
[TASK] Fix Lighthouse failure - radios #216
Comments
This one is flagged by lighthouse because the Here is the discussion that has been had on the gov.uk DS about it (alphagov/govuk-design-system-backlog#59 (comment)) and the following issue (alphagov/govuk-frontend#979) in which it is discussed and their rationale for making the decision of keeping the invalid attribute in and ignoring the test failures for the time being. Based on this I think we should do the same and see if we can ignore this failure by changing the lighthouse config. |
Have contacted DAC to see if there is any value in using this attribute on radios for screen readers. Moving to blocked waiting for response |
Response from DAC on this that may require some discussion and a design decision: While we recognise the use of radio elements with unsupported aria-expanded attributes as a technical failure of WCAG 2.2 Success Criterion 4.1.2: Name, Role, Value, our users do not find there to be an issue with it. In some cases, depending on the combination of web browser and assistive technology, the expandible / collapsible functionality is not exposed to screen reader users; however, our screen reader users do not typically report issues locating or interacting with conditionally revealed content. So in that sense, removing aria-expanded attributes from the conditionally revealing radio elements should not have an adverse effect on most screen reader users. However, this would not conform with the GOV.UK Design Systems current recommendations and it would deprive screen reader users who may otherwise benefit from the use of radio elements with aria-expanded attributes. We are aware that the Government Digital Service have had conversations with the ARIA Working Group who agree that the use of radio elements with aria-expanded attributes should not be classed as a fail. For that reason, we do not report the use of radio elements with the presently unsupported aria-expanded attributes as a failure. We do, however, recommend that clients address this subject in their accessibility statement to indicate that they are aware of the continued development of the ARIA Working Groups technical specifications. We don’t believe that the ARIA Working Group has amended the technical specifications as of yet and in the meantime we strongly recommend avoiding conditionally revealing radios. Suitable alternatives might include: Providing an additional form input related to specific radios directly below the radio group and provide a descriptive label that references the corresponding radio; |
After discussion with IXD have decided to remove the ability to hide inputs on radios and just have them always show on page load, we will then not need to set the |
Alessio addressed Lighthouse failure in the ticket ONSdigital/design-system#3350.
As an outcome of the above ticket, identified a need to address the warnings for all below radio component.
List of components
1 result(s) for http://localhost:39203/components/radios/example-radios-with-revealed-text-input.html
1 result(s) for http://localhost:39203/components/radios/example-radios-with-revealed-text-input-expanded.html
1 result(s) for http://localhost:39203/components/radios/example-radios-with-revealed-text-area.html
1 result(s) for http://localhost:39203/components/radios/example-radios-with-revealed-text-area-expanded.html
1 result(s) for http://localhost:39203/components/radios/example-radios-with-revealed-select.html
1 result(s) for http://localhost:39203/components/radios/example-radios-with-revealed-select-expanded.html
1 result(s) for http://localhost:39203/components/radios/example-radios-with-revealed-radios.html
1 result(s) for http://localhost:39203/components/radios/example-radios-with-revealed-radios-expanded.html
1 result(s) for http://localhost:39203/components/radios/example-radios-with-revealed-checkboxes.html
1 result(s) for http://localhost:39203/components/radios/example-radios-with-revealed-checkboxes-expanded.html
1 result(s) for http://localhost:39203/components/radios/example-radios-with-clear-button.html
1 result(s) for http://localhost:39203/components/radios/example-radios-with-clear-button-expanded.html
1 result(s) for http://localhost:39203/patterns/correct-errors/example-errors-proto.html
1 result(s) for http://localhost:39203/patterns/correct-errors/example-errors-proto-errors.html
1 result(s) for http://localhost:39203/patterns/feedback/example-feedback-form.html
1 result(s) for http://localhost:39203/patterns/feedback/example-feedback-form-errors.html
Action
Use yarn start and then move onto the above components in order. Use the lighthouse test from the google chrome dev tools. Run the test on the component and only look at the accessibility score. Fix the issues highlighted under the accessibility section. Run the test again and confirm that they are now at 100. Move on to the next component.
The text was updated successfully, but these errors were encountered: