Skip to content

🎨 Palette: Add accessibility and tooltips to ScriptListView empty state list item buttons#68

Open
NSEvent wants to merge 4 commits into
mainfrom
palette-script-list-a11y-11584182886286396162
Open

🎨 Palette: Add accessibility and tooltips to ScriptListView empty state list item buttons#68
NSEvent wants to merge 4 commits into
mainfrom
palette-script-list-a11y-11584182886286396162

Conversation

@NSEvent

@NSEvent NSEvent commented Jun 28, 2026

Copy link
Copy Markdown
Owner

💡 What: Added help and accessibilityLabel modifiers to the button displaying the "+ circle" icon for pre-filling script examples.
🎯 Why: Because the UI structure consisted of only an Image(systemName: "plus.circle") embedded inside an unlabelled Button (and lacked modifiers), the button action intent was ambiguous for hover interactions on macOS and opaque to VoiceOver screen reader users navigating the empty state.
Accessibility: Enhanced the list item buttons to be discoverable and describable for visually impaired screen reader users on macOS.


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

Summary by CodeRabbit

  • Accessibility
    • Improved empty-state list item buttons with clearer tooltips and screen reader labels.
    • The featured example action now includes accessible text for better assistive technology support.

…te list item buttons

* Adds `.help()` and `.accessibilityLabel()` to the `Button` in the empty state of `ScriptListView` to improve the UX and accessibility for users on macOS utilizing mouse or VoiceOver when navigating the dynamic `ForEach` generated list of script examples.

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 Jun 28, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

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

More reviews will be available in 4 minutes and 46 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

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

🚦 How do rate 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 see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 695724bf-57da-4d8b-aaa4-decf7260198f

📥 Commits

Reviewing files that changed from the base of the PR and between ade4ef0 and 2c6c7f3.

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

Walkthrough

Adds .help("Add Example Script") and .accessibilityLabel("Add Example Script") to the empty-state featured example button in ScriptListView. A corresponding entry is added to .Jules/palette.md documenting this accessibility requirement.

Empty-state button accessibility

Layer / File(s) Summary
Accessibility modifiers and palette doc
XboxControllerMapper/.../ScriptListView.swift, .Jules/palette.md
Adds tooltip and screen reader label to the scriptsEmptyState example button; palette entry records the .help() + .accessibilityLabel() pattern for empty-state list item buttons.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

Poem

🐇 Hop hop, a label appears,
The empty state button now cheers!
.help() whispers its name,
.accessibilityLabel() does the same,
No button goes unheard, no fears~

🚥 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: adding accessibility labels and tooltips to the ScriptListView empty-state button.
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-script-list-a11y-11584182886286396162

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: 2

🤖 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 28-30: Update the palette guidance entry to clearly separate
icon-only buttons from buttons with visible text: the current wording in the
empty-state list item guidance is too broad and can lead to incorrectly adding a
static accessibility label to text-visible controls like the scripts empty state
button. Revise the wording around the empty-state button guidance to say
icon-only buttons should always get both .help() and .accessibilityLabel(),
while buttons with visible text should generally rely on SwiftUI’s automatic
accessibility label unless the visible text is insufficient; reference the
existing empty-state list item guidance and the newer icon-only entry so the
terminology stays consistent. Also verify whether the 2024-06-28 date is
intentional relative to the later entries, and correct it if it was copied by
mistake.

In
`@XboxControllerMapper/XboxControllerMapper/Views/Scripts/ScriptListView.swift`:
- Around line 132-133: The ExampleScript button in ScriptListView is using a
static accessibility label that overrides the richer label SwiftUI can derive
from the visible Text(example.name) and Text(example.description). Remove the
hardcoded .accessibilityLabel("Add Example Script") in the example button
builder, or replace it with a dynamic label that includes example.name so each
script remains distinguishable to VoiceOver users; keep the .help() only if
needed, since the visible text already provides context.
🪄 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: a9ad32d7-681b-49da-a44a-ffab8004d23d

📥 Commits

Reviewing files that changed from the base of the PR and between 15e1f1d and ade4ef0.

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

Comment thread .Jules/palette.md
Comment on lines +28 to +30
## 2024-06-28 - Missing accessibility in Empty State List Item Buttons
**Learning:** Empty state list item buttons (like "Add example scripts") containing only an icon or text and icon can miss explicit accessibility labels or helpful tooltips, particularly in dynamically generated lists (`ForEach`) or customized interactive elements, causing a bad UX for mouse and screen reader users.
**Action:** Always add `.help()` and `.accessibilityLabel()` modifiers to interactive empty state list buttons.

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 | 🟠 Major | 🏗️ Heavy lift

Palette guidance conflates icon-only and text-visible buttons, risking misapplied accessibility overrides.

The new entry groups "only an icon or text and icon" together, but these have different accessibility requirements. Buttons with visible text (like this scriptsEmptyState button containing example.name and example.description) should not blindly receive .accessibilityLabel(): SwiftUI's automatic label incorporates all visible text, and a static override strips that context from VoiceOver users.

Revise the guidance to explicitly distinguish:

  • Icon-only buttons: always add both .help() and .accessibilityLabel() (matches existing 2024-11-20 entry).
  • Buttons with visible text: do not add .accessibilityLabel() unless the visible text fails to describe the action; prefer letting SwiftUI auto-generate from content, or use dynamic labels that include visible text.

Also, the entry date "2024-06-28" predates the 2024-11-20 and 2026-06-06 entries; verify this is intentional and not a copy-paste error.

🤖 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 28 - 30, Update the palette guidance entry to
clearly separate icon-only buttons from buttons with visible text: the current
wording in the empty-state list item guidance is too broad and can lead to
incorrectly adding a static accessibility label to text-visible controls like
the scripts empty state button. Revise the wording around the empty-state button
guidance to say icon-only buttons should always get both .help() and
.accessibilityLabel(), while buttons with visible text should generally rely on
SwiftUI’s automatic accessibility label unless the visible text is insufficient;
reference the existing empty-state list item guidance and the newer icon-only
entry so the terminology stays consistent. Also verify whether the 2024-06-28
date is intentional relative to the later entries, and correct it if it was
copied by mistake.

Comment thread XboxControllerMapper/XboxControllerMapper/Views/Scripts/ScriptListView.swift Outdated
google-labs-jules Bot and others added 3 commits June 28, 2026 08:50
…te list item buttons

* Adds `.help()` and `.accessibilityLabel()` to the `Button` in the empty state of `ScriptListView` to improve the UX and accessibility for users on macOS utilizing mouse or VoiceOver when navigating the dynamic `ForEach` generated list of script examples.

Co-authored-by: NSEvent <44446865+NSEvent@users.noreply.github.com>
…te list item buttons

* Adds `.help()` and `.accessibilityLabel()` to the `Button` in the empty state of `ScriptListView` to improve the UX and accessibility for users on macOS utilizing mouse or VoiceOver when navigating the dynamic `ForEach` generated list of script examples.

Co-authored-by: NSEvent <44446865+NSEvent@users.noreply.github.com>
…te list item buttons

* Adds `.help()` and `.accessibilityLabel()` to the `Button` in the empty state of `ScriptListView` to improve the UX and accessibility for users on macOS utilizing mouse or VoiceOver when navigating the dynamic `ForEach` generated list of script examples.

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