Skip to content

test(ui): add jest-axe accessibility checks#77

Merged
mikewheeleer merged 2 commits into
Talenttrust:mainfrom
MerlinTheWhiz:test/jest-axe-integration
Jun 5, 2026
Merged

test(ui): add jest-axe accessibility checks#77
mikewheeleer merged 2 commits into
Talenttrust:mainfrom
MerlinTheWhiz:test/jest-axe-integration

Conversation

@MerlinTheWhiz
Copy link
Copy Markdown
Contributor

Closes #67

Changes Made:

  • package.json (Modified): Added jest-axe dev dependency
  • jest.setup.js (Modified): Registered toHaveNoViolations matcher from jest-axe
  • src/test-utils/a11y.tsx (New): Shared helpers: testA11y(), assertNoA11yViolations(), renderWithA11y()
  • src/components/tests/a11y.test.tsx (New): 15 axe tests across 4 components
  • docs/components/Accessibility.md (New): Documents setup, usage, and CI integration

Test Coverage (all pass, zero violations):

  • MilestonesList — empty, single, multiple statuses, missing dueDate
  • ContractSummary — Active+multiple parties, Disputed, Completed+solo milestone
  • ReputationProfile — no reputation, full score+history, partial (score only), null score
  • EmptyState — text-only, illustration variant, primary action, both actions

How it works:

// One-liner in tests:
await testA11y(<Component prop="value" />);

The testA11y helper renders the component, runs axe() on the container, and asserts toHaveNoViolations(). Axe defaults to WCAG 2.1 AA rules — no custom config needed since components already use proper ARIA landmarks, labels, roles, focus rings, and color contrast.

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented Jun 2, 2026

@MerlinTheWhiz Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@MerlinTheWhiz
Copy link
Copy Markdown
Contributor Author

@mikewheeleer Hey boss, this pr is still up. Please review and merge

@mikewheeleer mikewheeleer merged commit 34e4a06 into Talenttrust:main Jun 5, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add accessibility regression tests with jest-axe for key components

2 participants