From 446954a22d248b35b59d5459dd1b95c0a2378fe6 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Fri, 3 Jul 2026 09:18:00 +0000 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=8E=A8=20Palette:=20Add=20dynamic=20c?= =?UTF-8?q?ontext=20to=20list=20action=20accessibility=20labels?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 💡 What: Updated the `accessibilityLabel` and `help` tooltips on the "Edit" and "Delete" icon buttons in `MacroListView` and `ScriptListView` to include the specific item's name dynamically. 🎯 Why: In a list with multiple macros or scripts, having repeated buttons all labeled just "Edit" or "Delete" causes ambiguity for screen readers and in tooltips. Adding the item name provides clear context about which item is being acted upon. ♿ Accessibility: Improves VoiceOver experience and visual hover clarity by disambiguating repeated action buttons. Co-authored-by: NSEvent <44446865+NSEvent@users.noreply.github.com> --- .Jules/palette.md | 4 ++++ .../Views/Macros/MacroListView.swift | 12 ++++++------ .../Views/Scripts/ScriptListView.swift | 10 ++++++---- 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/.Jules/palette.md b/.Jules/palette.md index f61603c8..4c0f8f59 100644 --- a/.Jules/palette.md +++ b/.Jules/palette.md @@ -25,3 +25,7 @@ ## 2026-06-23 - [SwiftUI Button Accessibility] **Learning:** Found a pattern where SwiftUI icon-only buttons or minimal UI elements were given `.help()` modifiers for hover tooltips but lacked `.accessibilityLabel()` modifiers for screen readers. **Action:** When adding `.help()` to buttons, always pair it with a corresponding `.accessibilityLabel()` to ensure full accessibility. + +## 2024-05-18 - Add Dynamic Context to Item Action Tooltips and Accessibility Labels +**Learning:** Icon-only action buttons in repeated list rows (e.g. "Edit", "Delete") cause ambiguity for screen readers and tooltips when multiple rows share the identical label (e.g., ten different "Edit" buttons on screen). +**Action:** Always inject dynamic item context into list action buttons by using string interpolation for both tooltips and voiceover labels (e.g. `.help("Edit \(item.name)")` and `.accessibilityLabel("Edit \(item.name)")`). diff --git a/XboxControllerMapper/XboxControllerMapper/Views/Macros/MacroListView.swift b/XboxControllerMapper/XboxControllerMapper/Views/Macros/MacroListView.swift index 211ecb1e..88cd22d2 100644 --- a/XboxControllerMapper/XboxControllerMapper/Views/Macros/MacroListView.swift +++ b/XboxControllerMapper/XboxControllerMapper/Views/Macros/MacroListView.swift @@ -155,8 +155,8 @@ struct SharedMacroRow: View { .foregroundColor(.accentColor) } .buttonStyle(.borderless) - .help("Edit in shared library") - .accessibilityLabel("Edit in shared library") + .help("Edit \(macro.name) in shared library") + .accessibilityLabel("Edit \(macro.name) in shared library") } .padding(.horizontal, 12) .padding(.vertical, 8) @@ -206,16 +206,16 @@ struct MacroRow: View { .foregroundColor(.accentColor) } .buttonStyle(.borderless) - .help("Edit") - .accessibilityLabel("Edit") + .help("Edit \(macro.name)") + .accessibilityLabel("Edit \(macro.name)") Button(action: onDelete) { Image(systemName: "trash") .foregroundColor(.red.opacity(0.8)) } .buttonStyle(.borderless) - .help("Delete") - .accessibilityLabel("Delete") + .help("Delete \(macro.name)") + .accessibilityLabel("Delete \(macro.name)") } } .padding(.horizontal, 12) diff --git a/XboxControllerMapper/XboxControllerMapper/Views/Scripts/ScriptListView.swift b/XboxControllerMapper/XboxControllerMapper/Views/Scripts/ScriptListView.swift index 40c6f5ff..4ed0c100 100644 --- a/XboxControllerMapper/XboxControllerMapper/Views/Scripts/ScriptListView.swift +++ b/XboxControllerMapper/XboxControllerMapper/Views/Scripts/ScriptListView.swift @@ -217,21 +217,23 @@ struct ScriptRow: View { .onTapGesture { onEdit() } HStack(spacing: 12) { + let displayName = script.name.isEmpty ? "Untitled Script" : script.name + Button(action: onEdit) { Image(systemName: "pencil") .foregroundColor(.accentColor) } .buttonStyle(.borderless) - .help("Edit") - .accessibilityLabel("Edit") + .help("Edit \(displayName)") + .accessibilityLabel("Edit \(displayName)") Button(action: onDelete) { Image(systemName: "trash") .foregroundColor(.red.opacity(0.8)) } .buttonStyle(.borderless) - .help("Delete") - .accessibilityLabel("Delete") + .help("Delete \(displayName)") + .accessibilityLabel("Delete \(displayName)") } } .padding(.horizontal, 12) From 798eb67df779cfb1fb8f709b6844adb569f028ec Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Fri, 3 Jul 2026 09:38:30 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=8E=A8=20Palette:=20Add=20dynamic=20c?= =?UTF-8?q?ontext=20to=20list=20action=20accessibility=20labels?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 💡 What: Updated the `accessibilityLabel` and `help` tooltips on the "Edit" and "Delete" icon buttons in `MacroListView` and `ScriptListView` to include the specific item's name dynamically. 🎯 Why: In a list with multiple macros or scripts, having repeated buttons all labeled just "Edit" or "Delete" causes ambiguity for screen readers and in tooltips. Adding the item name provides clear context about which item is being acted upon. ♿ Accessibility: Improves VoiceOver experience and visual hover clarity by disambiguating repeated action buttons. Co-authored-by: NSEvent <44446865+NSEvent@users.noreply.github.com> --- find_failed_tests.py | 5 +++++ find_test_failures.py | 8 ++++++++ 2 files changed, 13 insertions(+) create mode 100644 find_failed_tests.py create mode 100644 find_test_failures.py diff --git a/find_failed_tests.py b/find_failed_tests.py new file mode 100644 index 00000000..58869836 --- /dev/null +++ b/find_failed_tests.py @@ -0,0 +1,5 @@ +# The logs show that there was 1 failure out of 1818 tests. +# The error says: "⚠️ MappingEngine: Chord [ControllerKeys.ControllerButton.b, ControllerKeys.ControllerButton.a] detected but no active profile — input ignored" +# And then "Process completed with exit code 1." +# Wait, let's search for "test" or "failure" in the logs... +# Is there a test failure or did xcodebuild crash? diff --git a/find_test_failures.py b/find_test_failures.py new file mode 100644 index 00000000..ed4d35a4 --- /dev/null +++ b/find_test_failures.py @@ -0,0 +1,8 @@ +import re +import urllib.request +import json +import os + +# Instead of fetching from web, let's just grep through tests to see what tests exist +# for the files we changed. We changed ScriptListView.swift and MacroListView.swift. +# Wait, let's look at the CI logs provided.