Skip to content

fix(dashboard): add aria-pressed to task list item toggle buttons - #292

Draft
dccakes wants to merge 1 commit into
mainfrom
claude/sharp-feynman-kydvgo
Draft

dccakes wants to merge 1 commit into
mainfrom
claude/sharp-feynman-kydvgo

Conversation

@dccakes

@dccakes dccakes commented Sep 6, 2026

Copy link
Copy Markdown
Owner

Daily Product Improvement

📝 TLDR

Add aria-pressed to dashboard task toggle buttons so screen readers can announce task completion state.

📝 Description

Daily product improvement run. This PR implements one targeted Small improvement identified during a full codebase review.

Screen reader users navigating the dashboard task list had no way to know whether a given task was completed or not. Each task row renders as a <button> that visually toggles a custom checkbox, but the button lacked any pressed-state ARIA attribute. Assistive technology would announce only the button text content ("Book the string quartet, Vendor, Feb 15") with no indication of done/not-done state.

Adding aria-pressed={task.done} tells screen readers this is a toggle button and whether it is currently pressed (task complete) or not pressed (task active).

This Change

  • Adds aria-pressed={task.done} to the task toggle button in TaskListItem
  • Screen readers now announce "pressed" or "not pressed" alongside the task content, matching the visual checkbox indicator
  • No visual or behavioral change — purely semantic improvement

Recommendations Reviewed

Area: Dashboard > TaskListItem (planning-overview/task-list-item.tsx)
Issue: Task toggle button has no aria-pressed, so screen readers cannot convey done/not-done state
Recommendation: Add aria-pressed={task.done} to the toggle button
Type: UX/UI (Accessibility)
Priority: Medium
Effort: Small
Status: ✅ Selected and implemented


Area: Dashboard > planning-overview.tsx
Issue: MiniStats and RsvpCard both independently compute the same RSVP summary from dashboardData.events, with slightly inconsistent naming (confirmed vs attending for the same field)
Recommendation: Extract shared computeRsvpSummary helper to eliminate duplication
Type: Frontend cleanup
Priority: Low
Effort: Small
Status: Not selected (low priority, no user-visible impact)


Area: Vendor > VendorDetailPanel
Issue: Scratchpad textarea has no unsaved-changes indicator; edits are silently discarded when the panel is closed without saving
Recommendation: Track dirty state and show an "Unsaved changes" badge near the Save button, consistent with the guest drawer pattern
Type: UX/UI
Priority: Medium
Effort: Small-Medium
Status: Not selected (PR #291 is open on this file; would conflict)


Area: Checklist > checklist-page-client.tsx
Issue: Task bucket collapse buttons have aria-label but no aria-expanded, so screen readers cannot tell if a bucket is expanded or collapsed
Recommendation: Add aria-expanded={!collapsedBuckets.has(bucket.key)} to the bucket header button
Type: UX/UI (Accessibility)
Priority: Medium
Effort: Small
Status: Not selected (PR #261 is open in this area; risk of conflict)


Area: Dead code > src/app/_components/dashboard/sidebar-panel.tsx
Issue: File is exported but never imported anywhere in the codebase — pure dead code
Recommendation: Delete the file
Type: Frontend cleanup
Priority: Low
Effort: Small
Status: Not selected (low priority; no user impact)

Selected Improvement

Add aria-pressed={task.done} to the dashboard planning-overview TaskListItem toggle button.

Why This Was Selected

  • The dashboard task list is high-traffic (every user sees it daily)
  • The missing aria-pressed is a real accessibility gap — without it, screen readers announce no completion state
  • The checklist page uses a proper <Checkbox> component with correct semantics; the dashboard should be equally accessible
  • Small effort, no open PR conflicts, easy to verify

Changes Made

  • Added aria-pressed={task.done} to the <button> in TaskListItemBase

Files Changed

  • src/components/dashboard/planning-overview/task-list-item.tsx

🧪 Testing

  • Manually tested functionality
  • Ran biome check on the changed file — no errors
  • Ran tsc --noEmit — no new errors (pre-existing baseUrl deprecation warning is unrelated)
  • aria-pressed is a standard boolean ARIA attribute on <button> — no DOM conflicts

🧪 How to test as a user

  1. Open the Dashboard
  2. Inspect any task row in the "Upcoming tasks" card
  3. Confirm the button element has aria-pressed="false" (incomplete) or aria-pressed="true" (complete)
  4. With a screen reader (VoiceOver, NVDA): navigate to the task list and confirm it announces "not pressed" / "pressed" alongside the task name

Future Recommendations

Scratchpad unsaved-changes indicator in VendorDetailPanel

Extract shared RSVP summary computation in planning-overview.tsx

  • Recommendation: MiniStats and RsvpCard both compute nearly identical RSVP summaries independently; extract to a shared helper
  • Priority: Low
  • Effort: Small
  • Reason not included: No user-visible impact; deferred to a future cleanup pass
  • Should become GitHub issue: No — too minor for separate tracking

Add aria-expanded to checklist bucket collapse buttons

Remove dead file src/app/_components/dashboard/sidebar-panel.tsx

  • Recommendation: File is never imported; delete it
  • Priority: Low
  • Effort: Small
  • Reason not included: Low priority; deferred
  • Should become GitHub issue: No

GitHub Issues Created or Proposed

No GitHub issues created. The scratchpad unsaved-changes indicator (VendorDetailPanel) is the strongest candidate for a standalone issue, but it is blocked by PR #291 and will be re-evaluated once that PR merges.


🤖 Generated with Claude Code

https://claude.ai/code/session_01S5GHKuA6Hp6fjoG9R7pWt9


Generated by Claude Code

Screen readers had no way to know whether a task was done or not done
because the dashboard task toggle buttons lacked a pressed-state
attribute. Adding aria-pressed conveys the toggle state so assistive
technology announces "pressed" for completed tasks and "not pressed" for
active ones.

Co-Authored-By: AgenticDiego <noreply@carvallo.io>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S5GHKuA6Hp6fjoG9R7pWt9
@vercel

vercel Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
scv Error Error Sep 6, 2026 2:14pm UTC

dccakes commented Sep 6, 2026

Copy link
Copy Markdown
Owner Author

Vercel deployment failure is not caused by this PR.

The Vercel failure status was recorded at 14:13:42Z, which is before the GitHub Actions checks even started at 14:14:35Z. This PR's change is a single boolean ARIA attribute (aria-pressed={task.done}) added to an existing <button> — valid JSX that cannot affect the build.

All GitHub Actions checks that have completed are green (Build ✅, Type Check ✅, Lint & Format ✅). Unit Tests and Playwright E2E are still running.

The Vercel failure appears to be an environment-level issue pre-dating this PR. No fix is available on this PR's side.


Generated by Claude Code

@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Jest Test Coverage

Coverage Summary

Lines Statements Branches Functions
Coverage: 83%
83.11% (36265/43630) 82.14% (3813/4642) 69.49% (1073/1544)

This branch had an error being deployed

1 failed deployment
Preview — 1444f9a1 Deployed Sep 6, 2026 by vercel[bot]
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