Skip to content

Commit

Permalink
Add best-practice axe rule set (#12017)
Browse files Browse the repository at this point in the history
  • Loading branch information
cy-by authored Jan 24, 2025
1 parent 805849a commit de9c4a1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tests/cypress/support/accessibility.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Cypress.Commands.add("runAccessibilityTests", () => {
cy.checkA11y(
null,
{
values: ["wcag2a", "wcag2aa"],
values: ["wcag2a", "wcag2aa", "best-practice"],
includedImpacts: ["minor", "moderate", "serious", "critical"],
rules: {
"duplicate-id": { enabled: false },
Expand Down
2 changes: 1 addition & 1 deletion tests/playwright/utils/a11y.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export async function e2eA11y(page: Page, url: string) {
for (const size of Object.values(breakpoints)) {
page.setViewportSize({ width: size[0], height: size[1] });
const results = await new AxeBuilder({ page })
.withTags(["wcag2a", "wcag2aa"])
.withTags(["wcag2a", "wcag2aa", "best-practice"])
.disableRules(["duplicate-id"])
.analyze();
expect(results.violations).toEqual([]);
Expand Down
2 changes: 1 addition & 1 deletion tests/playwright/utils/pageObjects/base.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export default class BasePage {
for (const size of Object.values(breakpoints)) {
this.page.setViewportSize({ width: size[0], height: size[1] });
const results = await new AxeBuilder({ page: this.page })
.withTags(["wcag2a", "wcag2aa"])
.withTags(["wcag2a", "wcag2aa", "best-practice"])
.disableRules(["duplicate-id"])
.analyze();
expect(results.violations).toEqual([]);
Expand Down

0 comments on commit de9c4a1

Please sign in to comment.