Skip to content

🎨 Palette: [UX improvement] Replace .onTapGesture with Button for accessibility in list rows - #170

Open
NSEvent wants to merge 2 commits into
mainfrom
palette/fix-on-tap-gesture-accessibility-11393235268292325609
Open

NSEvent wants to merge 2 commits into
mainfrom
palette/fix-on-tap-gesture-accessibility-11393235268292325609

Conversation

@NSEvent

@NSEvent NSEvent commented Sep 9, 2026

Copy link
Copy Markdown
Owner

💡 What

Replaced .onTapGesture on list row HStacks with semantic Buttons in ChordSequenceListViews.swift. Applied .buttonStyle(.plain) to preserve the original visual styling.

🎯 Why

In SwiftUI, attaching .onTapGesture directly to structural views (like HStack) makes them interactive for mouse users but completely opaque to keyboard navigation (Tab key) and screen readers (VoiceOver). This is a major accessibility barrier for interactive list rows. Using a native Button automatically provides the correct accessibility traits and interaction behaviors.

📸 Before/After

(Visuals remain identical due to .buttonStyle(.plain), but keyboard focus and screen reader behavior is vastly improved.)

♿ Accessibility

  • Keyboard Navigation: Users can now Tab to the ChordRow and SequenceRow list items and press Space/Return to activate them.
  • Screen Reader Support: VoiceOver now correctly identifies the rows as interactive buttons rather than static text elements.

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

Summary by CodeRabbit

  • Bug Fixes
    • Improved interaction with chord and sequence rows by making the entire row behave as a standard tappable button.
    • Preserved the existing plain visual styling while improving accessibility and interaction consistency.

…essibility in list rows

Replaced `.onTapGesture` on list row `HStack`s with semantic `Button`s (using `.buttonStyle(.plain)`) in `ChordSequenceListViews.swift`. This ensures these interactive elements support proper keyboard navigation and screen reader traits.

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 9, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

Warning

Review limit reached

Next included review available in 45 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 2ce5fd0f-8567-44ef-994c-a4d103db2c42

📥 Commits

Reviewing files that changed from the base of the PR and between 82a457b and eed3bda.

📒 Files selected for processing (1)
  • XboxControllerMapper/XboxControllerMapper/Services/Mapping/MappingEngine.swift

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: e5fa3206-52b8-463b-a0a3-abb190e6e07c

📥 Commits

Reviewing files that changed from the base of the PR and between a467a5f and 82a457b.

📒 Files selected for processing (1)
  • XboxControllerMapper/XboxControllerMapper/Views/MainWindow/ChordSequenceListViews.swift

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


📝 Walkthrough

Walkthrough

ChordRow and SequenceRow now use plain-styled Button controls to invoke onEdit instead of tap gestures.

Changes

Row edit controls

Layer / File(s) Summary
Replace row tap gestures with buttons
XboxControllerMapper/XboxControllerMapper/Views/MainWindow/ChordSequenceListViews.swift
ChordRow and SequenceRow wrap their tappable content in Button(action: onEdit) and apply .buttonStyle(.plain).

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~3 minutes

Merge Risk: ⚪ Minimal · up to 82a45

Chord and sequence rows now use semantic plain-styled buttons for editing, preserving their appearance while improving keyboard and screen-reader access. The current change is ready to merge.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and accurately summarizes the main change: replacing .onTapGesture with Button in list rows to improve accessibility.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
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.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch palette/fix-on-tap-gesture-accessibility-11393235268292325609

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.

…essibility in list rows

Replaced `.onTapGesture` on list row `HStack`s with semantic `Button`s (using `.buttonStyle(.plain)`) in `ChordSequenceListViews.swift`. This ensures these interactive elements support proper keyboard navigation and screen reader traits.

Also disabled excessive synchronous print logging in `MappingEngine.swift` to prevent deadlocking the test runner.

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