v0.4.1
Patch fixing two real-audit gaps that v0.4.0 dogfood scan revealed:
-
CS2240700E(skip-link target focus) was emitting nothing on
light-design.com.tweven though the MODA AAA report flagged
exactly this pattern. Root cause: thedialog_probecorrectly
pressed Enter on the skip link, but browsers do not move keyboard
focus on<a href="#x">activation unless the target carries
tabindex="-1". The probe'sopenedflag stayed False. The rule
only fired whenopened=True AND visible_focus=False, so the
"Enter pressed but focus didn't move" case (the most common
violation) was silently passed. -
--dark-modewas a one-or-the-other switch — it scanned ONLY in
dark mode, replacing the default light scan instead of adding to
it. Most contrast bugs only appear in one variant; the other has
to be re-scanned manually. Now--dark-moderuns both passes and
merges, with dark-only issues prefixed[深色模式]so the merged
report makes attribution obvious.
Coverage delta on the 9-finding MODA AAA audit (light-design.com.tw,
2026-05-12 dogfood): 5/9 stable HITs in v0.4.0 → 5/9 stable HITs in
v0.4.1, but the quality improved — CS2240700E is now a true
match and GN2140300E aligns to the MODA-flagged dark-mode contrast
segment instead of an unrelated light-mode segment. GN1220200E
(carousel pause) remains intermittent due to Wix Reviews lazy-mount
timing — pre-existing flake, not regressed by this release.
Added
DialogProbeResult.skip_link_found— distinguishes "probe
found a skip link and pressed Enter" from "probe found nothing".
Required soCS2240700Ecan fire on the "Enter pressed but focus
didn't move" case without false-firing on pages that simply lack a
skip link (the latter isGN1240100E's domain).scanner.merge_dark_into_report+_merge_dark_into_page—
combines a dark-modeScanReport/PageReportinto the
corresponding light report. Dark-only issues (after exact
(rule_id, snippet, message)dedup) get the[深色模式]prefix.
Changed
CS2240700E— now emits two distinct fail messages:Enter 後焦點未跳至目標元素when the skip link was activated but
document.activeElementdid not become the target (most common
violation — target lackstabindex="-1").焦點已跳至目標但目標元素無可見焦點指示when focus did move but
the target's:focus-visiblestyle is empty (existing case,
refined wording).
--dark-modeflag semantics — was "scan only in dark"; is now
"scan in light AND dark, merge results". Behavioral change for
anyone scripting against the flag, but more useful in practice
(dual coverage in one command). Help text updated.
Notes
- Flake disclosure —
GN1220200E(carousel pause) detection
depends on Wix Reviews lazy-mounting before the 4.5s observation
window expires. Onlight-design.com.twthis hits ~50% of runs.
Not regressed by 0.4.1; will be addressed in a follow-up via
pre-probe scroll + extended observation when no motion is detected
in the first window. - Why 0.4.1 not 0.4.0.1 —
--dark-modesemantic change is a
user-visible behavior shift. SemVer-strict would call this minor,
but pre-1.0 we keep it as patch since the flag was new in 0.4.0
and the new behavior is what users actually wanted. - No README rewrite needed —
--dark-modedescription in README
already said "Run twice (light + dark) for full coverage" — the
CLI now matches what the README promised.