-
Notifications
You must be signed in to change notification settings - Fork 13
test(mwpw-182777): a11y automation #344
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Core Web Vitals Metrics
Recorded at: 2025-10-23T22:55:21.959Z |
Core Web Vitals Metrics
Recorded at: 2025-10-23T22:58:00.575Z |
Core Web Vitals Metrics
Recorded at: 2025-10-23T22:58:34.654Z |
Core Web Vitals Metrics
Recorded at: 2025-10-23T23:00:24.329Z |
cmiqueo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See my comments
| // the text card uses the image as logo | ||
| src={isText ? image : logoSrc} | ||
| alt={isText ? altText : logoAlt || ''} | ||
| alt={isText ? (altText || 'Card image') : (logoAlt || 'Logo')} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a note that 'Card image' and 'Logo' won't get translated.
For text-cards we don't want an alt value because the image should be decorative and don't want the screen reader to read it out loud.
Core Web Vitals Metrics
Recorded at: 2025-10-24T00:43:52.949Z |
Core Web Vitals Metrics
Recorded at: 2025-10-24T12:03:43.392Z |
π― Summary
Adds automated accessibility testing using jest-axe to catch a11y violations at the unit test level before deployment.
π Changes
Infrastructure
jest-axeandaxe-coredependenciesTesting/Utils/a11yTest.js)testA11yForConfigs()- Test multiple component configurationstestAccessibility()- Test single configurationTests Added (35+ new a11y tests)
Each test automatically runs 90+ accessibility checks including:
Bugs Fixed
jest-axe caught and we fixed 5 real accessibility issues:
aria-levelCard.jsx:193aria-level={3}aria-label=""Card.jsx:586,597Card.jsx:520,531Popup.jsx:111aria-labelIcon.spec.js:37π Benefits
π§ͺ Testing
Run all tests (includes a11y):
ποΈ Architecture
Layer 1: ESLint jsx-a11y (static analysis)
β
Layer 2: jest-axe (unit tests) β NEW!
β
Layer 3: Pa11y (integration, after deploy)
π Example Error Output
Before this PR, we had no automated way to catch these issues. Now:
FAIL Card.spec.js
β Card should have no a11y violations
Clear, actionable, automated! β¨
π Impact
π Files Changed
Added:
Modified:
π Related
β Checklist
π Usage for Future PRs
When adding new components, include:
That's it! Automatic a11y testing with one line. π
π€ Reviewers
Please verify:
πΈ Screenshots
Tests running:
PASS Search.spec.js
β Accessibility tests (127ms)
β Search with empty value should have no a11y violations
β Search with populated value should have no a11y violations
PASS Grid.spec.js
β Accessibility tests (94ms)
β Grid with default cards should have no a11y violations