🎨 Palette: [Make Script Examples Gallery Accessible]#89
Conversation
💡 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>
|
👋 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 New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
📝 WalkthroughWalkthroughInteractive script examples now use accessible SwiftUI buttons instead of tap gestures, while the palette documents the keyboard and screen-reader behavior this pattern supports. ChangesAccessible script selection
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
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
📒 Files selected for processing (2)
.Jules/palette.mdXboxControllerMapper/XboxControllerMapper/Views/Scripts/ScriptExamplesGalleryView.swift
| ## 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. |
There was a problem hiding this comment.
📐 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.
🎨 Palette: [Make Script Examples Gallery Accessible]
💡 What: Replaced
.onTapGesturewith aButtonwrapper for ExampleCards inScriptExamplesGalleryView.swift.🎯 Why: Using
.onTapGestureprevents 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