Security News
MITRE Marks Major Milestone, Minting 400 CNAs as NVD Backlog Grows
MITRE has just minted its 400th CNA, as the NVD struggles to tame its backlog of CVEs awaiting analysis, which has increased by 30% since June.
cypress-accessibility-audit
Advanced tools
Readme
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.
This package is published to the public npm registry and is not scoped
yarn test
to ensure that no regressions were introducednpm version <patch | minor | major>
yarn build
cd ./dist
npm publish
FAQs
Unknown package
The npm package cypress-accessibility-audit receives a total of 52 weekly downloads. As such, cypress-accessibility-audit popularity was classified as not popular.
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
MITRE has just minted its 400th CNA, as the NVD struggles to tame its backlog of CVEs awaiting analysis, which has increased by 30% since June.
Security News
New report from the White House aims to address gaps in open source security, calling for more funding, tighter supply chain controls, and stronger collaboration.
Security News
Explore the security risks of using npm shrinkwrap, the potential for outdated dependencies, and best practices for mitigating these concerns in your projects.