Accessibility: add reduced-motion & forced-colors defaults, fallbacks, docs and demo#81
Draft
developit wants to merge 4 commits into
Draft
Accessibility: add reduced-motion & forced-colors defaults, fallbacks, docs and demo#81developit wants to merge 4 commits into
developit wants to merge 4 commits into
Conversation
✅ Deploy Preview for pui-demo ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
|
Size Change: +137 B (+0.99%) Total Size: 14 kB
ℹ️ View Unchanged
|
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.
Motivation
Description
src/base.csswith@media (prefers-reduced-motion: reduce)to suppress animations/transitions and@media (forced-colors: active)to expose system focus/border semantics.src/components/dialog/style.css,src/components/drawer/style.css,src/components/sheet/style.css,src/components/skeleton/style.css,src/components/spinner/style.css, andsrc/lib/toast.css(reduced-motion + forced-colors adjustments).demo/src/routes/a11y-modes.tsx, wired it into the router (demo/src/main.tsx) and navigation (demo/src/nav.tsx), and included demo-specific styles indemo/src/style.cssto surface sanity checks.docs/pages/base-styles.mdanddocs/pages/theming.mddescribing recommended usage and sample CSS.Testing
pnpm buildat the repo root and the build completed successfully.pnpm buildin thedemo/directory and the demo built successfully and produced the demo assets./a11y-modesusing Playwright to validate visuals (artifact produced).pnpm lintwhich failed due to pre-existing TypeScript issues unrelated to these accessibility CSS and demo changes (no failing tests attributable to this PR).Codex Task