summaryrefslogtreecommitdiff
path: root/Docs/ACCESSIBILITY.md
diff options
context:
space:
mode:
authorChristian Cleberg <[email protected]>2026-07-20 19:14:04 -0500
committerChristian Cleberg <[email protected]>2026-07-20 21:03:10 -0500
commit2c608ed9cb11f3e835f577994b5627b9b7910f4f (patch)
tree078ff50c5151fcc5e91b9d28051562f0bc28088d /Docs/ACCESSIBILITY.md
parent349bec0e99f330fc1172ca9847c58f019e861f61 (diff)
downloaddomain-dig-2c608ed9cb11f3e835f577994b5627b9b7910f4f.tar.gz
domain-dig-2c608ed9cb11f3e835f577994b5627b9b7910f4f.tar.bz2
domain-dig-2c608ed9cb11f3e835f577994b5627b9b7910f4f.zip
feat(a11y): unlock light mode and add appearance preference (#21 phase 2)
Removes the 16 scattered .preferredColorScheme(.dark) calls and the one .toolbarColorScheme, and applies appearance in exactly one place — the WindowGroup in DomainDigApp. Re-applying per view is what let the lock spread across eight files unnoticed until light mode was unreachable. Adds AppAppearance (System / Light / Dark) in @AppStorage, exposed under Settings > Display next to Density. Honouring the system setting and offering an override is one key, and it keeps the deliberate dark aesthetic reachable for anyone who wants it. Also replaces .secondary with AppTextSecondary across 191 sites. iOS's own secondaryLabel is 3.29:1 on a light card — below AA — which never showed while the app was locked to dark, where the same colour reads 6.32:1. Unlocking light mode is precisely what exposed it, so it belongs here rather than in a later phase: without it, light mode would ship with body text under 4.5:1 app-wide. Dark mode reports 18 findings, unchanged from phase 1 — no regression from unlocking. Light mode reports 21. The three extra are iOS-rendered Section headers (TIER, PREFERENCES, SERVICES) using the system's grey; overriding system header styling across every section to gain ~0.3:1 on decorative labels is a poor trade and is left alone. Two long-standing Settings contrast findings are now explained. They are the last rows of a section sitting under the translucent tab bar, so the audit measures text against a blended background — confirmed by screenshot, present in dark mode since phase 0, and standard iOS scroll-under behaviour rather than a defect.
Diffstat (limited to 'Docs/ACCESSIBILITY.md')
-rw-r--r--Docs/ACCESSIBILITY.md26
1 files changed, 26 insertions, 0 deletions
diff --git a/Docs/ACCESSIBILITY.md b/Docs/ACCESSIBILITY.md
index 7e28d89..7153381 100644
--- a/Docs/ACCESSIBILITY.md
+++ b/Docs/ACCESSIBILITY.md
@@ -29,6 +29,12 @@ worst of those three is shown:
| `StatusWarning` | `#7A5600` | `#FFD60A` | 4.74 | 9.61 |
| `StatusCritical` | `#B3261E` | `#FF6961` | 4.51 | 5.54 |
| `StatusNeutral` | `#5A5A5F` | `#A1A1A6` | 4.92 | 5.88 |
+| `AppTextSecondary` | `#5A5A5F` | `#A1A1A6` | 6.15 | 7.50 |
+
+`AppTextSecondary` replaces `.secondary` for body text. iOS's own `secondaryLabel`
+is only **3.29:1** on a light card — below AA — which never showed while the app
+was locked to dark, where the same colour reads 6.32:1. Unlocking light mode
+exposed it across 191 sites.
High Contrast variants push further in the same direction. Surfaces
(`AppBackground`, `AppSurface`, `AppSurfaceElevated`, `AppSeparator`) carry no
@@ -58,6 +64,26 @@ So there are two colours:
`AppOnAccent` is the label colour for a solid accent fill and flips by scheme —
white on the light accent, black on the dark one.
+## Appearance
+
+`AppAppearance` (System / Light / Dark) is stored in `@AppStorage` and applied in
+**exactly one place** — the `WindowGroup` in `DomainDigApp`. Keep it that way. The
+app previously carried 16 separate `.preferredColorScheme(.dark)` calls scattered
+through view bodies, which is how light mode became unreachable without anyone
+noticing; re-applying per view is what let the lock spread.
+
+Users override it under Settings → Display.
+
+### Known light-mode findings
+
+| Finding | Cause | Action |
+| --- | --- | --- |
+| 2× `contrast failed` on Settings | The last rows of a section sit under the translucent tab bar, so the audit measures text against a blended background. Present in dark mode too, since phase 0. | None — standard iOS scroll-under behaviour |
+| 3× `contrast nearly passed` on Settings | iOS-rendered `Section` headers (`TIER`, `PREFERENCES`, `SERVICES`) use the system's grey. | Not fixed. Overriding system header styling across every section to gain ~0.3:1 on decorative labels trades platform convention for very little |
+
+Dark mode reports 18 findings and light mode 21; the three extra are the section
+headers above. Everything the app actually controls passes in both schemes.
+
## Findings are reported, not enforced
The audit surfaces violations that exist today, so failing on all of them would