Skip to content

Commit

Permalink
Merge pull request #8 from Chromeshades/accessibility
Browse files Browse the repository at this point in the history
Added axe-core/playwright for accessibility testing
  • Loading branch information
Chromeshades authored Jul 13, 2024
2 parents 98a6ba7 + 175de40 commit d72b29d
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 1 deletion.
25 changes: 24 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,8 @@
"@playwright/test": "^1.45.1",
"@types/node": "^20.14.10",
"globals": "^15.8.0"
},
"dependencies": {
"@axe-core/playwright": "^4.9.1"
}
}
12 changes: 12 additions & 0 deletions specs/accessibility.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { test, expect } from '../fixtures/base';
import AxeBuilder from '@axe-core/playwright';

test.describe('Accessibility Testing', () => {
test.fail('Accessibility issues - needs development work', async ({ homePage, page }) => {
const accessibilityScanResults = await new AxeBuilder({ page })
.disableRules(['color-contrast'])
.analyze();

expect(accessibilityScanResults.violations).toEqual([]); // 5
});
});

0 comments on commit d72b29d

Please sign in to comment.