
Security News
Socket Integrates With Bun 1.3’s Security Scanner API
Socket now integrates with Bun 1.3’s Security Scanner API to block risky packages at install time and enforce your organization’s policies in local dev and CI.
@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 12,819 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 now integrates with Bun 1.3’s Security Scanner API to block risky packages at install time and enforce your organization’s policies in local dev and CI.
Security News
Python 3.14 adds template strings, deferred annotations, and subinterpreters, plus free-threaded mode, an experimental JIT, and Sigstore verification.
Security News
Former RubyGems maintainers have launched The Gem Cooperative, a new community-run project aimed at rebuilding open governance in the Ruby ecosystem.