Skip to content

Add automated accessibility tests (jest-axe + cypress-axe) - #2690

Open
MustafaGood wants to merge 4 commits into
compdemocracy:edgefrom
MustafaGood:feature/a11y-automated-tests
Open

Add automated accessibility tests (jest-axe + cypress-axe)#2690
MustafaGood wants to merge 4 commits into
compdemocracy:edgefrom
MustafaGood:feature/a11y-automated-tests

Conversation

@MustafaGood

@MustafaGood MustafaGood commented Aug 3, 2026

Copy link
Copy Markdown

Summary

  • Adds jest-axe in client-participation-alpha with a11y tests for SurveyForm, EmailSubscribeForm, InviteCodeSubmissionForm, and Statement
  • Adds cypress-axe smoke tests in e2e for .statement-card and .submit-form (critical/serious)
  • Fixes WCAG AA contrast on vote buttons (Agree/Disagree) found by the tests

Test plan

  • cd client-participation-alpha && npm test -- --testPathPatterns=a11y
  • cd client-participation-alpha && npm run verify (or at least test + lint + build)
  • cd e2e && CYPRESS_BASE_URL=https://localhost npm run test:a11y
  • Manual: open /alpha/52czbnk3jn and confirm Agree/Disagree remain clearly visible

Notes

  • Branch: feature/a11y-automated-tests
  • Cypress smoke uses conversation 52czbnk3jn (override: CYPRESS_A11Y_CONVERSATION_ID)

Add accessible labels, status/alert live regions, global focus-visible, modal keyboard support, and main landmark in client-participation-alpha.
Associate form errors via aria-describedby and expose toggle state on visualization controls for screen readers.
Expose opinion-group chart name to assistive tech and announce selected group/statement outside the SVG.
Catch accessibility regressions with component axe tests and an e2e smoke; darken vote button colors to meet WCAG AA contrast.
@MustafaGood MustafaGood changed the title Vecka 9-10: Automatiserade tester (P1) Add automated accessibility tests (jest-axe + cypress-axe) Aug 20, 2026
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.

1 participant