Skip to content

Commit

Permalink
Change aria-allowed-attr to not fail test
Browse files Browse the repository at this point in the history
The govuk-frontend package we use is generally considered a best practice UI toolkit.
However it includes the ‘aria-expanded’ attribute on radio buttons which
currently goes against WCAG guidelines. GDS, the maintainers of govuk-frontend,
have petitioned WCAG to allow this attribute on radios: w3c/aria#1404.
It looks possible that it will be accepted and therefore we can’t expect
the attribute to be removed from govuk-frontend any time soon. Similarly
due to the pace WCAG moves we can’t expect the proposed changes to be
accepted any time soon. Therefore are forced to prevent this rule from
failing the tests until either govuk-frontend remove ‘aria-expanded’ from
radio buttons or WCAG accept that it should be included on radio buttons.
  • Loading branch information
rich committed Apr 27, 2023
1 parent c8bb3a0 commit 5eb81c1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions integration_tests/pages/page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export default abstract class Page {
constructor(private readonly title: string) {
this.checkOnPage()
cy.injectAxe()
cy.configureAxe({ rules: [{ id: 'aria-allowed-attr', reviewOnFail: true }] })
cy.checkA11y()
}

Expand Down

0 comments on commit 5eb81c1

Please sign in to comment.