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 @@ -98,3 +98,6 @@ grep -nE "accessibilityLabel|accessibilityValue|accessibilityAddTraits" <candida
## 2024-05-27 - Dashboard Stat Grouping
**Learning:** VoiceOver users have to swipe multiple times to hear a single statistic if its label and value are separate text elements in a dashboard card. This creates a fragmented and tedious reading experience.
**Action:** Always apply `.accessibilityElement(children: .combine)` to SwiftUI stat cards or metric views that group a title and a value. Apply it at the OUTERMOST modifier position (after `.padding()` and `.background()`) so the entire visible card is one element. Applying it inside the chrome is a common mistake.
## 2024-05-28 - Empty State Accessibility Grouping
**Learning:** Empty states typically contain an icon, a title, and a description. Without grouping, VoiceOver announces these as separate, fragmented elements which can confuse screen reader users trying to understand the view's current state.
**Action:** Always apply `.accessibilityElement(children: .combine)` to the outermost container of an empty state view so VoiceOver reads the empty state as a single, cohesive message.
1 change: 1 addition & 0 deletions Sources/Cacheout/Views/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ struct ContentView: View {
.foregroundStyle(.tertiary)
Spacer()
}
.accessibilityElement(children: .combine)
}

// MARK: - Bottom Bar
Expand Down
Loading