Skip to content

fix: keep the panel tab's preview on its list's name, and follow #7403's names in five tests - #7493

Merged
leaf-agent merged 1 commit into
mainfrom
fix/issue-7387-label-in-name-tests
Nov 28, 2026
Merged

leaf-agent merged 1 commit into
mainfrom
fix/issue-7387-label-in-name-tests

Conversation

@leaf-agent

Copy link
Copy Markdown
Collaborator

#7403 named Leaf's controls by the words they show (WCAG 2.5.3, Label in Name), and five browser tests on main still 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, then g A), as it did before #7403.

The other four tests now expect the new names:

Test Now expects
test_go_to_names_leaf_s_own_controls_but_not_its_own_way_out Go-to hears the panel tabs as On Me 0 and Threads 0
test_design_mode_reads_each_shape_of_control_into_the_anchor_its_routes_carry Design mode anchors a side-list tab under its name with the summary, Primary pages (an anchor's part is the control's accessible name)
test_a_tab_strip_keeps_its_open_tab_in_its_one_row the side-list row is found by its label and summary
test_print_wraps_diff_lines_and_keeps_file_headers_in_place each gutter number is checked on either side of the space #7403 put between the two cells

All five fail on cd2495ac7 and pass on this branch. pnpm run check passes, and so do the 15 other browser tests that match tab 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

…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
@leaf-agent
leaf-agent merged commit ff6f923 into main Nov 28, 2026
8 checks passed
@leaf-agent
leaf-agent deleted the fix/issue-7387-label-in-name-tests branch November 28, 2026 07:35
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]>
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