Repository navigation
feat: one dialog shell, visible focus, token contrast and axe in CI (UX-10, part A) - #214
Merged
Merged
Conversation
…UX-10, part A) - DialogShell + useFocusTrap + useScrollLock for shuffle, filter, result, live, onboarding, settings and confirm: dialog semantics, focus in/trap/return, Escape, scroll lock, layers, safe areas - solid 3px focus ring (--focus) instead of a faint glow; --border-strong for form controls; --danger-ink for error text; level colors, spacing, radius, type and z-index tokens; Tailwind reads them - tests: token contrast from theme.css (both themes) and axe-core over 18 real screens/dialogs (serious/critical fail the build); `npm run a11y` in CI - fixes: unlabeled selects/switches in settings, invalid settings-panel padding, confirm dialog ignored the dark theme and had no focus handling - tests (437) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
1 of 3 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
Part A of UX-10 (inline styles, emoji icons and hard-coded colors/radii follow in part B).
DialogShell(+useFocusTrap,useScrollLock) replaces six hand-rolled variants (shuffle, filter sheet, result sheet, live view, onboarding, settings) and the confirm modal. Dialog semantics (role,aria-modal, labelled/described by), focus moves in, Tab stays inside, Escape, focus returns to the opener, page scroll locked (counted for stacked dialogs), layer tokens, safe areas on all sides. Variants: center, bottom sheet, side panel, full screen--focus(>= 3:1 on both themes) for every keyboard-focusable control, instead of the faint translucent glow; no ring for mouse clicks (:focus-visible)--focus,--border-strong(form controls >= 3:1; the plain--borderwas 1.2:1),--danger-ink(error text;#ef4444was 3.8:1),--level-*-ink, spacing/radius/font-size scales, z-index layers, touch target. Tailwind now references the tokens (colors, radius, z-index, shadow)tests/a11y/contrast.test.tsreads the realtheme.cssand checks 16 pairs x 2 themes;tests/a11y/axe.test.tsruns axe-core over 18 real screens and dialogs - serious/critical violations fail the build.npm run a11yis a separate CI step. The old static-HTMLscripts/axe-check.mjs(never run in CI) is removedBugs fixed on the way
var(1rem)/ an undefined--base-padding, which invalidates the declaration: the top padding was 0 and the close button could sit under the status barfalseon Escape/backdropNotes
style=""attributes, replace emojis with an SVG icon set, replace hard-coded hex colors and radii with tokensTest plan
npm test(437),npm run lint,npm run typecheck,npm run build(local)npm run a11y)🤖 Generated with Claude Code