feat(a11y): add keyboard navigation to goal cards#2443
Open
Mahesh-forcode wants to merge 1 commit into
Open
Conversation
GSSoC Label Checklist 🏷️@Umbrella-io — please apply the appropriate labels before merging: Difficulty (pick one):
Quality (optional):
Validation (required to score):
|
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
Add keyboard navigation to goal cards so keyboard-only users can Tab to each card and interact with Enter/Space.
Closes #2251
Type of Change
What Changed
src/components/GoalTracker.tsx: AddedtabIndex={0}to each goal card<li>to make it focusable via Tabsrc/components/GoalTracker.tsx: AddedonKeyDownhandler — Enter/Space triggers the first interactive button inside the cardsrc/components/GoalTracker.tsx: Addedfocus-visible:ring-2 focus-visible:ring-[var(--accent)]for visible focus indicatorsrc/components/GoalTracker.tsx: Addedaria-labelannouncing goal title, progress, and status to screen readersHow to Test
Expected result: Card receives a visible accent-colored ring on focus. Enter/Space triggers the primary button (+1 for manual goals, delete for auto-synced goals). Mouse behavior is unchanged.
Checklist
console.log, debug code, or commented-out blocksnpm run lintpasses locallynpm run type-check)Accessibility (UI changes only)
Additional Context
Only
GoalTracker.tsxwas modified. No visual changes for mouse/touch users. Implements WCAG 2.1 Level A — 2.1.1 Keyboard requirement.