Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .Jules/palette.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,6 @@
## 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.
## 2026-07-05 - [Dynamic Context for List Actions]
**Learning:** In repeated lists or loops, action buttons (like Edit/Delete) require dynamic context in their `.help()` and `.accessibilityLabel()` modifiers (e.g., fallback to 'Unnamed' if empty) to disambiguate the action for screen reader users and prevent confusion.
**Action:** Ensure dynamic labels are applied to all list items.
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,8 @@ struct SharedMacroRow: View {
.foregroundColor(.accentColor)
}
.buttonStyle(.borderless)
.help("Edit in shared library")
.accessibilityLabel("Edit in shared library")
.help(macro.name.isEmpty ? "Edit in shared library" : "Edit \(macro.name) in shared library")
.accessibilityLabel(macro.name.isEmpty ? "Edit in shared library" : "Edit \(macro.name) in shared library")
}
.padding(.horizontal, 12)
.padding(.vertical, 8)
Expand Down Expand Up @@ -206,16 +206,16 @@ struct MacroRow: View {
.foregroundColor(.accentColor)
}
.buttonStyle(.borderless)
.help("Edit")
.accessibilityLabel("Edit")
.help(macro.name.isEmpty ? "Edit" : "Edit \(macro.name)")
.accessibilityLabel(macro.name.isEmpty ? "Edit" : "Edit \(macro.name)")

Button(action: onDelete) {
Image(systemName: "trash")
.foregroundColor(.red.opacity(0.8))
}
.buttonStyle(.borderless)
.help("Delete")
.accessibilityLabel("Delete")
.help(macro.name.isEmpty ? "Delete" : "Delete \(macro.name)")
.accessibilityLabel(macro.name.isEmpty ? "Delete" : "Delete \(macro.name)")
}
}
.padding(.horizontal, 12)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,16 +222,16 @@ struct ScriptRow: View {
.foregroundColor(.accentColor)
}
.buttonStyle(.borderless)
.help("Edit")
.accessibilityLabel("Edit")
.help(script.name.isEmpty ? "Edit" : "Edit \(script.name)")
.accessibilityLabel(script.name.isEmpty ? "Edit" : "Edit \(script.name)")

Button(action: onDelete) {
Image(systemName: "trash")
.foregroundColor(.red.opacity(0.8))
}
.buttonStyle(.borderless)
.help("Delete")
.accessibilityLabel("Delete")
.help(script.name.isEmpty ? "Delete" : "Delete \(script.name)")
.accessibilityLabel(script.name.isEmpty ? "Delete" : "Delete \(script.name)")
}
}
.padding(.horizontal, 12)
Expand Down
Loading