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
1 change: 1 addition & 0 deletions .Jules/palette.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,4 @@
## 2025-03-20 - Redundant Visual Values and Slider Accessibility
**Learning:** SwiftUI Sliders often rely on separate text views (e.g., in an HStack) to display their current value. Screen readers will read the slider and then redundantly read the visual text label as a separate element, causing confusion.
**Action:** When implementing Sliders with visual value labels, always add `.accessibilityValue(...)` to the Slider itself, and add `.accessibilityHidden(true)` to the redundant text element so it is hidden from VoiceOver.
## 2026-07-06 - Animated Transient Feedback with Accessibility\n**Learning:** Just changing button text (e.g., 'Copy' -> 'Copied') is abrupt visually and lacks a clear state transition for screen readers, especially without animation or dynamic labels.\n**Action:** When implementing transient feedback, wrap state changes in `withAnimation`, use dynamic `.accessibilityLabel`, and provide an `.accessibilityHint` to ensure the interaction is graceful and accessible.
20 changes: 17 additions & 3 deletions ios/Sources/App/AppDiagnosticsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -878,14 +878,28 @@ struct AppDiagnosticsView: View {
}
}
ToolbarItemGroup(placement: .primaryAction) {
Button(copiedReport ? "Copied" : "Copy Report") {
Button {
runner.copyReportToPasteboard()
copiedReport = true
withAnimation {
copiedReport = true
}
DispatchQueue.main.asyncAfter(deadline: .now() + 1.5) {
copiedReport = false
withAnimation {
copiedReport = false
}
}
} label: {
HStack {
Text(copiedReport ? "Copied!" : "Copy Report")
if copiedReport {
Image(systemName: "checkmark.circle.fill")
.foregroundColor(.green)
}
}
}
.disabled(runner.report.isEmpty)
.accessibilityLabel(copiedReport ? "Copied diagnostics report" : "Copy diagnostics report")
.accessibilityHint("Copies the diagnostics report to the clipboard")

Button(runner.isRunning ? "Running..." : (runner.checks.isEmpty ? "Run Diagnostics" : "Run Again")) {
copiedReport = false
Expand Down
Loading