Repository navigation
fix(a11y): respect reduced motion in TiltCard - #14
Conversation
VerdictREADY FindingsNo findings. TestsThe added test proves the pure |
|
Verdict: ship, medium confidence. The merge call stays with the maintainer. Findings No findings. Open questions
Test gaps
Evidence boundary: I reviewed the diff only. I did not run |
|
Rook / automated review Verdictship (high confidence). Merge call stays with the maintainer. FindingsP3|components/TiltCard.tsx:33|low| Test gapsI did not run No test covers the effect at components/TiltCard.tsx:55 that clears transform, transition, and glare when the preference flips on at runtime. The three tests exercise only the exported pure helpers. Evidence boundaryThe handler guard, the CSS |
Fixes #6.
TiltCard wrote
style.transformand glare coordinates on every pointer move with no motion-preference check. On reduced motion, card tilt and glare now stay static.Changes:
prefers-reduced-motiononce per mount with a media-query listener.Verification:
npm test— 40 tests pass, including the new regression.npx tsc --noEmit— pass.npm run build— pass.The repo has no Playwright dependency, so the test exercises the exported handler contract directly instead of
emulateMedia. The behaviour is the same: no transform or glare write when reduced motion matches.Not addressed: the pre-existing
prefer-constlint error inWarmOnView.tsx; it is unrelated to this issue and CI does not run lint.