test(animations): add accessibility tests (#4633)#4860
Open
soumyasekharshee265-ux wants to merge 4 commits into
Open
test(animations): add accessibility tests (#4633)#4860soumyasekharshee265-ux wants to merge 4 commits into
soumyasekharshee265-ux wants to merge 4 commits into
Conversation
|
🚨 Hey @soumyasekharshee265-ux, the CI Pipeline is failing on this PR and it has been marked as Please fix the issues before this can be reviewed. Here's how: 1. Run checks locally before pushing: npm run format:check # Check Prettier formatting
npm run lint # Run ESLint
npm run typecheck # TypeScript type check
npm run test # Run unit tests (Vitest)
npm run build # Verify production build passes2. Auto-fix common issues: npm run format # Auto-fix formatting with Prettier
npm run lint -- --fix # Auto-fix lint errors where possible3. Check the full failure log here: Once you push a fix and the CI passes, the |
Contributor
Author
|
Hi @JhaSourav07 👋 The failing CI check is caused by pre-existing test failures unrelated to this PR:
I verified this by:
My contribution is clean and verified:
Only the Vitest step fails — and it fails on pre-existing component tests, not on the file I added. Could you please review when you get a chance? Happy to make any changes you'd like 🙏 Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes #4633
This PR adds a new test file
lib/svg/animations.accessibility.test.tsthat verifies Accessibility Standards & Screen Reader ARIA Compliance for the tower animation CSS generator (lib/svg/animations.ts).Since
getTowerAnimationCSS()produces CSS strings (not DOM elements), the accessibility tests focus on the applicable WCAG concerns for animated CSS output:rise,fade,slide) include@media (prefers-reduced-motion: reduce)support!importantso user accessibility preferences cannot be bypassed by other stylesentrance: 'none'mode produces a fully static render path with zero@keyframesor animation propertiesdisplay: noneorvisibility: hidden, so screen readers always see complete content.cp-towerselectorTest results: 5/5 tests pass in
npx vitest run lib/svg/animations.accessibility.test.ts(5ms duration).Pillar
Visual Preview
No visual changes — this PR only adds a new test file. No source code, themes, or SVG output is modified.
Test run output:
Checklist before requesting a review:
CONTRIBUTING.mdfile.npx vitest run lib/svg/animations.accessibility.test.ts— all 5 tests pass).npm run formatandnpm run lintlocally and resolved all errors (CI will fail otherwise).feat(themes): ...,fix(calculate): ...).README.mdif I added a new theme or URL parameter. (N/A — no new theme or URL parameter added)