summaryrefslogtreecommitdiff
path: root/DomainDigUITests
Commit message (Collapse)AuthorAgeFilesLines
* chore: clear actionable SonarCloud smells (shell [[, merged if)Christian Cleberg10 days1-4/+4
| | | | | | | | | | | | | | | - Scripts/audit-a11y.sh: replace `[ ... ]` with `[[ ... ]]` in the seven shell conditionals SonarCloud flagged (shelldre:S7688). The script is bash (`#!/usr/bin/env bash`), so `[[` is safe and avoids word-splitting/globbing footguns. The jq `[ .devices | ... ]` filter is untouched — it is not a shell test. - AccessibilityAuditHarness.swift: fold the nested `if` in the noise classifier into a single conditional (swift:S1066); behavior unchanged. The remaining open SonarCloud issues (S1075 https literals, S115 external-JSON CodingKeys, S107 parameter counts, S3087 callback nesting) are false positives or intentional and are being resolved as Won't Fix / Safe in SonarCloud, consistent with the v4.8.3 static-analysis policy in RELEASE_ROADMAP.md.
* test(a11y): Phase 6 verification — metadata assertions, middle-band sweep, ↵Christian Cleberg11 days4-0/+339
| | | | | | | | | | | | | | | | | | | | | | | | | | 27.0 fix Executes the Phase-6 manual runbook against the simulator, converting the mechanically-checkable parts into permanent coverage and reporting the rest honestly by tier. - Fix an enforced `.dynamicType` failure surfaced by `audit-a11y.sh current` on iOS 27.0: the Settings `Section("Services")` system header (app sets no font; 18.6 floor and 26.x CI are clean). Narrow, proven `noiseReason` carve-out scoped to dynamicType on the exact Settings header titles. Delta: current FAIL -> SUCCEEDED, finding still prints as `[noise: …]`. - AccessibilityMetadataTests: assert the icon-only control labels and the dense Watchlist/Batch row label+value contracts (green on 18.6 and 27.0). These were one-time manual VoiceOver checks; now they gate. - Middle-band Dynamic Type sweep at AccessibilityL across the seeded screens. Found no band-exclusive third bug (recorded), retained as regression insurance for a band that historically shipped two. - AccessibilityScreenshotTests: best-effort, non-gating capture utility used to produce the cross-runtime Light/Dark/AXXXL screenshots (simctl appearance does not propagate headlessly; driven through the in-app picker instead). - Docs/ACCESSIBILITY_VERIFICATION_RESULTS.md: full pass/fail/not-executable matrix + 15 screenshots. Notable positive result: Differentiate Without Color IS verifiable via the global com.apple.Accessibility defaults domain.
* feat(a11y): engage the audit enforcement ratchet (#21)Christian Cleberg13 days2-31/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The point of the Phase 0 harness finally lands: named findings in textClipped, dynamicType, hitRegion, elementDetection, sufficientElementDescription, and trait now FAIL the build on the empty-state suite. Regressions in five phases of accessibility work are gated, not narrated. Three carve-outs, each earned by evidence rather than convenience: - contrast stays report-only. The two long-standing Settings findings are rows scrolled under the translucent tab bar, and their attribution flips between a row name and nil run-to-run — no suppression is narrow enough to keep CI stable. The centralised palette is the real guard. - The seeded dense-row tests run reportOnly. Bisection showed the audit degrades on children-ignored content — the correct VoiceOver treatment for dense rows — emitting unattributed contrast/dynamicType failures on rows that measure 6-7:1 and render correctly. - Characterised noise is suppressed narrowly and always logged as [noise: reason]: disabled controls (WCAG 1.4.3 exempt), "nearly passed" near-misses, system field placeholders (flagged at any length — proven by shortening them to no effect), and unattributed clipped/dynamic-type artifacts. noiseReason(for:) records each rule's provenance inline. Validated in both directions. Positive: the full 11-test suite passes with enforcement live, dark and light, on an erased simulator. Negative: re-injecting the Phase 3 icon-exposure regression produced two named [FAIL] findings and a failed suite — on both screens sharing the component — then went green again on revert. Docs and the CI workflow comment updated to describe the engaged state.
* feat(a11y): seeded audit fixtures; fix dense-row reflow they exposed (#21)Christian Cleberg13 days2-2/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The dense rows and portfolio sections never rendered in the audit — the test simulator has no tracked domains or batch results — so five phases of row treatment shipped unmeasured. Driving the add-domain UI was tried earlier and rejected (keyboard contamination, persistent state), so this adds DOMAIN_DIG_SEED_FIXTURES: DEBUG-only launch argument, same pattern as DOMAIN_DIG_FORCE_PRO_PLUS, seeding four tracked domains and four batch results chosen to exercise every badge path, including a failed lookup and a stress-length domain name. Fixtures are strictly in-memory. persistTrackedDomains, refreshWidgetData (App Group file), refreshPersistedData, and refreshMonitoringState are all guarded while fixtures are active — the last one mattered: it runs right after seeding in the app task and was reloading the empty disk over the fixtures, which initially made the seeded watchlist audit pass by silently auditing the empty state. Four new audit tests cover the seeded Dashboard, Tracked Domains, and batch results at default and AccessibilityXXXL. What they found was real. At XXXL the watchlist row rendered the domain as "hea lt…" while the Registered badge wrapped one character per line into a screen-height capsule. Fixes, verified by before/after screenshots and the XXXL audits dropping to 7-8 findings per screen: - AppStatusBadgeView gets .fixedSize() — a capsule badge must never letter-wrap; taking natural width instead forces the row layout to its stacked alternative. - WatchlistRowView, BatchResultRowView, and PortfolioExpiryRow headers use ViewThatFits: domain-beside-badge while it genuinely fits, badge below the domain at accessibility sizes. Domain titles get fixedSize(horizontal: false, vertical: true) so they wrap rather than report a single-line ideal width to ViewThatFits and truncate. - The watchlist monitoring metadata strip (three texts abreast) stacks vertically when it no longer fits instead of wrapping mid-word. Known and deliberate: the seeded default-size audits still report a contrast/dynamicType wave attributed to "unknown element". Bisecting the row and badge accessibility modifiers showed most of it is an audit artifact on children-ignored content (the same rows measure 6-7:1 and render correctly); the artifact classes get characterised suppressions when enforcement lands, not blanket ones.
* fix(a11y): suppress disabled-control contrast findings on the ruleChristian Cleberg2026-07-202-14/+13
| | | | | | | | | | | | | | | | | | WCAG 1.4.3 exempts inactive components from contrast requirements, so Inspect's Run button — disabled until a domain is typed — was reporting a contrast failure that was never a real defect. The first attempt typed a domain to enable the button. That worked for the single-screen test but raised the keyboard, which then followed the audit onto every later screen in the Dynamic Type sweep and reported nine phantom hit-region findings per screen against the system emoji picker's category buttons. Suppressing on the rule instead — drop contrast findings whose element reports isEnabled == false — fixes it everywhere with no UI manipulation. Also documents that simulator keyboard state persists across runs, so a dirty simulator inflates the burndown with system-UI findings. Erase and re-run before believing anything that names system UI.
* feat(a11y): semantic colour system (#21 phase 1)Christian Cleberg2026-07-202-2/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replaces every hard-coded colour with semantic asset colours that adapt to light, dark, and Increase Contrast. Dark mode stays locked, so this is a pure refactor: the audit reports the same findings before and after. The accent is now blue rather than cyan, per the tech/DNS theme. Why custom values rather than the system palette: every system colour fails WCAG AA in light mode. Measured on white — systemYellow 1.51:1, systemOrange 2.20:1, systemGreen 2.22:1, systemCyan 2.54:1, systemRed 3.55:1. All of them pass in dark mode, which is why the dark-locked app looked fine, and why unlocking light mode was never a matter of deleting .preferredColorScheme(.dark). Every new value clears 4.5:1 as text on its page, its card, and its own 16% badge tint — the way AppStatusBadgeView actually draws it. The accent needed splitting in two. As text on a dark background it must be light; as a fill behind a white label it must be dark. #4DA3FF reads 8.00:1 as text on black but 2.63:1 behind white text, so StatusInfo / AccentColor cover the foreground role and AccentFill covers .borderedProminent. AppOnAccent is the label colour for a solid fill and flips by scheme. Colours live in Shared/Colors.xcassets rather than the app catalog: the Shared folder is already a synchronized group in all three targets, so the widget and share extension pick the palette up with no project-file surgery. AccentColor stays in the app catalog as the global tint — and is now actually defined, having been an empty colorset that silently left system controls rendering in stock blue while custom chrome used cyan. Two deliberate visual changes: orange folds into StatusWarning and pink into StatusCritical. They encoded the same severity as the colours they now share, and both sites also carry a text label. Audit findings drop 15 to 14, and one of the originals turned out to be a phantom: the Inspect contrast failure was the Run button in its disabled state, which WCAG 1.4.3 exempts. testInspectScreen now types a domain first so the audit measures an enabled control. Findings also carry the offending element now, so the remaining clipped-text items name themselves ("No Portfolio Yet", "Search domains") instead of being anonymous.
* fix(a11y): survive audit timeouts, and stop overclaiming CI floor coverageChristian Cleberg2026-07-202-28/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Two problems the first CI run exposed. Audit timeouts. Three tests failed with "Audit failed to complete in time" (code -56) on the GitHub runner. That is the audit's own internal deadline on a slower machine, not an app defect, and the harness had no resilience to it. Audits now retry up to three times, and a screen that still cannot be audited is reported via XCTSkip rather than passing. Skips are distinct from passes in CI, so an unaudited screen stays visible instead of being silently counted as clean. The Dynamic Type sweep attempts every screen before skipping, so one slow screen cannot drop the other four. Overclaimed floor coverage. The two-simulator matrix was justified on covering the oldest supported OS, but the macos-26 image ships only iOS 26.x runtimes, so "floor" resolved to 26.2 and "current" to 26.5 — the run compared two 26.x images and never touched an 18.x one. The measured non-nested coverage that motivated the matrix (18.6 vs 27.0) reproduces locally but not on this runner. The workflow comment now states this plainly, and the selection step emits a warning annotation when the resolved floor sits a major version or more above the deployment target, so the gap is visible in the CI UI rather than assumed away. Installing an older runtime in CI is possible via xcodebuild -downloadPlatform but costs several GB and minutes per job; left out pending a call on whether that trade is worth it.
* feat(a11y): add accessibility audit harness (#21 phase 0)Christian Cleberg2026-07-202-0/+205
Phase 0 of the accessibility pass: a regression guard that must exist before any of the remedial phases, so their acceptance criteria are enforced rather than asserted once by hand. - Fix the project-level IPHONEOS_DEPLOYMENT_TARGET, which was 26.2 while all three targets are 17.6. It was shadowed everywhere today, but any target added later would silently inherit it and drop iOS 17.6 support with no error. - Add a DomainDigUITests target running performAccessibilityAudit on the six primary screens, plus a sweep of every root screen at AccessibilityXXXL. Uses the existing DOMAIN_DIG_FORCE_PRO_PLUS debug argument so Pro-gated screens are reachable. - Findings are reported, not failed. The audit surfaces violations that exist today, so gating on them would block unrelated PRs until the whole pass lands. Enforcement is a committed constant, AccessibilityAuditHarness.enforcedAuditTypes, widened per audit type as each phase clears a category. - CI now runs xcodebuild test across two simulators. Audit coverage is not nested between OS versions: on Tracked Domains, iOS 18.6 reported 2 findings and iOS 27.0 reported 6 (including contrast and element-detection issues 18.6 never raised), while at accessibility text sizes the Dashboard produced a hit-region finding on 18.6 that 27.0 did not. - Simulator selection is now dynamic and floor-aware. The previous selector took the first iPhone from any runtime, which can resolve to a simulator below the deployment target where the app cannot install. Baseline on iOS 18.6: 15 findings across 7 tests — text clipping on every screen, contrast on Inspect and Settings, and a hit-region failure on the Dashboard at accessibility text sizes.