{"repo":"Widen/expect-axe-playwright","free":true,"listed":false,"github":"https://github.com/Widen/expect-axe-playwright","clone":"git clone https://github.com/Widen/expect-axe-playwright.git","description":"Expect matchers to perform Axe accessibility tests in your Playwright tests.","language":"TypeScript","stars":24,"topics":["playwright","axe","axe-core","testing","playwright-test","no-cortex"],"license":"ISC","category":"scrapers-browser-automation","readme_excerpt":"expect-axe-playwright Expect matchers to perform Axe accessibility tests in your Playwright tests. Installation npm Yarn Usage Why do I need it? This project was inspired by axe-playwright which did a great job of integrating the axe-core library with some simple wrapper functions. However, the API is not as elegant for testing as would be preferred. That's where expect-axe-playwright comes to the rescue with the following features. - Direct integration with the expect API for simplicity and better error messaging. - Automatic Axe script injection. - Auto-retry until timeout. - Works with [pages], [frames], and [locators]. - HTML report with full violation details. - Project-level option configuration. Here are a few examples: API Documentation toPassAxe This function checks if a given page, frame, or element handle passes a set of accessibility checks. You can test the entire page: Or pass a locator to test part of the page: You can also pass an Axe results object to the matcher: Word of Caution: Limitations to Accessibility Tests It's important to keep in mind that if your page passes the set of accessibility checks that you've configured for Axe, that does not mean that your page is free of all accessibility barriers. In fact, automated testing can only catch a fraction of the most common kinds of accessibility errors. Accessibility is analogous in ways to security. Imagine the following code: It's very hard to say that anything is secure because you never know when someon","default_branch":null,"files":null,"tree":[],"storefront":"/r/Widen","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/Widen/expect-axe-playwright/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}