Skip to content

🎨 Palette: Enhance accessibility context in list actions#65

Open
NSEvent wants to merge 1 commit into
mainfrom
palette-dynamic-accessibility-context-5793357331715762385
Open

🎨 Palette: Enhance accessibility context in list actions#65
NSEvent wants to merge 1 commit into
mainfrom
palette-dynamic-accessibility-context-5793357331715762385

Conversation

@NSEvent

@NSEvent NSEvent commented Jun 25, 2026

Copy link
Copy Markdown
Owner

🎨 Palette: Enhance accessibility context in list actions

💡 What: Injected dynamic data from list items into the .help() and .accessibilityLabel() modifiers for icon-only action buttons (Edit, Delete, Clear) in CommandWheelSettingsView, GestureListViews, and ChordSequenceListViews.
🎯 Why: In lists with repeated icon-only buttons, generic tooltips like "Edit" lose context for screen readers and pointer-hover users. Adding the specific item name disambiguates the target.
♿ Accessibility: Improves UX for VoiceOver users by providing exact context.


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

Summary by CodeRabbit

  • Accessibility Improvements
    • Updated button labels and help text in repeated lists to include the specific item name or action, making VoiceOver and hover help more descriptive.
    • Improved clarity for edit, delete, clear, and similar actions by showing which entry they apply to.
    • Added a new note reinforcing best practices for accessible labels in repeated SwiftUI content.

💡 What: Injected dynamic data from list items into the `.help()` and `.accessibilityLabel()` modifiers for icon-only action buttons (Edit, Delete, Clear) in `CommandWheelSettingsView`, `GestureListViews`, and `ChordSequenceListViews`.
🎯 Why: In lists with repeated icon-only buttons, generic tooltips like "Edit" lose context for screen readers and pointer-hover users. Adding the specific item name disambiguates the target.
♿ Accessibility: Improves UX for VoiceOver users by providing exact context.

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

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Icon-only edit, delete, and clear buttons in chord, sequence, gesture, and command wheel views now use item-specific names in .help and .accessibilityLabel. A new palette note records the repeated-list accessibility pattern.

Changes

Contextual accessibility labels

Layer / File(s) Summary
Item-specific button labels
.Jules/palette.md, XboxControllerMapper/XboxControllerMapper/Views/MainWindow/CommandWheelSettingsView.swift, XboxControllerMapper/XboxControllerMapper/Views/MainWindow/ChordSequenceListViews.swift, XboxControllerMapper/XboxControllerMapper/Views/MainWindow/GestureListViews.swift
Edit, Delete, and Clear buttons now include the current item’s display name in .help and .accessibilityLabel, and the palette note documents the repeated-list accessibility pattern.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

🐇 I hopped through rows where buttons sang,
And gave each little icon a name.
Edit, delete, and clear now speak,
With item-sized clues for every peek.
Thump-thump, the labels feel so neat.

🚥 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 item-specific accessibility context to list action buttons.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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-context-5793357331715762385

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

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/MainWindow/CommandWheelSettingsView.swift (1)

179-190: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Use the item name here, not actionDisplayString.

CommandWheelAction.actionDisplayString can still collapse multiple rows to the same text (Macro, Script, etc.), so these icon-only controls remain ambiguous in a repeated list. Reuse the same display name shown in the row (action.displayName with the "Unnamed" fallback) for both Help and accessibility labels.

Suggested fix
-            .help("Edit \(action.actionDisplayString)")
-            .accessibilityLabel("Edit \(action.actionDisplayString)")
+            .help("Edit \(action.displayName.isEmpty ? "Unnamed" : action.displayName)")
+            .accessibilityLabel("Edit \(action.displayName.isEmpty ? "Unnamed" : action.displayName)")

-            .help("Delete \(action.actionDisplayString)")
-            .accessibilityLabel("Delete \(action.actionDisplayString)")
+            .help("Delete \(action.displayName.isEmpty ? "Unnamed" : action.displayName)")
+            .accessibilityLabel("Delete \(action.displayName.isEmpty ? "Unnamed" : action.displayName)")
🤖 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/CommandWheelSettingsView.swift`
around lines 179 - 190, The Edit/Delete controls in CommandWheelSettingsView are
using an ambiguous action display string instead of the row’s item name, which
can collapse repeated items to the same label. Update the Help and
accessibilityLabel text for the icon-only buttons in the row to use
action.displayName with the "Unnamed" fallback, matching the existing row label
and avoiding actionDisplayString here.
🤖 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/ChordSequenceListViews.swift`:
- Around line 118-127: The Edit/Delete help and accessibility labels in the row
actions are using action-level text, which can repeat across rows. Update the
labels in the row action view(s) around the Edit/Delete buttons to use the
row-specific trigger text already available there, such as buttonsDisplayString
or stepsDisplayString, and apply the same change in the other matching section
so assistive tech can distinguish each row.

---

Outside diff comments:
In
`@XboxControllerMapper/XboxControllerMapper/Views/MainWindow/CommandWheelSettingsView.swift`:
- Around line 179-190: The Edit/Delete controls in CommandWheelSettingsView are
using an ambiguous action display string instead of the row’s item name, which
can collapse repeated items to the same label. Update the Help and
accessibilityLabel text for the icon-only buttons in the row to use
action.displayName with the "Unnamed" fallback, matching the existing row label
and avoiding actionDisplayString here.
🪄 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: ab11cc92-8088-4fe9-93dd-88398c4cc7eb

📥 Commits

Reviewing files that changed from the base of the PR and between 0eebc97 and 52d85e2.

📒 Files selected for processing (4)
  • .Jules/palette.md
  • XboxControllerMapper/XboxControllerMapper/Views/MainWindow/ChordSequenceListViews.swift
  • XboxControllerMapper/XboxControllerMapper/Views/MainWindow/CommandWheelSettingsView.swift
  • XboxControllerMapper/XboxControllerMapper/Views/MainWindow/GestureListViews.swift

Comment on lines +118 to +127
.help("Edit \(chord.actionDisplayString)")
.accessibilityLabel("Edit \(chord.actionDisplayString)")

Button(action: onDelete) {
Image(systemName: "trash")
.foregroundColor(.red.opacity(0.8))
}
.buttonStyle(.borderless)
.help("Delete")
.accessibilityLabel("Delete")
.help("Delete \(chord.actionDisplayString)")
.accessibilityLabel("Delete \(chord.actionDisplayString)")

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 | 🟠 Major | ⚡ Quick win

Use the row-specific trigger text in these labels.

actionDisplayString is still an action descriptor, so repeated chord/sequence rows can end up with the same Edit/Delete label (Macro, Script, etc.). Prefer the row identifiers already available here (buttonsDisplayString / stepsDisplayString) so assistive tech can distinguish which item is being edited or deleted.

Suggested fix
-                .help("Edit \(chord.actionDisplayString)")
-                .accessibilityLabel("Edit \(chord.actionDisplayString)")
+                .help("Edit \(chord.buttonsDisplayString)")
+                .accessibilityLabel("Edit \(chord.buttonsDisplayString)")

-                .help("Delete \(chord.actionDisplayString)")
-                .accessibilityLabel("Delete \(chord.actionDisplayString)")
+                .help("Delete \(chord.buttonsDisplayString)")
+                .accessibilityLabel("Delete \(chord.buttonsDisplayString)")
-                .help("Edit \(sequence.actionDisplayString)")
-                .accessibilityLabel("Edit \(sequence.actionDisplayString)")
+                .help("Edit \(sequence.stepsDisplayString)")
+                .accessibilityLabel("Edit \(sequence.stepsDisplayString)")

-                .help("Delete \(sequence.actionDisplayString)")
-                .accessibilityLabel("Delete \(sequence.actionDisplayString)")
+                .help("Delete \(sequence.stepsDisplayString)")
+                .accessibilityLabel("Delete \(sequence.stepsDisplayString)")

Also applies to: 264-273

🤖 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/ChordSequenceListViews.swift`
around lines 118 - 127, The Edit/Delete help and accessibility labels in the row
actions are using action-level text, which can repeat across rows. Update the
labels in the row action view(s) around the Edit/Delete buttons to use the
row-specific trigger text already available there, such as buttonsDisplayString
or stepsDisplayString, and apply the same change in the other matching section
so assistive tech can distinguish each row.

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