
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
cypress-accessibility-audit
Advanced tools
Test accessibility with HTMLCodesniffer in Cypress.
cypress-accessibility-audit
from npm.yarn add cypress-accessibility-audit --dev
yarn add cypress --dev
/cypress/support/index.js
file to include the cypress-accessibility-audit
commands by adddingimport 'cypress-accessibility-audit/commands'
/cypress/plugins/index.js
file, add the following code to included the required tasks:// /cypress/plugins/index.js
const { a11yAudit } = require('cypress-accessibility-audit');
module.exports = on => {
// ...other plugins
on('task', a11yAudit);
}
This command will run the accessibility audit agaist the document at which point it is called. This means that you can interact with your page and uncover accessibilty issues introduced with your actions.
The command cy.a11y(config: A11yConfig)
takes a config argument to help customize behavior
type a11y = (config: A11yConfig) => void;
interface A11yConfig {
/**
* This is the directory to which the csv report is written to.
* @default /cypress/reports
*/
path: string
/**
* This is the name of the file for the csv accessibilty report.
* @default /accessibility_report.csv
*/
filename: string
}
// Basic Usage
it('should pass the audits', () => {
cy.a11y();
})
After a accessibility audit is run, a full report will be written as a csv
to either the path you specify in your config or if you do not set a custom destination, /cypress/reports/accessibility_report.csv
.
This report can then be viewed to see a full summary of all applicable accessibility issues that need to be addressed.
FAQs
Unknown package
We found that cypress-accessibility-audit demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.