Repository navigation
Read the page's controls from the root element in two test readers - #5439
Merged
Merged
Conversation
leaf-agent
approved these changes
Nov 5, 2026
leaf-agent
added a commit
that referenced
this pull request
Nov 5, 2026
…5444) Every external link's `aria-describedby` points at one hidden "opens in a new tab" span, and `declared-words.js` appended that span to `document.body`. Since #5228, `body`'s children are the page's own elements (`pageDocument()` returns `body`), so the span sat beside `main` and changed what the page's structural selectors match, such as `main:last-child` or `main + *`. The render gate's `apparatusAmongAuthored` probe caught this on every corpus page with an external link. In [scheduled run 41816958231](https://github.com/max-sixty/leaf/actions/runs/41816958231) it reported `<span>, which Leaf adds, stands among the page's own elements inside <body>` for github-discoveries, pr-walkthrough, rust-sort and others. The span now lives in the chrome root (`chromeRoot`, mounted after `body` in both the live and the export boot paths). It is in the same document, so the link's accessible description doesn't change. Inside a shadow root the span still lives in that root. Verification on Linux: - `test_page_fixture_renders[github-discoveries]`, `[pr-walkthrough]`, `[rust-sort]` and `[alert-review]` from `tests/journeys/test_render_gate.py` (run with `--run-nightly`) pass. Without this change, github-discoveries fails with the finding above; the debug output showed the offending element as `<span data-lf-gen="1" id="lf-external-description-1" hidden data-lf-runtime>`. - That gate run also carried #5439's one-line `reader_state` change. Without it these cases also fail with `g opened no go-to`, which #5439 owns. - The accessible-description tests `test_a_render_of_an_external_links_words_keeps_its_treatment` and `test_an_external_link_says_and_opens_where_it_goes` pass. - `pnpm run test:runtime` (810) and `pnpm run check` pass. One pr-walkthrough run also ended with a teardown error, `ResizeObserver loop completed with undelivered notifications` on `versions/v1.html`. The same error appears in run 41816958231 before this change, on pr-walkthrough, notification-playground and thread-panel-gallery, so it is a separate cause. Refs #4225 — automated triage Co-authored-by: leaf-agent <[email protected]>
max-sixty
pushed a commit
that referenced
this pull request
Nov 5, 2026
…settles a round trip (#5451) `surface_findings` (render gate, closed surfaces) removes the live region's last announcement from each round trip's reading before comparing trips. It does this because a panel can mark a message read after Go-to announces its routes, which changes the routes Go-to speaks next. Since #5439, `reader_state` snapshots `:root`, which nests the live region's text one level deeper than the region's own `aria_snapshot`. The exact-line match never found the announcement, so on current main `test_page_fixture_renders[ship-review]` fails with `the on me view closed again leaving`. The only difference between the two lines is the `u first unread` route. The match now ignores indentation and still removes one reading line per announced line. `tests/journeys/test_render_gate.py::test_page_fixture_renders[ship-review]` (with `--run-nightly`) fails on main `e0c0f9c5f` and passes with this change. Refs #4225 — automated triage Co-authored-by: leaf-agent <[email protected]>
This was referenced Nov 5, 2026
Closed
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.
#5228 moved Leaf's interface root out of
body, so two test readers that start atbodyno longer saw the page's controls. The pressed-controls test now collects controls by walking fromdocument.documentElement, andreader_statetakes its accessibility snapshot of:root.Without the change,
test_a_pressed_panel_control_keeps_its_face_and_takes_the_next_press[alert-review]andtest_page_fixture_renders[alert-review]fail (the second withg opened no go-to). With it, both pass.I also ran six more of the nightly run 41816958231's failures from these test groups, and five pass with the change: the pressed-panel-control cases
[code-comparison]and[playground], thetest_page_fixture_renderscases[file-editor]and[page-annotations], and the[browser]case oftests/journeys/widgets/test_pressed_controls.py.test_page_fixture_renders[rust-sort]still fails, now withapparatus among authored: <span>, which Leaf adds, stands among the page's own elements inside <body>, a different check that this change doesn't touch.