Socket
Socket
Sign inDemoInstall

cypress-axe

Package Overview
Dependencies
Maintainers
2
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cypress-axe

Test accessibility with axe-core in Cypress


Version published
Weekly downloads
350K
decreased by-19.5%
Maintainers
2
Weekly downloads
 
Created

What is cypress-axe?

The cypress-axe npm package is a plugin for Cypress that integrates the axe-core accessibility testing engine. It allows you to automate accessibility testing within your Cypress end-to-end tests, making it easier to identify and fix accessibility issues in your web applications.

What are cypress-axe's main functionalities?

Injecting axe-core

This feature allows you to inject the axe-core library into your application. This is a necessary step before running any accessibility checks.

cy.injectAxe();

Running accessibility checks

This feature allows you to run accessibility checks on the entire page or a specific element. It will log any accessibility violations to the Cypress test runner.

cy.checkA11y();

Customizing axe-core options

This feature allows you to customize the axe-core options, such as specifying which accessibility standards to test against. In this example, it runs checks only for WCAG 2.0 A and AA standards.

cy.checkA11y(null, { runOnly: ['wcag2a', 'wcag2aa'] });

Excluding elements from checks

This feature allows you to exclude specific elements from accessibility checks. In this example, elements with the class 'ignore-this' will be excluded from the checks.

cy.checkA11y({ exclude: ['.ignore-this'] });

Other packages similar to cypress-axe

Keywords

FAQs

Package last updated on 01 Sep 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc