🎨 Palette: Enhance accessibility context in list actions#65
Conversation
💡 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>
|
👋 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. |
📝 WalkthroughWalkthroughIcon-only edit, delete, and clear buttons in chord, sequence, gesture, and command wheel views now use item-specific names in ChangesContextual accessibility labels
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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
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 winUse the item name here, not
actionDisplayString.
CommandWheelAction.actionDisplayStringcan 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.displayNamewith 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
📒 Files selected for processing (4)
.Jules/palette.mdXboxControllerMapper/XboxControllerMapper/Views/MainWindow/ChordSequenceListViews.swiftXboxControllerMapper/XboxControllerMapper/Views/MainWindow/CommandWheelSettingsView.swiftXboxControllerMapper/XboxControllerMapper/Views/MainWindow/GestureListViews.swift
| .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)") |
There was a problem hiding this comment.
🎯 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.
🎨 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) inCommandWheelSettingsView,GestureListViews, andChordSequenceListViews.🎯 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