fix: WCAG 2.1 AA accessibility audit — contrast fixes, ARIA labels, keyboard nav, mobile a11y & ACCESSIBILITY.md#388
fix: WCAG 2.1 AA accessibility audit — contrast fixes, ARIA labels, keyboard nav, mobile a11y & ACCESSIBILITY.md#388Itzzavdheshh wants to merge 6 commits into
Conversation
…eyboard nav, mobile a11y & ACCESSIBILITY.md
🙌 Contribution NoteHi ** @ShantKhatri ** 👋
Happy to address any feedback! 🚀 |
Signed-off-by: AVDHESH KUMAR DADHICH <aavdhesh.dadhich@gmail.com>
Signed-off-by: AVDHESH KUMAR DADHICH <aavdhesh.dadhich@gmail.com>
Signed-off-by: AVDHESH KUMAR DADHICH <aavdhesh.dadhich@gmail.com>
|
Hi @ShantKhatri please review again sir |
Signed-off-by: AVDHESH KUMAR DADHICH <aavdhesh.dadhich@gmail.com>
|
Hi @Itzzavdheshh, will not be using |
|
We need to remove the expo completely and rewrite the configuration. As that breaks our functionalities or makes the configuration break when we try to deal with it natively. Thanks! |
|
HI @ShantKhatri please check , if there still any more feedback please tell me , Happy to address them too..........also please checkout my other PRs #365 & #364 |
Allow 2-3 days atleast, as I'll be pushing big real factoring for mobile side,so please allow some time. |
|
@ShantKhatri what about this one ..... |
|
Allow some time, need some refactoring here too. |
Summary
Conducts a complete WCAG 2.1 AA accessibility audit across
apps/webandapps/mobileas specified in Product Doc Section 5.11 — zero prior accessibility work existed. Fixes all AA-level color contrast failures, adds missing ARIA labels on icon-only buttons, strengthens invisible focus rings, adds skip navigation, completes all mobileaccessibilityLabel/accessibilityRole/accessibilityHintattributes, describes QR codes for screen readers, extends font size tokens to prevent inline hardcoding, and documents everything in a newACCESSIBILITY.md. Also fixes a pre-existing duplicate import bug inSettingsScreen.tsx.Closes #39
Type of Change
ACCESSIBILITY.mdWhat Changed
apps/web/src/app.css--text-mutedlight:#64748b→#536071— passes 4.5:1 on white--text-secondarylight:#475569→#334155— passes 4.5:1.copy-message.error:#ef4444→#dc2626— passes 4.5:1 on whitefocus-visibleoutlines: near-invisiblergba(..., 0.18–0.35)→ solid3px solid #6366f1.role-badge,.card-footer,.usernameon dark card — contrast verified ≥ 4.5:1apps/web/src/routes/+layout.sveltehref="#main-content"apps/web/src/routes/+page.svelte(homepage)aria-label="Toggle dark mode"— was emoji-only🌙/☀️<main id="main-content">+<nav aria-label="Main navigation">addedapps/web/src/routes/u/[username]/+page.svelte<section aria-label="Platform connections">addedaria-labeladded;aria-live="polite"region confirmedapps/web/src/routes/devcard/[id]/+page.sveltearia-label="{platform} — {username}, opens in new tab"on each<section aria-label="Platform Connections">+<main>wrapper addedapps/mobile/src/screens/DevCardViewScreen.tsxaccessibilityLabel+accessibilityRole="button"+accessibilityHintaddedaccessible={true}+accessibilityRole="image"+ descriptive labelapps/mobile/src/screens/HomeScreen.tsxaccessibilityLabel+accessibilityRole="button"accessibilityHint="Double-tap to toggle QR code visibility"accessibilityLabel="Enter DevCard username"apps/mobile/src/screens/ScanScreen.tsxaccessibilityHint="Opens a list of your DevCards to choose which to display"apps/mobile/src/screens/SettingsScreen.tsxaccessibilityLabel+accessibilityRoleaddedimport { useNavigation }on lines 14 and 19 removedapps/mobile/src/theme/tokens.tsFONT_SIZE.micro = 10andFONT_SIZE.nano = 8added — inlinefontSize: 8/9/10now use tokensallowFontScaling={false}must never be used — dynamic type scaling preservedACCESSIBILITY.md(NEW)How to Test
Tabon homepage → verify skip link appears → press Enter → focus jumps to#main-contentaria-label="Toggle dark mode"announced by screen reader3pxfocus ring visible on every interactive element/,/u/[username],/devcard/[id]→ verify zero AA violations/u/[username]→ click "Copy Link" → verifyaria-liveregion announces success/devcard/[id]→ tab to platform buttons → verify label reads"{platform} — {username}, opens in new tab"DevCardViewScreenwith TalkBack/VoiceOver → verify all buttons announced with label + role"image"with descriptive labelpnpm -r run typecheck→ verify zero errors after duplicate import fixChecklist
pnpm -r run lintpasses)pnpm -r run typecheck)pnpm -r run test)ACCESSIBILITY.mdcreatedconsole.logor debug statements left in the codefocus-visibleoutlines visible — solid3px solid #6366f1aria-labelTouchableOpacity/PressablehaveaccessibilityLabel+accessibilityRoleaccessibilityHintadded for non-obvious mobile controlsaccessibilityRole="image"on web and mobileallowFontScaling={false}not introduced — dynamic type preserveduseNavigationimport inSettingsScreen.tsxfixedScreenshots / Recordings
1. Before — near-invisible focus ring

2. After — solid 3px focus ring

2. axe DevTools — zero AA violations on

/3. axe DevTools — zero AA violations on

/u/[username]4. Skip link visible on first Tab keypress

Additional Context
#536071not#475569for--text-muted? The fix targets the minimum ratio (4.5:1) while staying visually close to the original.#475569would also pass but is harder to distinguish from--text-secondary— using#536071keeps the two tokens visually separated.ACCESSIBILITY.md. This is the standard approach for code-level a11y reviews without a device.@axe-core/playwrightCI: Not added in this PR to keep scope focused.ACCESSIBILITY.mddocuments the integration path for a follow-up PR.socket.io-clientand large asset optimization are tracked as separate issues — out of scope here.@axe-core/playwrightautomated CI check; audit any new pages added after this PR against the guidelines inACCESSIBILITY.md.Submitted as part of Open Source Contribution — GSSoC (GirlScript Summer of Code)