Skip to content

🎨 Palette: Disambiguate list actions with dynamic accessibility labels#67

Open
NSEvent wants to merge 1 commit into
mainfrom
palette/dynamic-accessibility-labels-8629821849748021373
Open

🎨 Palette: Disambiguate list actions with dynamic accessibility labels#67
NSEvent wants to merge 1 commit into
mainfrom
palette/dynamic-accessibility-labels-8629821849748021373

Conversation

@NSEvent

@NSEvent NSEvent commented Jun 27, 2026

Copy link
Copy Markdown
Owner

💡 What: Changed static accessibility labels for icon-only edit/delete buttons in repeated lists to be dynamic by including the item's name/text. Added a missing accessibility label to the reset button in SettingsViews.swift.
🎯 Why: In lists of items (like apps, links, or text snippets), screen reader users hear identical static labels like "Edit app" for every row. Adding dynamic context (e.g. "Edit Safari") allows users to know exactly which item they are targeting.
♿ Accessibility: Improves screen reader navigation and clarity for users interacting with settings lists.

Added a learning to .Jules/palette.md for this UX pattern.


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

Summary by CodeRabbit

  • Accessibility Improvements
    • Updated action labels so screen readers now identify the specific item being edited or deleted in repeated lists.
    • Made the reset control’s accessibility label more explicit, clarifying which setting will be restored.

- Updated `OnScreenKeyboardSettingsView.swift` to use dynamic properties (`quickText.text`, `item.displayName`, `link.displayName`) in accessibility labels for repeated list items.
- Added missing accessibility label to the reset button in `SettingsViews.swift`.
- Added learning to `.Jules/palette.md` regarding disambiguating repeated list actions.

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

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Updates accessibility labels for repeated list actions so each edit/delete control includes the affected item’s text or display name. Also adds an accessibility label to the inherited reset button in the layer override slider and records the label pattern in the palette.

Changes

Accessibility labels for list actions and reset control

Layer / File(s) Summary
Dynamic list action labels
.Jules/palette.md, XboxControllerMapper/XboxControllerMapper/Views/MainWindow/OnScreenKeyboardSettingsView.swift
Adds guidance for item-specific list action labels and updates quick-text, app-bar item, and website link edit/delete buttons to include the current item text or display name.
Inherited reset label
XboxControllerMapper/XboxControllerMapper/Views/MainWindow/SettingsViews.swift
Adds an accessibility label to the layer override reset button using the slider label text.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

I’m a rabbit with ears so keen,
I hop where labels may be seen.
“Edit this one,” each button sings,
and reset names their tidy rings.
🐇✨

🚥 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 describes the main accessibility-label update for repeated list actions and matches the palette note theme.
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/dynamic-accessibility-labels-8629821849748021373

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
`@XboxControllerMapper/XboxControllerMapper/Views/MainWindow/OnScreenKeyboardSettingsView.swift`:
- Around line 119-127: The accessibility labels for the edit/delete buttons in
OnScreenKeyboardSettingsView currently interpolate QuickText.text,
AppBarItem.displayName, and WebsiteLink.displayName directly, which can produce
blank announcements when those values are empty. Update the label-building logic
around the affected Button/accessibilityLabel calls so it keeps the dynamic name
when present but falls back to the old noun (for example, the item type like
quick text/app bar item/website link) when the interpolated display name is
empty. Apply the same fallback behavior to all three label pairs in this view,
including the other Edit/Delete sections referenced by the review.
🪄 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: 6b4501e5-ecff-46b7-be88-9d728ddcef30

📥 Commits

Reviewing files that changed from the base of the PR and between fbd7b08 and 2d1245e.

📒 Files selected for processing (3)
  • .Jules/palette.md
  • XboxControllerMapper/XboxControllerMapper/Views/MainWindow/OnScreenKeyboardSettingsView.swift
  • XboxControllerMapper/XboxControllerMapper/Views/MainWindow/SettingsViews.swift

Comment on lines +119 to +127
.accessibilityLabel("Edit \(quickText.text)")

Button(action: onDelete) {
Image(systemName: "trash")
.foregroundColor(.red)
}
.buttonStyle(.borderless)
.help("Delete quick text")
.accessibilityLabel("Delete quick text")
.accessibilityLabel("Delete \(quickText.text)")

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.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Add a fallback label when the item name is blank.

QuickText.text, AppBarItem.displayName, and WebsiteLink.displayName all default to an empty string upstream, so blank or migrated rows will announce labels like Edit / Delete instead of a meaningful control name. Keep the dynamic form, but fall back to the old noun when the interpolated value is empty.

💡 Example fix
- .accessibilityLabel("Edit \(quickText.text)")
+ .accessibilityLabel(quickText.text.isEmpty ? "Edit quick text" : "Edit \(quickText.text)")

- .accessibilityLabel("Delete \(item.displayName)")
+ .accessibilityLabel(item.displayName.isEmpty ? "Delete app" : "Delete \(item.displayName)")

- .accessibilityLabel("Edit \(link.displayName)")
+ .accessibilityLabel(link.displayName.isEmpty ? "Edit link" : "Edit \(link.displayName)")

Also applies to: 198-206, 277-285

🤖 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/MainWindow/OnScreenKeyboardSettingsView.swift`
around lines 119 - 127, The accessibility labels for the edit/delete buttons in
OnScreenKeyboardSettingsView currently interpolate QuickText.text,
AppBarItem.displayName, and WebsiteLink.displayName directly, which can produce
blank announcements when those values are empty. Update the label-building logic
around the affected Button/accessibilityLabel calls so it keeps the dynamic name
when present but falls back to the old noun (for example, the item type like
quick text/app bar item/website link) when the interpolated display name is
empty. Apply the same fallback behavior to all three label pairs in this view,
including the other Edit/Delete sections referenced by the review.

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