Repository navigation
fix(web): WCAG AA contrast in both themes, modal focus trap, skip link - #69
Merged
Merged
Conversation
…k and / to search D-046: text tokens gain light/dark AA pairs (anvil-500 #6b6460; caution/verify -400/-700), every bare low-contrast text class becomes a pair, hljs comments, the home headline, and diff A/D letters follow the colour-blind palette. Scroll regions (code, diffs, wide tables) take focus only while they overflow. D-047: dialogs trap Tab/Shift+Tab, land on the autoFocus field, restore focus to the opener and stack; a skip-to-content link; / focuses the jump box. The theme toggle cycles dark/light/system. Tests: contrast unit tests check tints and guard sources; e2e/a11y.spec.ts runs axe on every route in both themes; e2e/keyboard-theme.spec.ts covers focus, skip link, / and theming. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
|
Warning Review limit reachedNext included review available in 56 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (81)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
PastaPastaPasta
added a commit
that referenced
this pull request
Sep 27, 2026
Follows the contrast rules from #69: the create page's key notes and the sealed-limit overrun use the -700 / dark:-400 text shades, not the icon and border base colors. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
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
Fixes D-046 (WCAG AA contrast) and D-047 (dialog focus, skip link,
/to search). It also makes the dark/light/system theme toggle work, persist, and apply before first paint.Contrast (D-046)
tailwind.config.js,docs/design/style-guide.md):anvil-500is now#6b6460, which gives 5.3:1 onanvil-100; Tailwind's#78716cwas 4.39:1.cautionandverifygain-400(dark text) and-700(light text) shades.caution-700is now#a14a08, because the old#b45309was 3.95:1 on its own tint.text-caution,text-verifyandtext-dangerbecometext-{state}-700 dark:text-{state}-400;text-anvil-400becomestext-anvil-500 dark:text-anvil-400;text-forge-600becomestext-forge-700, ortext-forge-800on an ember tint.ScrollRegionmakes code, diff and wide-table blocks keyboard-scrollable. It joins the Tab order only while its content overflows.Keyboard (D-047)
components/ui/dialog.tsx:autoFocusfield (the New-issue Title), not the panel;aria-labelledbyandaria-describedby.<main>./focuses the jump box, but not while you are typing in a field. Escape blurs it.Theme
localStorage.themeand next-themes applies it before first paint, so there is no flash.prefers-color-schemeemulation doesn't switch an app whose default is dark. The specs now set the stored theme and assert on<html class>.Tests
lib/design/contrast.test.ts:e2e/a11y.spec.ts: axe on 22 routes plus the sign-in views, in both themes (46 tests).e2e/keyboard-theme.spec.ts: skip link,/, the focus trap and restore on two dialogs, the three-state theme, no flash on load, and the colour-blind letters.QA (live, devnet moutai)
An axe matrix of 25 routes × 2 themes, 50 pages per run:
WebKit hung on one page load, the harness flake QA already recorded. I resumed that run in a fresh process for the remaining 15 pages.
Before/after screenshots, per-page axe JSON and the harness scripts are in
dash-forge-qa/evidence/impl/ui-pass/a11y/.Review (code-review-validator) and rebase
Rebased onto master after #51 (private repos) and #65. The colour codemod was re-run over the components #51 added: 47 lines in 9 files, including the private-members, merge-panel and private-banner views. The two conflicts were master's logic plus colour classes, resolved to master's code with the pairs applied.
The reviewer approved conditional on one blocking fix. Findings applied:
hover:text-forge-800on the commit page's parent links was 2.65:1 in dark mode. It now pairs withdark:hover:text-forge-400. A new test checks that every forge hover shade has a dark counterpart.group-hover:text-forge-600in the file list. The source guard now also matcheshover:andgroup-hover:shades; it is shown to fail on the old code, and the two icon-only danger hovers are exempted by content, not line number.autoFocusto the DOM, so the[autofocus]query was dead code.initialFocusnow keeps focus where theautoFocusfield put it.stopPropagationis gone.next devfails to hydrate at all under the app's<meta>CSP. Its dev bundle useseval, which the CSP blocks (unsafe-evalis not allowed, by design). That problem already exists and has nothing to do with this PR. The production build, which is what ships and what the e2e specs test, passes.toaster.tsx,copy-row.tsx,pulls-content.tsx), a follow-up; the ScrollRegion resize edge case (the props are static today).After the rebase and fixes: typecheck, lint and vitest pass (1417 tests, 37 of them in the contrast file).
e2e/a11y.spec.tspluse2e/keyboard-theme.spec.tspass 53/53 against the rebased build.Not in this PR
🤖 Generated with Claude Code