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
4 changes: 4 additions & 0 deletions .jules/palette.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,7 @@ 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 - Grouping Empty State Information
**Learning:** When displaying an empty state comprising multiple elements (e.g., an icon and several lines of text), VoiceOver reads them sequentially as disjointed items. This can be confusing and fails to convey the unified message that the list or page is empty.
**Action:** Apply `.accessibilityElement(children: .combine)` to the container (e.g., `VStack`) wrapping the empty state content to group the information logically, providing screen reader users with immediate context.
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
1 change: 1 addition & 0 deletions Sources/Cacheout/Views/NodeModulesSection.swift
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ struct NodeModulesSection: View {
}
.frame(maxWidth: .infinity, alignment: .center)
.padding(.vertical, 24)
.accessibilityElement(children: .combine)
}
}
}
Expand Down
1 change: 1 addition & 0 deletions Sources/Cacheout/Views/ProcessesView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ struct ProcessesView: View {
}
.frame(maxWidth: .infinity, alignment: .center)
.padding(.vertical, 24)
.accessibilityElement(children: .combine)
} else {
ForEach(Array(viewModel.topProcesses.enumerated()), id: \.element.pid) { index, process in
processRow(process, rank: index + 1)
Expand Down
Loading