Skip to content
Merged
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
4 changes: 4 additions & 0 deletions .Jules/palette.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,7 @@
## 2024-05-14 - [Icon Button Accessibility Gap]
**Learning:** In standard SwiftUI development for macOS, icon-only buttons (`Image(systemName: ...)`) are frequently missing `.help()` (for hover tooltips) and `.accessibilityLabel()` (for VoiceOver). Several core navigation components (like Layer tabs and Sidebar buttons) suffered from this pattern.
**Action:** Always verify that every `Button` wrapping an `Image` has both `.help()` and `.accessibilityLabel()` strings defined, unless explicitly marked as decorative.

## 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")`.
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,7 @@ struct ButtonMappingsTab: View {
}
.buttonStyle(.plain)
.help("Hide \(section.label)")
.accessibilityLabel("Hide \(section.label)")
.padding(.top, 6)
.padding(.trailing, 8)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -648,6 +648,7 @@ private struct CodeBlockView: View {
}
.buttonStyle(.plain)
.help(didCopy ? "Copied" : "Copy code")
.accessibilityLabel(didCopy ? "Copied" : "Copy code")
.padding(4)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ struct SequenceMappingSheet: View, ControllerTypeProviding {
.foregroundColor(.red.opacity(0.7))
}
.buttonStyle(.borderless)
.help("Remove step")
.accessibilityLabel("Remove \(button.displayName(forDualSense: isPlayStation, forNintendo: isNintendo, forAppleTVRemote: isAppleTVRemote)) from step \(index + 1)")
}
}
Expand Down
Loading