Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accessibility Testing[Question] #1638

Closed
tomern opened this issue Apr 2, 2020 · 2 comments
Closed

Accessibility Testing[Question] #1638

tomern opened this issue Apr 2, 2020 · 2 comments

Comments

@tomern
Copy link

tomern commented Apr 2, 2020

Which libraries can you use for accessibility testing? (like axe)

@pavelfeldman
Copy link
Member

You can use Axe, evaluate it in the context of the page and it should work!

@abhinaba-ghosh
Copy link

abhinaba-ghosh commented Jun 27, 2020

Hi @tomern

You can use axe-playwright.

  • Add the library as a dependency:
npm i -D axe-playwright
  • Inject axe in the context of the correct page
beforeAll(async () => {
  browser = await chromium.launch();
  page = await browser.newPage();
  await page.goto(`http://localhost:3000/login`);
  await injectAxe(page);
});
  • Execute custom command to scan the accessibility with Playwright
it('simple accessibility run', async () => {
    await checkA11y(page);
  });

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants