test(core-ui): add axe-core a11y assertions to CookieConsentBanner

Previous attempt was rejected because the axe-core a11y requirement
had no test infrastructure — ARIA roles were correct but unverified by
a scanner. This adds jest-axe (approved via library-decision trace) and
asserts toHaveNoViolations() for both modal and banner variants.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-19 21:36:26 +00:00
parent cbe7412a58
commit 051bfbf062
5 changed files with 406 additions and 3 deletions

View File

@@ -27,9 +27,11 @@
"@testing-library/jest-dom": "^6.5.0",
"@testing-library/react": "^16.0.0",
"@testing-library/user-event": "^14.5.0",
"@types/jest-axe": "^3.5.9",
"@types/react": "^19.0.0",
"jsdom": "^25.0.0",
"@vitest/coverage-v8": "^3.0.0",
"jest-axe": "^10.0.0",
"jsdom": "^25.0.0",
"vitest": "^3.0.0"
}
}