
Security News
PodRocket Podcast: Inside the Recent npm Supply Chain Attacks
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
@sa11y/format
Advanced tools
@sa11y/format
Format accessibility results from axe
import axe from 'axe-core';
import { A11yError } from '@sa11y/format';
const results = await axe.run();
console.log(A11yError.checkAndThrow(results.violations));
Filter out specific accessibility violations based on rule ID and CSS selectors:
import { exceptionListFilter, exceptionListFilterSelectorKeywords } from '@sa11y/format';
// Filter by rule ID and specific CSS selectors
const exceptionList = {
'color-contrast': ['.btn-secondary', '.text-muted'],
'landmark-one-main': ['body'],
};
const filteredResults = exceptionListFilter(violations, exceptionList);
// Filter by selector keywords
const keywords = ['known-issue', 'legacy-component'];
const keywordFilteredResults = exceptionListFilterSelectorKeywords(violations, keywords);
Process and enhance accessibility results with WCAG metadata:
import { A11yResult, appendWcag } from '@sa11y/format';
// Process individual result
const processedResult = new A11yResult(violationData);
// Add WCAG metadata to results
const resultsWithWcag = appendWcag(violations);
FAQs
Accessibility results re-formatter
The npm package @sa11y/format receives a total of 14,822 weekly downloads. As such, @sa11y/format popularity was classified as popular.
We found that @sa11y/format demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers 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
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
Security News
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.