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.
## 2024-11-20 - [Dynamic Context for Repeated List Actions]
**Learning:** When using generic actions like "Edit" or "Delete" in repeated list rows (e.g., Macros, Scripts), screen reader users hear only the action without context (e.g., "Edit, button. Delete, button.").
**Action:** Always inject dynamic context (e.g., the item's name) into `.accessibilityLabel()` and `.help()` modifiers for repeated list actions to ensure disambiguation for screen readers (e.g., `.accessibilityLabel("Edit \(item.name)")`).
Original file line number Diff line number Diff line change
Expand Up @@ -649,8 +649,8 @@ struct MacroStepEditorSheet: View {
Image(systemName: "minus.circle.fill").foregroundColor(.red)
}
.buttonStyle(.plain)
.help("Remove header")
.accessibilityLabel("Remove header")
.help("Remove header \(key)")
.accessibilityLabel("Remove header \(key)")
}
}
HStack {
Expand Down
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("Edit \(macro.name) in shared library")
.accessibilityLabel("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("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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -384,8 +384,8 @@ struct ActionMappingEditor: View {
.foregroundColor(.red)
}
.buttonStyle(.plain)
.help("Remove header")
.accessibilityLabel("Remove header")
.help("Remove header \(key)")
.accessibilityLabel("Remove header \(key)")
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading