v0.4.2
Probe correctness patch — fixes a pseudo-class misuse in
tools/dialog_probe.py and tools/tab_walk.py that caused
CS2240700E (and indirectly any Tab-walk-derived focus-visibility
check) to false-positive on every site that correctly set a
:focus-visible outline.
Found via dogfood after fixing light-design.com.tw's actual focus
issues — site author's <main tabIndex={-1}> + global outline rules
verified working in DevTools (outlineStyle=solid width=3px under
focus), but a11y-moda v0.4.1 still reported the rule as fail.
Fixed
tools/dialog_probe.py_SKIP_TARGET_FOCUS_JS— removed
getComputedStyle(target, ':focus-visible'). The second argument
togetComputedStyleaccepts only pseudo-elements (::before,
::after,::marker); passing a pseudo-class like
:focus-visibleis invalid and Chromium silently falls back to
the non-focus computed style (Firefox returns null). When the
target is currently focused (skip link Enter has moved focus to it
viatabindex="-1"), reading the regular computed style already
includes the:focus/:focus-visiblecascade — that's the
correct read.tools/tab_walk.pyCOLLECT_FOCUS_JS— same fix. Each Tab
press makes the new elementdocument.activeElement; reading
regular computed style already reflects the focused-state cascade.CS2240700Ecorrectness restored — sites with valid
:focus-visibleoutline +tabindex="-1"skip targets now
correctly pass instead of false-firing.
Notes
- Why this slipped past v0.4.0/0.4.1 dogfood — light-design.com.tw
had no skip-link target focus indicator in those versions, so the
rule was firing on a real underlying issue and passing the eye
test. Bug surfaced only after the site author shipped the actual
fix. Lesson: probes need fixture-style positive controls in
addition to dogfood, not just sites that currently violate. - Per-page nuance on light-design (post-0.4.2) — homepage and
pricing now PASSCS2240700E(probe correctly reads the new
outline cascade); about-us / contact / works still report fail.
This is a probe heuristic limitation, not a recurrence of the
pseudo-class bug —dialog_proberuns aftercarousel_probe's
4.5s observation, and the page state (scroll position, focus
location) sometimes prevents the Tab-from-body walk from reaching
the skip link in 5 presses. Investigating in 0.4.3 (likely:
scroll-to-top + focus-body before each probe). - Acknowledgement — bug diagnosis comes from the
light-design.com.tw author who verified outline was applied via
Playwright at the same timea11y-modawas still reporting fail.
Real-world dogfood found a class of bug that synthetic fixtures
would have missed.