Repository navigation
test(e2e): verify in a real browser that a dialog hides the live regions (#501) - #504
Merged
Merged
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #501. That issue stays open — this lands the half a machine can check; the screen-reader pass is still owed.
Why
#485's premise — that #483's
inertsweep takes the offscreen announcers out of the accessibility tree, so an announcement made then is never heard — was only ever inferred from the source. jsdom implements neither live regions nor theinertIDL, so nothing inweb/could observe it.What it proves, in real Chromium
role="alert"banner, and the announcer is never written to across two dialog cycles.CDP is not a style choice
Playwright's own accessibility surface does not model
inert— measured, not assumed:ariaSnapshot()still lists an inert node,isVisible()/isEnabled()still returntrue, onlyclick()notices. The same spec written withgetByRolewould pass whether or not the app inerts anything.src/ax.tsis the sanctioned reader.Three traps, each of which produced a false result first
ax.nodes()is for.MutationObserverrecords every write for the whole test.Also recorded, so the manual pass has less to establish
Both of #501's deferred designs rest on a browser assumption nobody had checked.
aria-live="off"does suppress the implicit politeness ofrole="alert"(paired with a control, because a non-live element reports the samenull), and un-inerting one subtree while a dialog is open does return it to the tree. The Chromium build is annotated — the CDP accessibility domain is experimental.Mutation
The harness's first DOM-level mutants;
src/mutants.tsrecords what that instrument is and is not faithful to. The three announcer mutants differ only in when they write, and each is the only one that reaches its assertion — the first version had one mutant covering a third of the test it named, and the harness reported a clean kill and said nothing.Full run: baseline GREEN, 15 killed, 0 survivors, restore GREEN.
Not covered, stated in the spec header
waiting(Playwright cannot provoke it), and the farm warning needs/accountto fail on a re-read, whose only callers are the banner's own retry and the settings save, neither of which runs with a dialog open. A test-only trigger was considered and rejected.Both are
docs/runbooks/screen-reader-verification.md's job.Review
Four local passes before pushing (pi + three agents: adversarial, conventions, flake/CI). They found the passive-effect race, the uncovered anti-nag loop, a false claim of mine in
mutation-check.sh, an undelivered "same snapshot" invariant, and the snapshot-vs-cumulative weakness. One reported finding —aria-hiddenslipping pastinTree— did not reproduce: Chromium 151 drops those nodes outright, same asinert.