Commit 1c2830fbfc
1c2830fbfc8cccfc0c585ec2356467bb95bc1642
parent: 9e58a36915
Unsigned
cmc <hello@cleberg.net> · 2026-07-21 02:02 UTC
fix(a11y): replace translucent accent washes with authored surfaces
The selected Dashboard summary card rendered lavender, not blue. Its
background was a gradient of statusInfo at 28% and 12% opacity — a
dark-mode trick where a translucent accent over near-black reads as a
dim version of itself. Over a light background the same wash desaturates
toward violet.
Swapped for the authored StatusInfoSurface, which is a real colour with
a real contrast measurement rather than an emergent one. Same treatment
for the selected tag-filter chip (statusInfo at 30%) and an
intelligence-section badge (statusWarning at 14%).
The remaining opacity use, a 0.55 stroke in ContentView, is a border
rather than a text background and is left alone.
Verified across appearance and contrast settings on iOS 18.6: light 21
findings, light + Increase Contrast 18, dark 18, dark + Increase Contrast
18. Increase Contrast lowering the light count is the High Contrast
colorset variants working as intended on the system section headers.
Layout: unified · split
DomainDig/ContentView.swift
+1 −1
| @@ -1779,7 +1779,7 @@ struct SubdomainsSectionView: View { |
| 1779 | 1779 | .foregroundStyle(Color(.statusWarning)) |
| 1780 | 1780 | .padding(.horizontal, 8) |
| 1781 | 1781 | .padding(.vertical, 4) |
| 1782 | | .background(Color(.statusWarning).opacity(0.14)) |
| 1782 | .background(Color(.statusWarningSurface)) |
| 1783 | 1783 | .clipShape(Capsule()) |
| 1784 | 1784 | } |
| 1785 | 1785 | } |
DomainDig/DashboardView.swift
+5 −1
| @@ -215,9 +215,13 @@ struct DashboardView: View { |
| 215 | 215 | |
| 216 | 216 | private func cardBackground(for filter: PortfolioFilterOption) -> some ShapeStyle { |
| 217 | 217 | if viewModel.dashboardFilter == filter { |
| 218 | // Uses the authored info surface rather than a translucent wash of |
| 219 | // the accent. `statusInfo` at 28% over a light background renders |
| 220 | // lavender, not blue — an artefact of carrying a dark-only opacity |
| 221 | // trick into light mode. |
| 218 | 222 | return AnyShapeStyle( |
| 219 | 223 | LinearGradient( |
| 220 | | colors: [Color(.statusInfo).opacity(0.28), Color(.statusInfo).opacity(0.12)], |
| 224 | colors: [Color(.statusInfoSurface), Color(.appSurface)], |
| 221 | 225 | startPoint: .topLeading, |
| 222 | 226 | endPoint: .bottomTrailing |
| 223 | 227 | ) |
DomainDig/DomainDigUI.swift
+1 −1
| @@ -466,7 +466,7 @@ struct TagFilterChipRowView: View { |
| 466 | 466 | .font(.caption) |
| 467 | 467 | .padding(.horizontal, 10) |
| 468 | 468 | .padding(.vertical, 5) |
| 469 | | .background(isSelected ? Color(.statusInfo).opacity(0.3) : Color(.appSurfaceElevated), in: Capsule()) |
| 469 | .background(isSelected ? Color(.statusInfoSurface) : Color(.appSurfaceElevated), in: Capsule()) |
| 470 | 470 | .foregroundStyle(isSelected ? Color(.statusInfo) : Color.primary) |
| 471 | 471 | } |
| 472 | 472 | .buttonStyle(.plain) |