-
Notifications
You must be signed in to change notification settings - Fork 75
Description
Product
playwright
Product Version
^4.9.1
Latest Version
- I have tested the issue with the latest version of the product
Issue Description
Expectation
After developping a custom solution for testing a components library using @axe-core/webdriverjs I wanted to improve my project's workflow using Playwright and the dedicated @axe-core/playwright package.
Both were configured with same options:
export const AxeOptions: RunOptions = {
resultTypes: ['violations', 'incomplete'],
rules: {
'page-has-heading-one': { enabled: false },
'landmark-one-main': { enabled: false },
region: { enabled: false },
'color-contrast': { enabled: false },
},
runOnly: ['best-practice', 'wcag2a', 'wcag2aa', 'wcag21a', 'wcag21aa'],
reporter: 'v2',
}
As I was using same configuration of the AxeBuilder I expected having same results when testing this page. But for some reason it is not the case 😞
Actual
The custom script actually returns no errors (no violation nor incomplete one). But when I run my Playwright test, I got following results.
How to Reproduce
You can clone the related project. Then:
npm inpm run test:a11yfor Playwright+Axe implementation. The result will be directly logged, and also written as JSON file atpublic/a11y/a11y-report.json.npm run a11y:checkfor custom script execution. If having someselenium-webdriverissues please executenpm run storybook:startthen in parallelnode bin/check-a11y.js. The result will be directly logged, and also written as JSON file atpublic/a11y-report.json.
Additional context
As I'm perfectly fine with fixing errors, I'd be very happy to understand the reason of these differences 🙂 Maybe I forgot something in my implementations/instanciations of any of the Axe packages?
Anyway, as I'd like to compare both solutions (CI execution time, ...) before eventually going with Playwright one, I'd like to have them working with equivalent configuration!
Thx in advance for all your amazing work, and for your help! 🙏