Skip to content

UI/UX, Accessibility & Navigation Remediation (Phases 0-3)#22

Open
syed-reza98 wants to merge 43 commits into
mainfrom
accessibility-fix
Open

UI/UX, Accessibility & Navigation Remediation (Phases 0-3)#22
syed-reza98 wants to merge 43 commits into
mainfrom
accessibility-fix

Conversation

@syed-reza98

Copy link
Copy Markdown
Member

Summary

  • Phase 0 (A11y): Tooltips on 32 bare IconButtons; GestureDetector→InkWell on 8 high-traffic surfaces (social feed, care tiles, hub home); 48dp hit target on _IconBtn; double-tap guard on PrimaryPillButton; form autofill hints on auth/registration fields; Semantics on ProductCard and swipe cards; ExcludeSemantics on decorative painters
  • Phase 1 (Dark mode): 27 hardcoded Color literals eliminated via new token families — surface3/3D, warningSoft/D, badge*, premiumGold/Soft; replacements across gamified_care_ui, social_profile_screen, cart_screen, activity_screen, settings_screen
  • Phase 2 (Navigation): ShellRouteStatefulShellRoute.indexedStack with 5 branches (global/care/social/matching/marketplace); each branch has its own navigatorKey so widget trees survive module switches via IndexedStack; PopScope at shell level for Android back; removed duplicate /social/notifications route
  • Phase 3 (Polish): textScaler clamped to [0.85, 1.3] in MaterialApp.router builder to prevent overflow at 200% system text scale

Test plan

  • flutter analyze — 1 pre-existing anonKey info lint only
  • flutter test — 115 pass / 2 pre-existing failures (appointment model + synthetic spring contract)
  • On device: TalkBack / VoiceOver — actionable elements announce label + role; 48dp targets pass Flutter Inspector audit
  • On device: switch Care → Social → Care; confirm Care scroll position preserved (StatefulShellRoute IndexedStack)
  • On device: Android hardware back pops within-branch before exiting
  • Light/dark toggle: social profile, care gamification, cart, settings — no white-on-white / black-on-black

🤖 Generated with Claude Code

syed-reza98 and others added 30 commits June 15, 2026 04:15
Phase 0 (Accessibility):
- GestureDetector→InkWell on 8 tappables across social, care, home screens
  (ClipRRect+Material+InkWell pattern for colored-container ripple)
- _IconBtn expanded to 48dp hit target; _ActionBtn height 44→48dp
- Double-tap guard in PrimaryPillButton via _isFiring + Future.microtask
- app_shell back/pet-switcher pills: history-aware pop + InkWell ripple

Phase 1 (Dark-mode color correctness):
- AppColors: surface3/3D, warningSoft/D, badge palette (7 colors), premiumGold/Soft
- gamified_care_ui: streak/gold gradients, shadows → named tokens
- social_profile_screen: avatar ring, stat cards, badge catalog → tokens
- cart_screen, activity_screen, settings_screen: 0xFFF2F3F7→surface3,
  0xFF2A1820→surface0D, 0xFFF3CD→warningSoft, gold gradient→premiumGold*

Phase 3 (Text scaling):
- main.dart builder: textScaler.clamp(0.85, 1.3) prevents layout overflow

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Convert ShellRoute → StatefulShellRoute.indexedStack with 5 branches
  (global / care / social / matching / marketplace), each with its own
  navigatorKey; widget trees now survive module switches via IndexedStack
- AppShell.child → AppShell.navigationShell (StatefulNavigationShell)
- Add PopScope at shell level for correct Android back handling
- Remove duplicate /social/notifications shell route (router_notifier
  already redirects it to /notifications)
- Update app_shell_widget_test to use StatefulShellRoute (now passes)
- Update stale golden snapshots for light/dark theme panels

flutter analyze: 1 pre-existing anonKey info lint
flutter test: 115 pass / 2 pre-existing failures (vs 112/5 before)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…gation

Restructured all StatefulShellBranch sub-routes from flat siblings to
nested children so Android back gesture pops to the branch root instead
of exiting the app.

- Care: nutrition/health/walk/appointments nested under /care
- Social: stories/communities/profile/me nested under /social
- Matching: inbox/liked nested under /matching
- Global: notifications/activity/me nested under /home (renamed paths
  from /notifications → /home/notifications etc., updated 5 call sites)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds Semantics(label:, button: true) to every unlabeled GestureDetector
tap target across 68 files in lib/features/ so TalkBack (Android) and
VoiceOver (iOS) can announce each interactive element.

- Filter/toggle chips use selected: + ", selected" suffix pattern
- Fixed misaligned Semantics close in social_screen.dart PostCard
- story_viewer_screen: pet profile header tap now announces correctly

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants