@scania/tegel-cli
Version:
CLI tool for copying and transforming Tegel components with custom prefixes
17 lines (13 loc) • 417 B
text/typescript
import AxeBuilder from '@axe-core/playwright';
const disabledRules = ['page-has-heading-one', 'landmark-one-main', 'region'];
const rules = [
'best-practice',
'wcag2a',
'wcag2aa',
// 'wcag2aaa', // includes color-contrast-enhanced rule
'wcag21a',
'wcag21aa',
'wcag22aa',
];
export const tegelAnalyze = async (page) =>
new AxeBuilder({ page }).disableRules(disabledRules).withTags(rules).analyze();