Skip to content

🎨 Palette: Replace .onTapGesture with Button for improved list row accessibility - #111

Open
NSEvent wants to merge 3 commits into
mainfrom
palette-a11y-on-tap-gesture-14098994546877272531
Open

🎨 Palette: Replace .onTapGesture with Button for improved list row accessibility#111
NSEvent wants to merge 3 commits into
mainfrom
palette-a11y-on-tap-gesture-14098994546877272531

Conversation

@NSEvent

@NSEvent NSEvent commented Jul 27, 2026

Copy link
Copy Markdown
Owner

Replaced .onTapGesture with Button(action: onEdit) and .buttonStyle(.plain) in MacroListView.swift and ScriptListView.swift. This improves accessibility by providing proper button semantics for screen readers (like VoiceOver) and enables native keyboard navigation (e.g., triggering via Space/Return) without altering the visual appearance of the list rows. Also added a journal entry in .Jules/palette.md to document this critical learning.


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

Summary by CodeRabbit

  • Accessibility

    • Improved keyboard and screen reader support for editing macro and script entries.
    • Preserved the existing visual appearance and row interactions while making the primary content areas accessible buttons.
  • Documentation

    • Added guidance recommending buttons instead of tap gestures for primary interactive elements in SwiftUI.

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 Jul 27, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@NSEvent, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 24 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 2e51c444-942a-4760-bad7-faa767f153bd

📥 Commits

Reviewing files that changed from the base of the PR and between c7cdb18 and 77efbd0.

📒 Files selected for processing (2)
  • XboxControllerMapper/XboxControllerMapper/Views/Macros/MacroListView.swift
  • XboxControllerMapper/XboxControllerMapper/Views/Scripts/ScriptListView.swift
📝 Walkthrough

Walkthrough

Macro and script row edit areas now use SwiftUI Button actions with rectangular hit targets and plain styling, preserving their layouts. Palette guidance documents replacing primary onTapGesture interactions with buttons for keyboard and screen reader accessibility.

Changes

Accessible row editing

Layer / File(s) Summary
Button-based row edit interactions
XboxControllerMapper/XboxControllerMapper/Views/Macros/MacroListView.swift, XboxControllerMapper/XboxControllerMapper/Views/Scripts/ScriptListView.swift, .Jules/palette.md
MacroRow and ScriptRow use Button(action: onEdit) with .contentShape(Rectangle()) and .buttonStyle(.plain); palette guidance documents this interaction pattern.

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

Possibly related PRs

🚥 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 accurately summarizes the main change: replacing onTapGesture with Button to improve row accessibility.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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 unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch palette-a11y-on-tap-gesture-14098994546877272531

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
XboxControllerMapper/XboxControllerMapper/Views/Macros/MacroListView.swift (1)

182-203: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Make both primary row buttons announce their edit action.

The primary macro/script row buttons currently rely on inferred row content labels, so they need explicit action-oriented accessibility labels for screen readers.

  • MacroListView.swift: apply the label/hint to the primary row button and use the same approach for the duplicate icon button if it also opens the editor.
  • ScriptListView.swift: apply the label/hint to the primary row button and use the same approach for the duplicate icon button if it also opens the editor.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@XboxControllerMapper/XboxControllerMapper/Views/Macros/MacroListView.swift`
around lines 182 - 203, Update the primary row buttons in MacroListView.swift
(lines 182-203) and ScriptListView.swift (lines 191-219) with explicit
accessibility labels and hints that announce their edit action. Also apply the
same label and hint to each duplicate icon button in both files if its action
opens the editor; otherwise leave those buttons unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@XboxControllerMapper/XboxControllerMapper/Views/Macros/MacroListView.swift`:
- Around line 182-203: Update the primary row buttons in MacroListView.swift
(lines 182-203) and ScriptListView.swift (lines 191-219) with explicit
accessibility labels and hints that announce their edit action. Also apply the
same label and hint to each duplicate icon button in both files if its action
opens the editor; otherwise leave those buttons unchanged.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 8af3b181-4613-4e92-9998-0c8569d191b8

📥 Commits

Reviewing files that changed from the base of the PR and between 440517e and c7cdb18.

📒 Files selected for processing (3)
  • .Jules/palette.md
  • XboxControllerMapper/XboxControllerMapper/Views/Macros/MacroListView.swift
  • XboxControllerMapper/XboxControllerMapper/Views/Scripts/ScriptListView.swift

google-labs-jules Bot and others added 2 commits July 27, 2026 09:16
Co-authored-by: NSEvent <44446865+NSEvent@users.noreply.github.com>
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