Repository navigation
Conversation
The shadow section landmarks fixture added with tester-army#943 pinned the scoping for two of the ten shapes isPageLevel scopes a header or footer to: an article element and a region role. The other eight (aside, main, nav, section, and the article, complementary, main, and navigation roles) had no shadow-nested host in any fixture, so a regression in one of them would pass the cross-check until another fixture happened to trip it. The fixture now nests a header and footer two shadow roots deep under each of the ten scoping shapes, with the page-level control beside them. The run stays green with no new expected.txt lines: the tree and both oracles agree on every header and footer the added hosts carry.
DeryFerd
force-pushed
the
test/crosscheck-shadow-landmark-scope
branch
from
October 8, 2026 16:49
2c4715e to
04c60b8
Compare
Member
|
Thanks for this. Main already catches it, though. The shadow walk in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
The shadow landmark fixture from #943 pins the scoping for two of the ten shapes
isPageLevelscopes a header or footer to. A regression in one of the other eight would have passed the cross-check, because no other fixture nests a landmark in a shadow root under those ancestors. This expands the fixture so every shape the scoping rule reads is exercised on everypnpm testrun.isPageLevel(packages/web/src/in-page/read-semantics.ts:134) scopes an implicitbannerorcontentinfothroughSECTIONING_SCOPE(read-semantics.ts:123): thearticle,aside,main,nav, andsectionelements, plus thearticle,complementary,main,navigation, andregionroles. HTML-AAM scopes a header or footer this way, so a card header inside any of these ancestors is the article's header, not the page's banner. #943 fixed the shadow-host walk that decides this; its fixture covered an<article>host and arole="region"host, which left the other eight scoping shapes without a shadow-nested regression. Thelandmarks and headingsfixture has these ancestors but no shadow roots, so it cannot catch a scoping walk that forgets one of them across a host boundary.What changed
shadow section landmarksfixture (packages/web/tests/crosscheck/fixtures.ts) now nests a header and footer two shadow roots deep under each of the ten scoping shapes, with the page-level control beside them. Each host keeps the structure fix(web): scope shadow landmarks to outer sections #943 established: a shadow root on the scoping ancestor, a wrapper div inside it, a nested shadow root on the wrapper, and the header and footer in the innermost tree, named by the host id.expected.txtlines, no changeset, and no public surface moves.Verified
Ran it locally: yes
pnpm --filter @e2e-dev/web exec vitest run tests/integration/crosscheck.test.ts -t "shadow section landmarks": the fixture passes with the eleven hosts, and again with the whole suite (16 tests, 1 skipped).E2E_CROSSCHECK_UPDATE=1on the same fixture produces an empty diff intests/crosscheck/expected.txt: the tree, Chrome's accessibility tree over CDP, and Playwright'sgetByRoleagree on every header and footer the added hosts carry. All ten scoping shapes still scope their landmarks to the article or section role, and the page-level control still reads asbannerandcontentinfo.cli-runshards and focused-CI cases, onerunner-lifecyclejunit case) fail on this Windows machine identically with and without the change, confirmed by stashing the fixture and rerunning on clean main. Path and line-ending baseline, not from this PR.