it('has no axe violations', async () => {
const fixture = renderComponentFixture(MyWidgetComponent, { inputs: { ... } });
await ExpectNoAxeViolations(fixture);
});
// With tracked debt (widget fix is product work):
// A11Y-DEBT: label — the search input has no accessible name (placeholder only).
await ExpectNoAxeViolations(fixture, { disableRules: ['label'] });
Run axe-core against a rendered component fixture and FAIL the test if any accessibility violations are found — with a message listing each violation's rule id, impact, and the impacted DOM nodes.
The scan uses a jsdom-safe preset (JSDOM_UNSUPPORTED_AXE_RULES): rules that need a real layout engine (color-contrast) or a full page (landmark/region structure) are disabled, because a jsdom component fragment can never satisfy them honestly. Everything else — labels, alt text, ARIA validity, roles, names — runs at full strength.