Skip to content

Add keyboard and screen-reader support for dashboard widgets.#2458

Open
Honey-pg wants to merge 1 commit into
Umbrella-io:mainfrom
Honey-pg:feat/dashboard-widget-a11y
Open

Add keyboard and screen-reader support for dashboard widgets.#2458
Honey-pg wants to merge 1 commit into
Umbrella-io:mainfrom
Honey-pg:feat/dashboard-widget-a11y

Conversation

@Honey-pg

Copy link
Copy Markdown
Contributor

Summary

Introduce a shared focusable widget shell with live region summaries for pilot metric widgets so users can tab to cards and hear title plus key stats.

Adds keyboard and screen-reader support to dashboard widgets via a shared DashboardWidgetShell and DashboardWidgetA11yContext. All widgets are now tab-reachable with visible focus rings and region labels; four pilot widgets (Streak, Goals, Language Breakdown, PR Metrics) announce dynamic metric summaries through polite live regions.

Closes #2435


Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 💥 Breaking change (fix or feature that changes existing behavior)
  • 📝 Documentation update
  • ♻️ Refactor / code cleanup (no functional change)
  • ⚡ Performance improvement
  • 🔒 Security fix
  • 🧪 Tests only

What Changed

  • Added src/components/dashboard/DashboardWidgetA11yContext.tsx — provider + useDashboardWidgetA11y() hook for setSummary / setIsUpdating
  • Added src/components/dashboard/DashboardWidgetShell.tsx — focusable role="region" wrapper with sr-only title, live summary region, focus ring, and Enter/Space to focus first inner control
  • Updated SortableDashboardWidget.tsx — wraps widget content in DashboardWidgetShell (non-editing mode is tabbable; edit mode uses tabIndex={-1})
  • Updated CustomizableDashboard.tsx — wraps the widget grid in DashboardWidgetA11yProvider
  • Updated pilot widgets with dynamic summaries:
    • StreakTracker.tsx — current/longest streak
    • GoalTracker.tsx — active vs completed goals
    • LanguageBreakdown.tsx — top language + count
    • PRMetrics.tsx — open PRs + merged (30d)
  • Added unit tests: test/components/DashboardWidgetShell.test.tsx, test/components/DashboardWidgetA11yContext.test.tsx

How to Test

  1. Open /dashboard and press Tab repeatedly — each visible widget card should show a focus ring as it receives focus.
  2. Tab to the Streak Tracker card and press Enter or Space — focus should move to the first inner button (e.g. Copy/Share).
  3. With a screen reader (e.g. VoiceOver), tab to pilot widgets after data loads — you should hear the widget title plus the metric summary.
  4. Enable layout edit mode — widget cards should no longer be tabbable before drag/hide controls; drag and hide buttons should still work.
  5. Click inner widget buttons with the mouse — behavior should be unchanged.

Expected result: Widgets are keyboard-reachable with visible focus, titled regions for screen readers, and live announcements for the four pilot metrics. No mouse interaction regressions.

Automated checks:

npm run type-check
npm run lint
npm test -- test/components/DashboardWidgetShell.test.tsx test/components/DashboardWidgetA11yContext.test.tsx

Introduce a shared focusable widget shell with live region summaries for pilot metric widgets so users can tab to cards and hear title plus key stats.
@github-actions github-actions Bot added gssoc26 GSSoC 2026 contribution type:accessibility GSSoC type bonus: accessibility (+15 pts) type:feature GSSoC type bonus: new feature type:testing GSSoC type bonus: tests (+10 pts) type:bug GSSoC type bonus: bug fix type:design GSSoC type bonus: UI/design (+10 pts) type:performance GSSoC type bonus: performance (+15 pts) labels Jun 15, 2026
@github-actions

Copy link
Copy Markdown

GSSoC Label Checklist 🏷️

@Umbrella-io — please apply the appropriate labels before merging:

Difficulty (pick one):

  • level:beginner — 20 pts
  • level:intermediate — 35 pts
  • level:advanced — 55 pts
  • level:critical — 80 pts

Quality (optional):

  • quality:clean — ×1.2 multiplier
  • quality:exceptional — ×1.5 multiplier

Validation (required to score):

  • gssoc:approved — counts for points
  • gssoc:invalid / gssoc:spam / gssoc:ai-slop — does not score

Type labels (type:*) are auto-detected from files and title. Review and adjust if needed.
Points formula: (difficulty × quality_multiplier) + type_bonus

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc26 GSSoC 2026 contribution type:accessibility GSSoC type bonus: accessibility (+15 pts) type:bug GSSoC type bonus: bug fix type:design GSSoC type bonus: UI/design (+10 pts) type:feature GSSoC type bonus: new feature type:performance GSSoC type bonus: performance (+15 pts) type:testing GSSoC type bonus: tests (+10 pts)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Title: [FEAT] [ACCESSIBILITY] Add keyboard navigation and ARIA labels to dashboard widget cards Labels: type:accessibility, type:design

1 participant