Repository navigation
fix(a11y-gate): audit a story only once it has finished rendering - #523
Merged
Merged
Conversation
settled() now holds out while a loading placeholder (data-sy-loading) is on the page, so a view whose body is a lazy chunk is audited on its content, not its skeleton. After the audit the gate settles again and recounts the tab stops; a changed count, an unstamped control, or a placeholder still up at the cap fails the story as `unsettled` instead of passing or failing it on a partial read. Closes #515 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Count tab stops before axe runs as well as after the probe, so content landing while axe runs is caught; recount after a fixed 100ms instead of a second quiet window (58s -> 49s); pass settle options as one object; drop the unrelated reformatting; state the cause as React's 300ms Suspense reveal throttle and keep the quiet window for unmarked pending states. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Contributor
|
🤖 no session running recent dispatchesWritten by the sydevs dispatcher. Sessions never edit this comment. |
The keyboard walk started from wherever the page had put focus, since document.body.focus() is a no-op: Schedule-X's month agenda focuses its day cell on the audit's own attribute stamping, so views--calendar walked 0 of 9 stops and passed. Start from a focused anchor at the top instead, stop a skipped Radix focus sentinel spending a press (atoms--drawer walked 0 of 1), and fail a walk that reaches none of a story's stops as `keyboard-walk`. The calendar's walk then found a real gap: the agenda's selected day is the grid's one Tab stop and focus painted nothing over its selection ring. It now draws the app's focus outline. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
sahajatlas-design | 5a25d45 | Nov 27 2026, 12:28 AM |
6 tasks
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.
Summary
views--event-·-sticky-registerreads all 12 stops on every rununsettled, instead of quietly passing or failing on a partial pageviews--calendarandatoms--drawerand passed anyway. It now walks both, and an empty walk is a finding. Joined because it is the same class of silent partial read the ticket targetsChange outline
Flow — one story's audit
settled()now waits for the widget's own placeholder marker (data-sy-loading,LOADING_ATTR) to clear. A recount after the audit checks whether the gate read the whole page.Behaviour — the calendar's selected day
Schedule-X marks the agenda's selected day with an inset ring, and focus left that ring unchanged. The selected day is the grid's one Tab stop, so tabbing into the grid showed nothing.
src/styles/globals.css +.sx-calendar .sx__month-agenda-day:focus-visible → focus-outlineBehaviour — the report
## Accessibility gate — N findings +N stories, M controls measured. # printed on red too, so runs comparePreview
-designpreview alias carries the same story once it is built.Test results
--full: ✓ (lint, typecheck, 2655 unit tests, build withassert-css-scoped, size)scripts/check-a11y.test.ts17 passedpnpm test:a11yafterpnpm ladle:build: repeated full runs measured 688 controls each, about 49s per run (41s before). The count was 689 earlier the same day on both the old and the new code, which points to the date-driven calendar content, not this change.views--calendarreaches 9 of 9 stops andatoms--drawer1 of 1 (0 of each before). No story now walks 0 of a non-zero count.Manual verification
pnpm ladle:build, thenfor i in 1 2 3 4 5; do node scripts/check-a11y.mjs | grep 'controls measured'; done. The count should be identical on every run.Notes for reviewer
FALLBACK_THROTTLE_MSholds a Suspense boundary's content back at least 300ms after its fallback commits. That is longer than the 250ms quiet window.views--eventwas also read on its skeleton, not only the sticky story. The marker covers skeleton phases only, so the quiet window must stay: at 50ms, unmarked states (the boot spinner, lazy mapbox-gl, a late row inviews--countries) read partial in 7 of 18 reads.MutationObserverthat callsfocus()on its day cell after any attribute change inside it. The audit's owndata-a11y-orderstamping counts as one.document.body.focus()cannot take focus back, because the body is not focusable. So the walk started on the day cell, and its first Tab left the page.src/styles/triggers it. The change is one CSS rule nested under.sx-calendar, andassert-css-scopedconfirms every rule is confined to.sy-atlas. There is no data path.main, for a reason unrelated to this PR.organisms--mapboxreports "Mapbox homepage" at 88×24 when a real token loads the map.organisms--skeletondoes, and it is listed.Skeleton.tsx." Dismissed:Skeleton.test.tsxalready loads it in the same node lane.Detail
aria-busywas rejected as the readiness signal.atoms--buttonandorganisms--load-moreshow it on purpose at rest.stopsBeforeexists for slow machines. Under 4× CPU throttle the content swap moves intoaxe.run, where both later counts agree and only the pre-axe count differs.atoms--inputs--radio-group(5 of 13) andmolecules--form-field(13 of 15) still walk short of their count. That is expected: a roving group is one Tab stop holding several elements. Only an empty walk is a finding..mjs.Closes #515
🤖 Generated with Claude Code