Repository navigation
test(webapp): let a page stop moving before axe audits it - #293
Conversation
The dark theme from #289 raises each block of a page into view, fading it in over 640 ms. axe reads colours at the instant it looks, so an audit that caught a block mid-fade measured its text at a fraction of its opacity: the genre test reported a 4.15:1 contrast for a token that holds well above 4.5:1, failing five runs in eight locally and turning CI (Web) red on main. The seventeen audits were the same four lines, now one helper, expectNoWcagViolations, which first waits for every finite animation to finish. An infinite one, the pulse of a loading skeleton, would never settle and is left running. Signed-off-by: InstaZDLL <github.105mh@8shield.net>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
Why
The dark theme added by #289 raises each block of a page into view (
fe-rise, a 640 ms fade and lift, staggered up to 210 ms). axe reads colours at the instant it looks, so an audit that lands mid-fade measures text at part of its opacity. On/genresit reported#76736don#0b0b0e(4.15:1), which is--fe-ink-3(#8e8b83) at about 80 % opacity. The finished page has no such contrast problem.Locally the genre test failed 5 runs in 8. On main, CI (Web) for the #289 merge (6315eb8) failed with 119
color-contrastentries alongside thelabel-content-name-mismatchones that #290 fixed.What
The 17 inline audits in
studio-nocturne.spec.tswere all the same four lines. They are now one helper,expectNoWcagViolations(page), which first waits for every finite animation fromdocument.getAnimations()to finish, then runs the sameAxeBuilderwith the same tags. Infinite animations, such as the loading skeleton's pulse, are skipped because they never finish. No application code changes.Verification
bun run lint,bun run test(179 passed),bun run build.--repeat-each 8, desktop and mobile: 16/16 passed.getAnimations().slice(0, 0)), the same run fails 11/16, every failurecolor-contrast.--repeat-each 2: 322 passed, 22 skipped (the spec's existingtest.skip(calls, twice).Summary by CodeRabbit