Skip to content

🎨 Palette: [Make Script Examples Gallery Accessible]#89

Open
NSEvent wants to merge 1 commit into
mainfrom
palette/a11y-script-gallery-14496806657667649289
Open

🎨 Palette: [Make Script Examples Gallery Accessible]#89
NSEvent wants to merge 1 commit into
mainfrom
palette/a11y-script-gallery-14496806657667649289

Conversation

@NSEvent

@NSEvent NSEvent commented Jul 15, 2026

Copy link
Copy Markdown
Owner

🎨 Palette: [Make Script Examples Gallery Accessible]

💡 What: Replaced .onTapGesture with a Button wrapper for ExampleCards in ScriptExamplesGalleryView.swift.
🎯 Why: Using .onTapGesture prevents keyboard users (tabbing, spacebar to activate) from interacting with the UI. Wrapping it in a Button restores this standard accessibility behavior.
♿ Accessibility: Ensures full keyboard interaction and screen reader support by attaching .help() and .accessibilityLabel() with dynamic names.


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

Summary by CodeRabbit

  • Accessibility Improvements
    • Improved keyboard navigation and screen-reader support when selecting script examples.
    • Added clearer accessibility labels and help text for interactive items.
    • Updated selection controls to behave consistently as accessible buttons.

💡 What: Replaced `.onTapGesture` with a `Button` wrapper for ExampleCards in `ScriptExamplesGalleryView.swift`.
🎯 Why: Using `.onTapGesture` prevents keyboard users (tabbing, spacebar to activate) from interacting with the UI. Wrapping it in a Button restores this standard accessibility behavior.
♿ Accessibility: Ensures full keyboard interaction and screen reader support by attaching `.help()` and `.accessibilityLabel()` with dynamic names.

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

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Interactive script examples now use accessible SwiftUI buttons instead of tap gestures, while the palette documents the keyboard and screen-reader behavior this pattern supports.

Changes

Accessible script selection

Layer / File(s) Summary
Button-based script selection
XboxControllerMapper/XboxControllerMapper/Views/Scripts/ScriptExamplesGalleryView.swift, .Jules/palette.md
Script examples now select and dismiss through a plain-styled Button with .help(...) and .accessibilityLabel(...); the palette documents this accessibility pattern.

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

Possibly related PRs

Suggested reviewers: google-labs-jules[bot]

🚥 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 matches the main change: making the Script Examples Gallery accessible.
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 docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch palette/a11y-script-gallery-14496806657667649289

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.

Actionable comments posted: 1

🤖 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.

Inline comments:
In @.Jules/palette.md:
- Around line 32-34: Update the “Accessible List Items” entry in palette.md to
use the current PR date, such as 2026-07-15, and move the complete entry above
the 2024-07-12 entry so the file remains in reverse-chronological order.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: c98a1d04-28dc-4db1-b9cf-aaddf37b06ce

📥 Commits

Reviewing files that changed from the base of the PR and between 8821423 and 32812bd.

📒 Files selected for processing (2)
  • .Jules/palette.md
  • XboxControllerMapper/XboxControllerMapper/Views/Scripts/ScriptExamplesGalleryView.swift

Comment thread .Jules/palette.md
Comment on lines +32 to +34
## 2024-05-24 - [Accessible List Items]
**Learning:** Using `.onTapGesture` on list items or cards in SwiftUI breaks keyboard interactivity and drops standard accessibility traits. It prevents users from tabbing to the item or pressing Space/Enter to activate it.
**Action:** When making elements interactive, wrap them in a `Button` with `.buttonStyle(.plain)` instead of using `.onTapGesture`. This natively supports keyboard navigation and correctly propagates `.help()` and `.accessibilityLabel()` to screen readers.

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.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Fix chronological order and update the date.

This new entry is appended below the 2024-07-12 entry, breaking reverse-chronological order. Additionally, the date is set to 2024-05-24.

Please consider updating the date to reflect the current PR date (e.g., 2026-07-15) and moving this entry to the top of the file to maintain consistent reverse-chronological ordering.

🤖 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 @.Jules/palette.md around lines 32 - 34, Update the “Accessible List Items”
entry in palette.md to use the current PR date, such as 2026-07-15, and move the
complete entry above the 2024-07-12 entry so the file remains in
reverse-chronological order.

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