Repository navigation
Pause the landing page's animation before checking contrast - #509
Merged
Merged
Conversation
…es it The check now opens pages asking for less motion and finishes or pauses any animation before axe runs, so a fade caught half-way no longer fails colour contrast at random on the landing page (#503). Co-Authored-By: Philip Lau <philip15@live.dk> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MdMWuRPVdnazxun96Pb78e
The CI check sees the citation example only on its first verdict, so the checking, partly and not supported states are checked here at their final colours, in both themes (#503). Co-Authored-By: Philip Lau <philip15@live.dk> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MdMWuRPVdnazxun96Pb78e
Co-Authored-By: Philip Lau <philip15@live.dk> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MdMWuRPVdnazxun96Pb78e
Co-Authored-By: Philip Lau <philip15@live.dk> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MdMWuRPVdnazxun96Pb78e
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.
The accessibility job in CI has been failing at random on the landing page, with a colour-contrast error on the green "Supported" text of the citation example. The example is a CSS animation that fades each verdict in and out, and axe reads colours as they are drawn, so when it looked during a fade the half-transparent text failed. A re-run passed, and at least five pull requests were hit. Checking the landing page 48 times in a row locally reproduced it 11 times.
This pull request fixes it in the check, not by weakening the rule.
tools/a11y/axe-check.mjsnow opens every page asking for less motion (prefers-reduced-motion: reduce), whichCitationLoopalready honours by stopping on its first verdict, fully drawn. Before axe runs, any animation or transition that still runs to an end is run to it, and any endless one still running is paused, so axe and the screenshots see the same settled frame. Every page and every rule is still checked. With the change, the same 48 landing checks passed three times in a row (144 of 144), and the full CI page list, light and dark, passed three times locally.Because axe now sees the example only on its first verdict, a new test,
CitationLoopContrastTests, checks every state of the example at its final colours in both themes, straight from the tokens inStyles/tailwind.input.css: a citation being checked, each of the three verdict highlights, the chips, and the text and notes on each verdict card. All reach 4.5:1. A second test pins the loop's keyframes to the tokens it checks, so a change there cannot slip past.Nothing changes for the systematic review or for the site itself; only the check and its tests change. The wiki pages 06 and 07 describe the new behaviour.
Closes #503
Generated by Claude Code