Skip to content

The stacking test reads the whole rule that hides the region under a hover - #680

Merged
johnnyt merged 1 commit into
mainfrom
sb-f23v-stacking-test-rule
Sep 30, 2026
Merged

johnnyt merged 1 commit into
mainfrom
sb-f23v-stacking-test-rule

Conversation

@johnnyt

@johnnyt johnnyt commented Sep 30, 2026

Copy link
Copy Markdown
Member

What

The map regions test "the stylesheet stacks the shown layer over the region" held the stylesheet to the rule that makes the description region transparent while the hover layer is shown, .sb-map__description-hover:not([hidden]) + .sb-map__description in assets/css/statifier_blocks.css. It matched only that rule's opening, { opacity: 0;. A rule that also set visibility: hidden or display: none would take the region out of the accessibility tree, and the test would still pass. Its display refutation covers the layer's rules, not the region's.

The test now collects every rule, among all the stylesheet's rules, whose selector picks the region under a shown layer (a selector carrying .sb-map__description-hover:not([hidden]) and ending in .sb-map__description), with each body's whitespace collapsed, and asserts the list is exactly ["opacity: 0;"]. That asserts the whole body of the one rule and refutes a second rule selecting the region the same way. The grid and layer assertions are unchanged; they now read from the same parsed rule list.

Test-only: no stylesheet or lib/ change, no changelog fragment (changelog.d/README.md excludes tests).

Sabotage

Each against assets/css/statifier_blocks.css, reverted from a copy, byte-equal, and recompiled before the next:

Mutation Outcome
visibility: hidden; added to the region's rule red, left ["opacity: 0; visibility: hidden;"]; on main the same mutation left the test green
a second rule, .sb-map__description-frame > .sb-map__description-hover:not([hidden]) + .sb-map__description { display: none; } red, left ["opacity: 0;", "display: none;"]
the region's rule dropped (the existing sabotage) red, left []

Gate

Full mix quality green on the committed tree: 3,951 of 3,951 tests, 95.3% coverage, dialyzer clean, ADR cites green.

Review

In-turn review: re-read the diff against the bead. The acceptance asks the test to assert the whole rule body, or refute visibility and display on every rule selecting the region under a shown layer, sabotaged; the whole-list assertion does both, and the table shows each shape red. The stylesheet has one such rule today (a read of every :not([hidden]) selector in it), so the exact list is the rule as written.

Refs: sb-f23v

The map regions test "the stylesheet stacks the shown layer over the
region" matched only the opening of the rule that makes the region
transparent under a shown hover layer. A rule that also set
visibility: hidden or display: none would take the region out of the
accessibility tree and the test would still pass.

The test now collects every rule whose selector picks the region under
a shown layer and asserts the list is exactly one body, opacity: 0;.

Sabotaged: visibility: hidden added to the rule, a second rule with
display: none selecting the region under a shown layer, and the rule
dropped; each turned the test red. The first left the test on main
green. Test-only; no lib change.

Gate: full mix quality green on this staged tree (3,951 of 3,951
tests, 95.3% coverage, dialyzer clean, ADR cites green).

Refs: sb-f23v
@johnnyt
johnnyt force-pushed the sb-f23v-stacking-test-rule branch from 7c64e38 to 1efabf8 Compare September 30, 2026 11:15
@johnnyt
johnnyt merged commit 2922a24 into main Sep 30, 2026
2 checks passed
@johnnyt
johnnyt deleted the sb-f23v-stacking-test-rule branch September 30, 2026 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant