Skip to content

🎨 Palette: Improve accessibility of list items by replacing .onTapGesture with Button - #167

Open
NSEvent wants to merge 2 commits into
mainfrom
palette-a11y-button-5533532803301851540
Open

NSEvent wants to merge 2 commits into
mainfrom
palette-a11y-button-5533532803301851540

Conversation

@NSEvent

@NSEvent NSEvent commented Sep 5, 2026

Copy link
Copy Markdown
Owner

💡 What: Replaced .onTapGesture on list items in ChordSequenceListViews.swift and RecommendationsSheet.swift with standard Button components using .buttonStyle(.plain).
🎯 Why: Using .onTapGesture prevents standard keyboard navigation (Tab key to focus) and makes the element opaque to VoiceOver screen readers, creating an accessibility barrier for users who rely on keyboards or assistive technologies. Wrapping the content in a native Button ensures these elements are recognized as interactive controls.
📸 Before/After: No visual change; purely an accessibility and interaction improvement.
Accessibility: Interactive list rows are now reachable via keyboard (Tab) and correctly announced by screen readers as actionable buttons.


PR created automatically by Jules for task 5533532803301851540 started by @NSEvent

Summary by CodeRabbit

  • Usability Improvements
    • Improved tap handling for editing chord and sequence entries.
    • Made entire recommendation rows selectable, providing a more consistent interaction experience.

…re with Button

Co-authored-by: NSEvent <44446865+NSEvent@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@coderabbitai

coderabbitai Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Team

Run ID: e6a58ebb-b038-4a75-8262-dbe71297e3e4

📥 Commits

Reviewing files that changed from the base of the PR and between 424d26d and 2a31e8f.

📒 Files selected for processing (2)
  • XboxControllerMapper/XboxControllerMapper/Views/MainWindow/ChordSequenceListViews.swift
  • fix_indent_all.py
🚧 Files skipped from review as they are similar to previous changes (1)
  • XboxControllerMapper/XboxControllerMapper/Views/MainWindow/ChordSequenceListViews.swift

Included review availability: Your plan provides up to 2 included reviews per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The SwiftUI views replace row tap gestures with plain buttons. Chord and sequence rows call onEdit. Recommendation rows call toggleSelection(rec.id) across the full row.

Changes

SwiftUI interaction controls

Layer / File(s) Summary
Chord and sequence row edit buttons
XboxControllerMapper/XboxControllerMapper/Views/MainWindow/ChordSequenceListViews.swift, fix_indent_all.py
ChordRow and SequenceRow use plain buttons for edit actions. The helper script applies related indentation changes.
Recommendation row selection button
XboxControllerMapper/XboxControllerMapper/Views/MainWindow/RecommendationsSheet.swift
Recommendation rows use one plain button for selection. Separate checkbox and row tap gestures were removed.

Estimated code review effort: 2 (Simple) | ~5 minutes

Merge Risk: ⚪ Minimal · up to 2a31e

List rows now use native plain buttons for editing and recommendation selection, preserving their existing actions while improving keyboard and VoiceOver support. No current merge-blocking risk remains.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 3 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: replacing .onTapGesture with Button to improve accessibility for list items. The title is specific and relevant, although the decorative emoji is unnecessa…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch palette-a11y-button-5533532803301851540

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

…re with Button

Co-authored-by: NSEvent <44446865+NSEvent@users.noreply.github.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.

1 participant