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 @@ -19,3 +19,6 @@
## 2024-06-08 - Ensure Symmetry in Accessibility and Tooltips for SwiftUI Icon Buttons
**Learning:** Verified the necessity of ensuring full symmetry in accessibility and tooltips for icon-only buttons (`Image(systemName: ...)`). These buttons often get one but not the other (`.help()` without `.accessibilityLabel()`, or vice-versa), which causes poor UX for some group of users.
**Action:** When adding or modifying icon buttons, always apply both `.help("Action")` and `.accessibilityLabel("Action")`.
## 2026-06-16 - Ensure Symmetry in Accessibility and Tooltips for SwiftUI Icon Buttons
**Learning:** Verified the necessity of ensuring full symmetry in accessibility and tooltips for icon-only buttons (`Image(systemName: ...)`). These buttons often get one but not the other (`.help()` without `.accessibilityLabel()`, or vice-versa), which causes poor UX for some group of users.
**Action:** When adding or modifying icon buttons, always apply both `.help("Action")` and `.accessibilityLabel("Action")`.
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ public struct AutomationMacroLibraryView: View {
}
.buttonStyle(.plain)
.help("New macro")
.accessibilityLabel("New macro")
}
.padding(.horizontal, 12)
.padding(.top, 12)
Expand Down Expand Up @@ -88,6 +89,7 @@ public struct AutomationMacroLibraryView: View {
}
.disabled(selectedID == nil)
.help("Duplicate")
.accessibilityLabel("Duplicate")

Button(role: .destructive) {
showDeleteConfirm = true
Expand All @@ -96,6 +98,7 @@ public struct AutomationMacroLibraryView: View {
}
.disabled(selectedID == nil)
.help("Delete")
.accessibilityLabel("Delete")
}
.buttonStyle(.plain)
.padding(.horizontal, 12)
Expand Down
5 changes: 5 additions & 0 deletions TriggerKit/Sources/TriggerKitUI/AutomationProgramEditor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ public struct AutomationProgramEditor: View {
}
.disabled(isTesting || program.steps.isEmpty)
.help("Run these steps now")
.accessibilityLabel("Run these steps now")
}

Menu {
Expand Down Expand Up @@ -191,6 +192,7 @@ public struct AutomationProgramEditor: View {
}
.disabled(!allowed)
.help(allowed ? (expanded ? "Collapse" : "Expand") : "Unavailable in this host")
.accessibilityLabel(allowed ? (expanded ? "Collapse" : "Expand") : "Unavailable in this host")

HStack(spacing: 8) {
Image(systemName: iconName(for: step))
Expand All @@ -216,6 +218,7 @@ public struct AutomationProgramEditor: View {
}
.disabled(index == 0)
.help("Move up")
.accessibilityLabel("Move up")

Button {
moveStep(from: index, by: 1)
Expand All @@ -224,13 +227,15 @@ public struct AutomationProgramEditor: View {
}
.disabled(index == program.steps.count - 1)
.help("Move down")
.accessibilityLabel("Move down")

Button(role: .destructive) {
deleteStep(at: index)
} label: {
Image(systemName: "trash")
}
.help("Delete")
.accessibilityLabel("Delete")
}
.buttonStyle(.plain)

Expand Down
3 changes: 2 additions & 1 deletion TriggerKit/Sources/TriggerKitUI/ModifierSetEditor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ public struct ModifierSetEditor: View {
}
.buttonStyle(.plain)
.fixedSize(horizontal: true, vertical: false)
.help("Click to cycle Off, Any, Left, Right")
.help("\(label): Click to cycle Off, Any, Left, Right")
.accessibilityLabel("\(label): Click to cycle Off, Any, Left, Right")
}

private var functionButton: some View {
Expand Down
Loading