fix: resolve five accessibility problems - #115
Open
rahulkr182 wants to merge 1 commit into
Open
Conversation
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.
What does this change?
Fixes #99
Addresses the five accessibility issues identified in the issue:
--border,--input, and--sidebar-borderfrom220 12% 16%to220 12% 40%insrc/index.css. The contrast ratio against--background: 220 15% 6%is now 3.13:1 (and 3.02:1 against--card: 220 15% 8%), hitting the WCAG 2.1 3:1 non-text contrast requirement.text-[10px]andtext-[11px]acrosssrc/pages/PromptDetail.tsx,src/components/prompts/PromptCard.tsx, andsrc/components/prompts/SharePromptDialog.tsxwithtext-xs(12px / 0.75rem).text-blackon the mobile menu trigger insrc/components/prompts/PromptCard.tsxwith an accessible frosted button (rounded-full bg-background/80 hover:bg-background/90 text-foreground backdrop-blur-sm border border-border/50 shadow-sm), guaranteeing legibility over both dark and light user images.@media (prefers-reduced-motion: reduce)block insrc/index.csssetting animation/transition durations to 0.01ms and scroll-behavior to auto.fixed inset-0modal insrc/components/prompts/PromptCard.tsxwith Radix UIDialog,DialogContent,DialogHeader,DialogTitle,DialogDescription, andDialogFooter, giving it focus trapping, Escape-to-close, scroll locking, and accessible dialog roles.src/components/prompts/PromptCard.test.tsxandsrc/accessibility.test.tsto assert contrast ratio >= 3:1, reduced motion styles, absence of sub-12px text, and dialog focus trap semantics.Why?
prefers-reduced-motionaccessibility setting for vestibular disorders.How was it tested?
src/components/prompts/PromptCard.test.tsxto verify Radix dialog accessibility and mobile menu overlay styling.src/accessibility.test.tschecking WCAG contrast ratio, prefers-reduced-motion declaration, and text sizing.npm run lint(0 errors)npm run typecheck(0 errors)npm test(all 16 test files and 85 tests passed)npm run build(production build succeeded)npm run db:schema:check(up to date)Checklist
npm run lintpassesnpm run typecheckpassesnpm testpassesnpm run buildpasses/foo.png) is inpublic/, notsrc/assets/.envfiles are included