Docs/ACCESSIBILITY.txt

574 lines · 30581 bytes

  1# Accessibility Audit
  2
  3`DomainDigUITests` runs Apple's `performAccessibilityAudit()` across every
  4primary screen. The audit checks contrast, hit-region size, clipped text at
  5large Dynamic Type, element descriptions, trait correctness, and Dynamic Type
  6support — the same ground the accessibility pass tracked in
  7[issue #21](https://github.com/krazywarez/domain-dig/issues/21) covers.
  8
  9## The colour palette
 10
 11Semantic colours live in `Shared/Colors.xcassets`, which is inside the `Shared`
 12file-system-synchronized group and therefore reaches the app, the widget, and
 13the share extension automatically. `AccentColor` stays in
 14`DomainDig/Assets.xcassets` because it is the system-wide tint resolved via
 15`ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME`.
 16
 17Use the generated asset symbols — `Color(.statusCritical)`, `Color(.appSurface)`
 18— never a literal. `ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS`
 19is on, so these are compile-time checked; a typo will not build.
 20
 21Every value clears WCAG AA (4.5:1) as text on its page, on its card, **and on
 22its own 16% badge tint** — the way `AppStatusBadgeView` actually draws it. The
 23worst of those three is shown:
 24
 25| Role | Light | Dark | Worst light | Worst dark |
 26| --- | --- | --- | --- | --- |
 27| `StatusInfo` / `AccentColor` | `#0000FF` | `#4DA3FF` | 6.76 | 6.47 |
 28| `StatusPositive` | `#008035` | `#30D158` | 4.54 | 7.62 |
 29| `StatusWarning` | `#AD5100` | `#FF9F0A` | 4.59 | 7.76 |
 30| `StatusCritical` | `#CC0700` | `#FF6961` | 4.68 | 6.12 |
 31| `StatusNeutral` | `#5A5A5F` | `#A1A1A6` | 5.84 | 6.76 |
 32
 33Each status foreground has a matching `…Surface` colour for the fill behind it,
 34paired through `AppStatusTone`.
 35
 36### Contrast alone is not a palette
 37
 38The first version of this palette maximised contrast and produced mud. Requiring
 39every foreground to clear 4.5:1 against *its own 16% tint* — the harshest
 40surface it ever sits on — pushed each colour ~20% darker than the common case
 41needed. `#7A5600` is not amber, it is olive; `#146C2E` is not green so much as
 42bottle-dark. Contrast passed and the UI was still hard to read, because hue
 43identity is what tells "warning" from "critical" at a glance.
 44
 45Two fixes:
 46
 471. **Decouple the fill from the foreground.** `AppStatusTone` carries a
 48   `foreground` and a `surface` that are authored independently, so the
 49   foreground no longer has to survive a wash of itself. Every status foreground
 50   is now fully saturated (`S = 1.0`).
 512. **Warning is orange, not yellow.** Yellow cannot stay yellow at a lightness
 52   low enough to clear 4.5:1 on white — it *becomes* olive. That is
 53   colorimetric, not a tuning problem. Orange holds its identity when darkened,
 54   so warning is `#AD5100` in light and `#FF9F0A` in dark.
 55
 56When adding a colour, search for the most saturated value that passes, not the
 57darkest. The darkest is always easy and always wrong.
 58| `AppTextSecondary` | `#5A5A5F` | `#A1A1A6` | 6.15 | 7.50 |
 59
 60`AppTextSecondary` replaces `.secondary` for body text. iOS's own `secondaryLabel`
 61is only **3.29:1** on a light card — below AA — which never showed while the app
 62was locked to dark, where the same colour reads 6.32:1. Unlocking light mode
 63exposed it across 191 sites.
 64
 65High Contrast variants push further in the same direction. Surfaces
 66(`AppBackground`, `AppSurface`, `AppSurfaceElevated`, `AppSeparator`) carry no
 67meaning, so they get Any/Dark and, where useful, High Contrast — but no status
 68semantics.
 69
 70Why custom values instead of the system palette: **every** system colour fails
 71in light mode. Measured on white — systemYellow 1.51:1, systemOrange 2.20:1,
 72systemGreen 2.22:1, systemCyan 2.54:1, systemRed 3.55:1. All of them pass in
 73dark mode, which is why the dark-locked app looked fine and why unlocking light
 74mode is impossible without this work.
 75
 76### The accent has two roles, and they conflict
 77
 78An accent used as **text on a dark background** must be light. The same accent
 79used as a **fill behind a white label** must be dark. One value cannot do both:
 80`#4DA3FF` reads at 8.00:1 as text on black, but only 2.63:1 behind white text.
 81
 82So there are two colours:
 83
 84- `StatusInfo` / `AccentColor` — the accent as *foreground*: text, icons,
 85  bordered-button labels, tab bar.
 86- `AccentFill` — the accent as a *filled background* behind a label, used by
 87  `.borderedProminent`. Stays dark in both schemes so a white label clears AA
 88  (8.59:1 light, 7.56:1 dark).
 89
 90`AppOnAccent` is the label colour for a solid accent fill and flips by scheme —
 91white on the light accent, black on the dark one.
 92
 93## Appearance
 94
 95`AppAppearance` (System / Light / Dark) is stored in `@AppStorage` and applied in
 96**exactly one place** — the `WindowGroup` in `DomainDigApp`. Keep it that way. The
 97app previously carried 16 separate `.preferredColorScheme(.dark)` calls scattered
 98through view bodies, which is how light mode became unreachable without anyone
 99noticing; re-applying per view is what let the lock spread.
100
101Users override it under Settings → Display.
102
103### Known light-mode findings
104
105| Finding | Cause | Action |
106| --- | --- | --- |
107| 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 |
108| 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 |
109
110Dark mode reports 18 findings and light mode 21; the three extra are the section
111headers above. Everything the app actually controls passes in both schemes.
112
113## Enforcement — the ratchet is engaged
114
115With phases 1–5 landed, `AccessibilityAuditHarness.enforcedAuditTypes` enforces
116**`.textClipped`, `.dynamicType`, `.hitRegion`, `.elementDetection`,
117`.sufficientElementDescription`, `.trait`** on the empty-state test suite. A
118named finding in any of these fails the test run — regressions in five phases of
119work are still gated locally and at the pre-push hook, not merely reported.
120
121Three deliberate carve-outs, each with its evidence:
122
1231. **`.contrast` stays report-only.** The two long-standing Settings findings
124   are rows scrolled under the translucent tab bar; their attribution flips
125   between a row name and nil run-to-run, so no suppression is narrow enough to
126   keep CI stable. The centralised palette in `Shared/Colors.xcassets` is the
127   actual guard against contrast regressions. The same tab bar degrades
128   `dynamicType` on the rows immediately above it, which is a separate carve-out
129   — see "`dynamicType` findings land on a position, not on a row".
1302. **The seeded tests run `reportOnly`.** Bisecting the row/badge accessibility
131   modifiers showed the audit degrades on `children: .ignore` content — the
132   *correct* VoiceOver treatment for dense rows — emitting unattributed
133   contrast/dynamicType failures on rows that measure 6–7:1 and render
134   correctly. Their burndown still prints; it just doesn't gate.
1353. **Characterised noise is suppressed narrowly and always logged** with a
136   `[noise: reason]` marker — disabled controls (WCAG 1.4.3 exempt), "nearly
137   passed" near-misses, system field placeholders (clipped at any length —
138   proven by shortening them to no effect), and unattributed
139   clipped/dynamic-type artifacts. Nothing disappears silently; see
140   `noiseReason(for:)` for each rule's provenance.
141
142`enforcedAuditTypes` is what a fully cleared screen gets. A screen part-way
143through its burndown passes `enforcing:` to `audit` instead, naming only the
144categories it has cleared, so progress gates as it is made rather than waiting
145on the whole screen. Monitoring Settings is the first: `.textClipped` only.
146
147Enforcement is a committed constant rather than a CI setting, for two reasons.
148Environment variables do not work: neither a plain `xcodebuild` env var nor a
149`TEST_RUNNER_`-prefixed build setting reaches the UI test process, so the toggle
150silently did nothing. And a committed value makes "when did clipping become
151enforced?" answerable with `git blame` instead of CI tribal knowledge.
152
153## Screens reached through Settings
154
155The suite audited the five root tabs and the watchlist only, so every screen
156behind a Settings row was unaudited — including the integration editor's whole
157form, which is the densest set of text fields and captions in the app, and the
158SMTP port caption added in !5, which had never been rendered at the largest
159Dynamic Type under audit (A-review C9).
160
161Integrations and the integration editor are now covered, **report-only**: they
162have never been through the ratchet, so gating them on first contact would fail
163the build on findings that predate the coverage. What they report on iOS 27.0:
164
165| Screen | Findings |
166| --- | --- |
167| Integrations | 1: `dynamicType` on "Process Queue Now" |
168| Integration editor | 7: `contrast` on "Cancel", "Save", "DNS Changed", "Routing Rules"; `dynamicType` on "Cancel" and "Save"; one characterised system-field-placeholder clip |
169
170"Cancel" and "Save" are the editor's toolbar buttons, which are plain `Button`s
171rather than density-aware text — that is why they appear in both categories.
172They go on the #21 burndown; `enforcedAuditTypes` widens to cover these screens
173once they are clear.
174
175The other ten destinations are covered by `testSettingsDestinations`, also
176report-only. One launch audits all of them: re-selecting the Settings tab pops
177it back to root, so each row is tapped from a known place, and the store reset
178makes the launch state the same for every one. That is 98s for ten screens
179rather than ten launches.
180
181All ten are reachable and all ten audit. 87 findings, of which 43 are real and
18244 are already-characterised noise. **No enforced failures**, which is why the
183test passes report-only rather than needing a carve-out:
184
185| Screen | Real | Noise |
186| --- | --- | --- |
187| Monitoring Settings | 12 | 1 |
188| History & Network | 7 | 5 |
189| Scheduled Reports | 5 | 1 |
190| Monitoring Log | 4 | 1 |
191| Import & Export | 4 | 5 |
192| Display | 3 | 1 |
193| Local API | 3 | 5 |
194| Data Management | 2 | 8 |
195| App Info | 2 | 15 |
196| iCloud Sync | 1 | 2 |
197
198By category the 43 are: `dynamicType` 21, `textClipped` 15, `contrast` 6,
199`elementDetection` 1. The shape matches the rest of the burndown — text that
200does not scale and text that clips at large sizes, concentrated in the
201settings forms with the most rows.
202
203App Info is the inverse: 17 findings, 2 real, the rest system-field and
204unattributed artefacts already characterised in `noiseReason(for:)`.
205
206The counts above are the floor tier (iPhone 16, iOS 18.6). The current tier
207reports fewer on every screen — Monitoring Settings 13 against 8, App Info 17
208against 5 — which is the asymmetry the coverage table below already records,
209measured here across ten more screens.
210
211## Menu pickers clip their value at accessibility text sizes
212
213A `Picker` in a `Form` renders as a menu button: the label takes the width it
214needs and the value gets what is left, on one line. At `AccessibilityXXXL` on
215an iPhone 16 that leaves nothing. Measured on Monitoring Settings before the
216fix:
217
218| Row | Value | Rendered |
219| --- | --- | --- |
220| Base Interval | Every 12 Hours | `E…rs` |
221| Notify For | Critical + Warnings | `C…s` |
222| Domains | All Tracked | `A…d` |
223| Sensitivity | Medium | `Medium` |
224
225Three treatments were measured. Only the third works:
226
227- **`.fixedSize(horizontal: false, vertical: true)`** — no change. The menu
228  button ignores it.
229- **Stacking the label above the menu** in a `VStack` at accessibility sizes —
230  the label gets full width, but the value still truncates
231  (`Criti…nings`). The menu's value is one line whatever width it gets.
232- **`.pickerStyle(.navigationLink)`** — the row becomes label over value with a
233  chevron, both in full, and the options move to a pushed list. This is what
234  iOS Settings itself does at these sizes.
235
236`AdaptivePicker` (`DomainDigUI.swift`) applies the third only when
237`dynamicTypeSize.isAccessibilitySize`, and stays a menu below that, so the
238interaction is unchanged for anyone not using accessibility text. It replaces
239the eight `Picker`s on History & Network and Monitoring Settings, the two
240quiet-hours pickers among them — those render only while the toggle is on, so
241the audit has never seen them, but they are the same construct.
242
243Result on the floor tier: `textClipped` on Monitoring Settings goes from 5 to
2440, and on History & Network from 3 to 1. Both screens are clipping-free on the
245current tier. Monitoring Settings is therefore the first Settings destination
246to gate rather than report, on `.textClipped` alone — the `enforcing:` argument
247on `AccessibilityAuditHarness.audit` is the ratchet at screen granularity, and
248it passes on both tiers.
249
250The same clipping is still reported on Display ("Compact", "Default",
251"System") and iCloud Sync ("Merge"), which are the same construct on screens
252outside this pass.
253
254## `dynamicType` findings land on a position, not on a row
255
256The remaining `dynamicType` findings — eight on Monitoring Settings, five named
257on History & Network, three on the Settings root — report "font sizes are
258partially unsupported" against rows the app sets no font on. They are
259reproducible: identical on both runtimes and across repeat runs. The picker fix
260above does not touch them.
261
262**They follow the slot, not the row.** Reordering the Settings root's Services
263section moves the findings onto whichever rows take the vacated positions:
264
265| Slot | Before | | After | |
266| --- | --- | --- | --- | --- |
267| 1 | Monitoring Log | | Local API | |
268| 2 | Integrations | | iCloud Sync | |
269| 3 | Local API | FAIL | Monitoring Settings | FAIL |
270| 4 | iCloud Sync | FAIL | Monitoring Log | FAIL |
271| 5 | Monitoring Settings | FAIL | Integrations | FAIL |
272| 6 | Scheduled Reports | contrast | Scheduled Reports | contrast |
273
274Every one of those rows is an identical `NavigationLink("Title") { … }`. The
275only thing that changed is which title sits in slots 3–5.
276
277**The slots are the band above the tab bar.** Measured frames at default size
278in a 912pt window:
279
280| Row | y | Hittable |
281| --- | --- | --- |
282| Monitoring Log | 590–642 | yes |
283| Integrations | 642–694 | yes |
284| Local API | 694–746 | yes |
285| iCloud Sync | 746–798 | yes |
286| Monitoring Settings | 798–850 | yes |
287| Scheduled Reports | 850–902 | **no** |
288
289The translucent tab bar starts around y 829. The three reporting slots are the
290156pt directly above it; the row that sits fully behind it reports `contrast`
291instead. As the audit sweeps content size categories the rows march downward —
292at `XXXL`, Monitoring Settings is at y 885 and no longer hittable and
293Scheduled Reports is gone from the tree entirely — so the rows in that band are
294the ones whose measurement degrades part-way through the sweep. Hence
295"partially".
296
297This is the same root cause already carved out for `.contrast`: rows under the
298translucent tab bar. It simply surfaces in a second audit category.
299
300Two earlier observations fit this and no other explanation:
301
302- **The same constructs report nothing.** `Text`, `Text` with the density
303  caption font, `Toggle` and `LabeledContent` inserted as probe rows into the
304  Monitoring Settings `Form` all audit clean — they sat near the top.
305- **Inserting rows moved the findings.** With five probe rows above them,
306  "Adaptive Monitoring" began reporting and "Enable Background Monitoring"
307  stopped, and "Background Refresh" and "Notification Access" switched from
308  `dynamicType` to `contrast` — pushed from the band into the bar.
309- **The rows render correctly.** Captured at `XXL` and `AccessibilityXXXL`,
310  every named label scales, wraps and reads in full.
311
312### What was done about it
313
314The Settings root is the only *enforced* screen long enough to reach the band,
315so it was the only one failing — `testSettingsScreen`, on iOS 27.0, with three
316`[FAIL][dynamicType]` findings. Reproduced with the picker change stashed on
317`main` at `02a3463`, so it predated that work. The floor tier passes, the
318pre-push hook runs the floor tier only, and there is no CI, which is why
319nothing had been looking at it.
320
321`noiseReason` now classifies dynamicType findings on the Settings root's row
322titles (`settingsDestinationRows`), with the reorder table recorded inline as
323the evidence. It is scoped to that category and those titles, so a regression on
324anything else on that screen still fails.
325
326Not done, deliberately: nothing was changed in the UI. List content scrolling
327under a translucent tab bar is how iOS is supposed to look, and inset-ing the
328list to stop it would be changing correct layout to satisfy a measurement
329artifact.
330
331The equivalent findings on the report-only Settings destinations are the same
332artifact and stay reported — those screens do not gate, so there is nothing to
333unblock, and a suppression wide enough to cover arbitrary `Form` rows would
334hide real regressions.
335
336## Long navigation titles clip
337
338`textClipped` is reported against the navigation title of exactly the screens
339whose title is 15 characters or more: History & Network, Scheduled Reports,
340Import & Export, Data Management. The short ones — Display, Monitoring, Local
341API, iCloud Sync — are clean. The large title renders in full at default size;
342it is the growth at larger sizes that does not fit, and SwiftUI does not wrap a
343large title.
344
345The only remedy in app code is a shorter title, which for these four would mean
346naming the screen something other than what the Settings row that opens it
347says. Left as reported. It is the one `textClipped` finding still open on
348History & Network, and why that screen stays report-only.
349
350## Recent searches are never audited
351
352The empty-state suite launches a fresh install, so Inspect's recent-searches
353section — which only appears once a lookup has been run — is never in the tree
354when the audit walks it. Driving one real lookup and re-auditing surfaced four
355findings in it on iOS 27.0:
356
357- `dynamicType` on the "RECENT" header and on the "Clear" button
358- `hitRegion` too small on "Clear"
359- `sufficientElementDescription`, "label not human-readable", on a domain chip
360
361These are latent rather than new: nothing in the section changed when Inspect
362moved to a `List`. They need a seeded recent-searches fixture to be audited
363properly, which the seed harness does not have.
364
365## The empty-state screens are cleared before each launch
366
367The enforced suite audits several screens in their empty state, and nothing used
368to guarantee they were empty: `AccessibilityAuditHarness.launch` only added
369launch arguments, so whatever a previous run, a manual launch or another test
370target had left in the app's container was still there.
371
372That made the result depend on what ran before it. `testTrackedDomainsScreen`
373passed with one finding in isolation, and reported six — including an enforced
374`[FAIL][dynamicType]` on `EditButton`, which only renders when the watchlist has
375rows — during a full `xcodebuild test`, which is what the pre-push hook runs.
376
377**A correction to what this file said first.** The initial note blamed the
378seeded fixtures. That was wrong: `seedAuditFixturesIfRequested` writes only to
379the live view model and `auditFixturesActive` blocks persistence precisely so
380they cannot leak, and running the whole audit class against a cleared store
381reproduces neither the failure nor the extra findings. Ruled out as well: the
382unit target, which leaves `trackedDomains` as an empty array in the app's own
383defaults. The source of the rows was never isolated.
384
385What fixed it is making the question moot. `AuditFixtures.resetStoreIfRequested`
386clears the app's defaults domain and the history files when
387`DOMAIN_DIG_RESET_STORE` is passed, and the harness passes it on every launch.
388It runs as the view model's `defaults:` argument rather than inside `init()`,
389because a property's default value is evaluated before the initialiser body —
390a reset in the body would run after the first read.
391
392Measured: the same full `xcodebuild test` that reported one enforced failure
393reports none, `AccessibilityAuditTests` goes from 13 of 14 passing to 14, and
394`tracked-domains` is back to a single characterised-noise finding.
395
396## Why the floor runtime needs its own run
397
398**Audit coverage is not nested across OS versions.** Each runtime reports
399findings the others miss, in *both* directions. Measured on this project:
400
401| Screen | iOS 18.6 | iOS 27.0 |
402| --- | --- | --- |
403| Tracked Domains | 2 (text clipped) | **6** (+ contrast ×3, element detection) |
404| Settings | 2 contrast | **`dynamicType`** finding 18.6 missed |
405| Dashboard @ `AccessibilityXXXL` | **hit region** + 2 clipped | 1 clipped only |
406
407Neither runtime is a superset, so the oldest supported OS needs its own run.
408This also rules out committing per-screen baseline counts as a regression guard:
409no single number is correct on both.
410
411The audit therefore runs locally, across both ends, via
412`Scripts/audit-a11y.sh` — on a machine that actually has an 18.x runtime
413installed. The pre-push hook in `.githooks/` runs both of them.
414
415There is no CI job. The GitHub Actions workflow that used to run this suite on
416the newest runtime has been removed, and with it the one check that no local run
417can reproduce: **a clean checkout of the merge result.** That mattered here
418because `DomainDig.xcodeproj` is hand-edited and uses file-system-synchronized
419groups, where a whole missing folder still builds fine locally and breaks only
420for someone else. A local hook runs against the working tree, so it cannot catch
421a file that was never committed. Nothing covers that now — verify a fresh clone
422by hand before a release.
423
424## Running it
425
426```sh
427./Scripts/audit-a11y.sh            # floor + current (~20 min)
428./Scripts/audit-a11y.sh floor      # oldest supported only (~8 min)
429./Scripts/audit-a11y.sh current    # newest installed only (~10 min)
430```
431
432It exits non-zero when a tier fails — an enforced category reporting a named
433finding, or the suite not running at all — so it can be used as a gate. Findings
434in unenforced categories are printed and do not affect the exit code.
435
436The script reads the deployment target from the project rather than hard-coding
437it, and selects the oldest installed runtime **at or above** it — a runtime
438below the deployment target is useless, because the app cannot install there.
439If the nearest installed runtime is a major version above the target, it says
440so rather than implying floor coverage it does not have.
441
442### Pre-push hook
443
444```sh
445git config core.hooksPath .githooks
446```
447
448Runs the complexity ratchet, then the audit on **both** runtimes, before a push,
449and only when Swift, asset, or project files changed. Bypass with
450`git push --no-verify`.
451
452Both tiers rather than the floor alone because coverage is not nested across OS
453versions (below) and there is no CI, so a tier the hook does not run is not run
454at all. The cost is real: about twenty minutes, against roughly eight for the
455floor alone.
456
457Pre-push rather than pre-commit deliberately: at pre-commit that blocks every
458commit. A hook routinely bypassed with `--no-verify` is worse than no hook,
459because it trains you to ignore it — which is the standing argument against
460letting this get any slower.
461
462## Layout gotchas found the hard way
463
464- **`Label` clips its own title.** Every empty-state heading reported as clipped
465  text. `.fixedSize` applied to the `Label` does not reach the `Text` inside it,
466  so the fix is to split it into an `HStack { Image; Text }` and put the modifier
467  on the `Text`. Changing the font design did **not** help — that hypothesis was
468  tested and discarded.
469- **Splitting a `Label` exposes its icon to VoiceOver.** `Label` folds the image
470  into the title's accessibility element; an `HStack` does not, so the icon
471  starts announcing its raw SF Symbol name ("checklist.unchecked"). Decorative
472  icons split out of a `Label` need `.accessibilityHidden(true)`.
473- **Placeholder text is always reported as clipped.** Search prompts and
474  `TextField` placeholders are flagged regardless of length — shortening
475  "Search portfolio" to "Search" changed nothing. Treat `textClipped` findings on
476  a `searchField` or `textField` element as noise rather than shortening useful
477  prompts to chase them.
478- **`AppLayout.minimumTapTarget` is the floor for every control.** `@ScaledMetric`
479  scales *down* below the default text size as well as up, so a scaled dimension
480  needs `max(scaled, AppLayout.minimumTapTarget)` or it drops under 44pt for
481  users who prefer smaller text.
482
483## VoiceOver conventions
484
485- **Dense rows use combine-for-summary, custom-content-for-detail.**
486  `BatchResultRowView` and `WatchlistRowView` each hold 8–9 text elements.
487  Reading them inline makes a long sweep unnavigable, so each row is one element:
488  `.accessibilityElement(children: .ignore)` + domain label + status value, with
489  the rest on `.accessibilityCustomContent(...)`. `.high` importance is spoken
490  inline; everything else reaches the More Content rotor on a vertical swipe.
491  Rows with only 3–4 elements (the portfolio activity/attention/expiry rows) are
492  left to `NavigationLink`'s automatic combine — custom content is for the dense
493  case, per WWDC21-10121.
494- **The custom-content chain must live in a `ViewModifier`.** Inlined onto a row
495  body, six `.accessibilityCustomContent` calls plus the visual layout blow the
496  Swift type-checker's budget ("unable to type-check in reasonable time").
497  `BatchRowAccessibility` / `WatchlistRowAccessibility` exist for that reason.
498- **Splitting a `Label` exposes its icon; combining a header swallows its
499  trailing controls.** Two opposite traps. A decorative icon pulled out of a
500  `Label` needs `.accessibilityHidden(true)`. A header built as a `Button` must
501  *not* get `.accessibilityElement(children: .combine)` if its label contains
502  other controls (`CollapsibleSectionView`'s `trailing()` holds Track/Pin) —
503  combine would merge them into the header and make them unreachable.
504- **Label-in-name (WCAG 2.5.3).** Every `accessibilityLabel` added to a control
505  with visible text keeps that text, so Voice Control still works. Free-form
506  labels are used only where the control is genuinely icon-only.
507- **Technical strings** get `speechStyle: .technical` on `InfoRowViewData`, which
508  applies `.speechAlwaysIncludesPunctuation()` and
509  `.accessibilityTextContentType(.sourceCode)`. Set today on DNS record values
510  and cipher suites; extend it wherever the view model emits a fingerprint,
511  serial, or record string.
512
513## Color independence, motion, transparency
514
515- **Status is never colour-only.** In-app badges already pair a symbol with the
516  colour. The widget status dot is now an SF Symbol
517  (`checkmark.circle.fill` / `exclamationmark.triangle.fill` /
518  `exclamationmark.octagon.fill`) — the same vocabulary as the badges, so a
519  status reads consistently across surfaces and survives greyscale.
520- **`accessibilityDifferentiateWithoutColor`** adds redundant shape only when the
521  user asks for it, avoiding clutter otherwise: the Dashboard summary-card dot
522  becomes a per-filter symbol, the selected quick-filter chip gains a checkmark
523  and border (selection was fill-colour only), and `LabeledValueRow` prefixes a
524  warning/failure symbol.
525- **`accessibilityReduceMotion`** guards all five animation sites via
526  `withAnimation(reduceMotion ? nil : …)` / `.animation(reduceMotion ? nil : …)`:
527  `AppCopyButton`'s check cross-fade, `CollapsibleSectionView`'s expand/collapse,
528  `TimelineDiffView`'s scroll, and `WatchlistView`'s list reorder.
529- **`accessibilityReduceTransparency`** swaps the single `.thinMaterial` for an
530  opaque `AppSurfaceElevated` capsule.
531
532These cannot be verified by `simctl`, which toggles only Increase Contrast — the
533other three settings live in the simulator's Settings app. They are correct by
534construction and build-clean; their runtime behaviour is part of the Phase 6
535manual pass. `SweepActivityController` was dropped from the motion list: it is
536pure ActivityKit lifecycle with no animation to guard.
537
538### What the automated audit cannot check
539
540`performAccessibilityAudit()` validates descriptions, traits, contrast, hit
541regions, and clipping. It does **not** exercise VoiceOver speech, the More
542Content rotor, custom-content ordering, or announcements. Those are verified by
543construction and a manual VoiceOver pass (Phase 6), not by the suite. A green
544audit is necessary, not sufficient, for the row and speech work.
545
546Additionally, the dense rows (`BatchResultRowView`, `WatchlistRowView`) and the
547widget never render in the audit — the test simulator has no tracked domains or
548batch results. Their treatment is unverified by the suite for the same reason the
549Phase 3 `ViewThatFits` work was deferred: absence of findings is absence of data.
550
551## Notes
552
553- **Disabled controls are a false positive, and are suppressed.** WCAG 1.4.3
554  exempts inactive components from contrast requirements, but the audit flags
555  them anyway — Inspect's Run button is disabled until a domain is typed, and
556  auditing the empty state reported a contrast failure that was never a real
557  defect. The harness now drops contrast findings whose element reports
558  `isEnabled == false`. Suppressing on the rule beats driving the UI to enable
559  the control: typing raises the keyboard, which then follows the audit onto
560  later screens and flags the system emoji picker's category buttons.
561- **A dirty simulator inflates the burndown.** Keyboard state persists across
562  runs, so a simulator left with the emoji picker open reports ~9 phantom
563  hit-region findings per screen. If findings appear that name system UI
564  ("Flags category", "Frequently Used category"), erase the simulator
565  (`xcrun simctl erase <udid>`) and re-run before believing them.
566- Audits retry up to three times. Slower machines can miss the audit's internal
567  deadline (`Audit failed to complete in time`, code `-56`), which is a tooling
568  timeout, not an app defect. A screen that still cannot be audited is reported
569  as an `XCTSkip`, never a pass — skips are visually distinct in CI, so an
570  unaudited screen stays visible instead of being silently counted as clean.
571- The suite launches with `DOMAIN_DIG_FORCE_PRO_PLUS` so Pro-gated screens are
572  reachable. `PurchaseService` honours that argument in `DEBUG` builds only.
573- Everything used is available at the iOS 17.6 deployment floor;
574  `performAccessibilityAudit` is `ios(17.0)`.