Repository navigation
fix: keep the panel tab's preview on its list's name, and follow #7403's names in five tests - #7493
Merged
Merged
Conversation
…s names in five tests #7403 named Leaf's controls by the words they show (WCAG 2.5.3). Five browser tests still pinned the old names, and one change was visible: a panel tab's preview reads the tab's accessible name when it declares none, so its word became "On Claude 0", count included. The tab's preview now names its list alone, as before #7403. The other tests follow the new names: Go-to hears "On Me 0" and "Threads 0", Design mode lists a side-list tab with its summary ("Primary pages"), a tab strip's side-list row is found by label and summary, and the print check reads each gutter number between the space #7403 put between the two cells. Refs #7387
max-sixty
pushed a commit
that referenced
this pull request
Nov 28, 2026
… redraw and focus keys (#7517) #7417 moved `lf-options`' controls into shadow roots. Eight browser tests have failed on every push to `main` since. Three only read light-DOM nodes the port moved. The other four caught real regressions, and this PR fixes those in the code while keeping #7417's design. Each of the eight fails on `main` and passes here; the Back test passes in both Chromium and Firefox. **Regressions fixed** - **A quote landed in the half of a suggestion the user accepted away** (`test_a_label_in_a_retired_slot_leaves_the_page_with_the_slot`). The page reading reset `silenced` at every declared shadow root (`crossed` in `readings/passages.ts`). A retired slot therefore stopped silencing words that a widget inside it draws in its own root. #7417 moved the settled group's "Settled: …" label into such a root, so a comment on those words found them again and painted a mark there. Silence now carries across a declared root, and `settledAway` climbs out of shadow roots (`upFrom`) to find the slot. This rule predates #7417, which only exposed it. - **An option that a revision rewrote lost its mark and its pick** (`test_ideas_shortlist_survives_revision_and_can_reopen`). A revision replaces an option element whose words changed. The group's arguments stay the same, so `GroupLight.show` never reached the new node, which was left with no face, no mark and no `selected`. The group's state still held the pick. The group now draws again on its slot's `slotchange`. It also declares its key rows again, because their closures held the old option node. - **Back returned focus to the option rather than to its mark** (`test_back_returns_to_a_named_control_in_a_message_the_agent_rewrote`). Before the port, the mark was a light child of the option, and a focus key named it by its place inside the option. Now the mark is in the option's shadow root, and `nameIn` collapsed it into the option itself. `records/carry.ts` now looks for that place in the named element's shadow root after its light tree. On the page, such a place still counts only within the revision it was read in. So `test_a_restated_obligation_returns_a_user_to_the_question_not_to_a_control` still hands the obligation back after a revision. I first tried a `data-lf-carry` key on the mark, which broke that test, so I dropped it. **Already correct; the probes now reach the shadow roots** - `test_a_pin_keeps_clear_only_of_controls_the_user_can_see`: its last `button` was Add's submit, which is now in the group's shadow root. - `test_one_key_keeps_one_keyboard_face_across_the_page`: it reads the option's key badge through the locator. The badge's key face still matches the sequence chip's and the target picker's. - `test_a_wide_widget_stays_inside_a_box_that_frames_it`: the row's mark is read through its option's shadow root. - `test_an_obligations_digits_are_drawn_whole`: `CLIPPED_BY` and `INSIDE_ITS_OPTION` (`tests/render_cases_navigation.py`) now climb from the badge to the option that hosts its root. The digits are still unclipped, off the words and on one seat per form. <details><summary>Other checks</summary> - `pnpm run test:runtime` passes, and so does `pnpm run check`. - `tests/browser -k "option or obligation or pick"` passes, as does `-k "back or forward or carry or history"`, apart from `test_design_mode_reads_each_shape_of_control_into_the_anchor_its_routes_carry`. That one fails the same way on `main` at this run's base, which predates #7493's repair of it. - `-k "retired or settled or suggestion or revision"` shows two teardown errors (`unchanged write: aria-expanded` on the margin's More face, in `test_suggestion_actions_stay_reachable_through_a_decision_and_its_undo` and `test_a_decision_undone_leaves_every_suggestion_pin_where_it_stood`). Both also fail on `main` without this change. </details> Closes #7494 — automated triage --------- Co-authored-by: leaf-agent <[email protected]>
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.
#7403 named Leaf's controls by the words they show (WCAG 2.5.3, Label in Name), and five browser tests on
mainstill pinned the old names. One of them caught a visible change that #7403 said it didn't make. A panel tab's hover preview has no name of its own, so it falls back to the tab's accessible name, and that name now ends in the count:On Claude 0. The tab's preview now names its list alone (On Claude, theng A), as it did before #7403.The other four tests now expect the new names:
test_go_to_names_leaf_s_own_controls_but_not_its_own_way_outOn Me 0andThreads 0test_design_mode_reads_each_shape_of_control_into_the_anchor_its_routes_carryPrimary pages(an anchor'spartis the control's accessible name)test_a_tab_strip_keeps_its_open_tab_in_its_one_rowtest_print_wraps_diff_lines_and_keeps_file_headers_in_placeAll five fail on
cd2495ac7and pass on this branch.pnpm run checkpasses, and so do the 15 other browser tests that matchtab and (preview or door or key).These five are one of several groups of failures in #7387. The others come from other merged changes, and each gets its own owner there.
Refs #7387 — automated triage