Skip to content

fix: name panel tabs, list rows, diff gutters, the trace's scale and margin entries by the words they show - #7403

Merged
max-sixty merged 2 commits into
mainfrom
fix/issue-7393
Nov 27, 2026
Merged

max-sixty merged 2 commits into
mainfrom
fix/issue-7393

Conversation

@leaf-agent

@leaf-agent leaf-agent commented Nov 27, 2026 •

Copy link
Copy Markdown
Collaborator

axe-core 4.14 (brought in by #7289 through axe-playwright-python 0.1.9) runs label-content-name-mismatch (WCAG 2.5.3, Label in Name) by default. Leaf's controls whose accessible name leaves out words they show now fail the nightly render gate and the chrome sweep. This PR names each Leaf-owned control by the words it shows, so a voice-control user who says what they see reaches it. The render gate now passes on 13 of the 15 pages the scheduled run failed. The two left are the file-tree pages, whose rows a dependency draws (below).

What a screen reader hears differently (nothing changes on screen):

Control Before After
Floating panel tab "Threads", described "2" "Threads 2"
lf-tabs row (side list / parts) its label; summary, answer and Δ only in the description or hidden label, summary, answer line and change count, as shown; the description keeps the group and only the state the name leaves out ("Answered", "1 of 3 answered"); a template-faced row keeps its label as name and its full description
Diff line number, unchanged line "Comment on a.rs · old line 258 · new line 256" "Comment on a.rs · old and new line 258 256"
Trace image-scale button "Image scale" "Image scale, Fit" (or the percentage)
Margin entry holding several threads "Threads (2), …" "Threads 2, …" (axe drops parenthesised text)
rust-sort / wt-merge speed button "Playback speed" "Playback speed, 2×"
github-discoveries avatar a second link named after the repo hidden from assistive tech and the tab order; the repo link beside it stays

An lf-tabs tab showing an authored <template> face keeps label as its name, as #6222 settled. The diff gutter gains a whitespace text node between its two number cells. axe joins adjacent cells' text with no space ("258256"), and the gutter's grid draws nothing for the space. The rejected panel-tab naming and the new lf-tabs rule are recorded in each module's header.

Verification. On main, a probe running only this rule reproduced every finding the CI log lists. With the change, tests/journeys/test_render_gate.py::test_page_fixture_renders passes locally for alert-review, github-discoveries, pr-walkthrough, review-parts, review-a-fix, rust-sort, wt-merge, diff-thread-gallery, playwright-trace-gallery, worktree-diffs, thread-panel-gallery, playwright-paired-results and sidebar-contents. The tab, floating-panel, margin-status, code-review, anchors and trace browser tests that pinned the old names pass with updated assertions. pnpm run check and pre-commit pass.

What this leaves on #7393:

  • file-tree and file-tree-input: @pierre/trees 1.0.0 (the latest release) names a row by its path (getFileTreeRowAriaLabel) and draws the git-status letter (M, A, D, R) beside it, outside that name. The fix belongs upstream, or in a decision on how Leaf configures the tree.
  • test_the_chrome_a_key_opens_has_no_serious_violations: once the panel tabs pass, the sweep reaches the command reference. Each option there is named by its title alone (aria-labelledby), while the row also shows its key chips and description. Whether the key reference's names should include its keys and descriptions is a separate call about what every screen-reader user hears in that list.

Refs #7393 — automated triage

…margin entries by the words they show

axe-core 4.14, which #7289 brought in through axe-playwright-python 0.1.9, runs
label-content-name-mismatch (WCAG 2.5.3, Label in Name) by default. It failed the
render gate on 15 pages and the chrome sweep in the nightly journeys. Each control
it reported had a name that left out words it shows, so a user who speaks those
words can't reach the control.

- Floating panel tabs are named by their face, list and count ("Threads 2"). They no
  longer carry the count as a description.
- An lf-tabs row is named by the words it shows: label, side-list summary, answer
  line and change count. Its description keeps only what it doesn't show. A tab
  showing an authored template face keeps `label` as its name (#6222).
- A diff line number on an unchanged line is named "old and new line 258 256", and a
  space between its two cells lets axe read them as two words.
- The trace's image-scale button is named with the scale it shows ("Image scale, Fit").
- A margin entry holding several threads reads "Threads 2", not "Threads (2)": axe
  drops parenthesised text, so the count fell out of the name.
- The examples' playback-speed buttons say their speed in their name, and
  github-discoveries' avatar link, which repeats the repository link beside it, is
  hidden from assistive technology and the tab order.

Tests that pinned the old names or descriptions now assert the new ones.

Refs #7393
@max-sixty

Copy link
Copy Markdown
Owner

@leaf-agent Please revise the accessible descriptions before this merges. For a non-template tab row, the visible answer or turn is now part of its accessible name, but aria-description repeats it: the focused test expects both “Answered Alpha” as the name and “Answered: Alpha” as the description. The open single item similarly repeats “On Agent.” Keep only additional state in the description when the answer line already contributes to the name; preserve descriptions on template-faced rows whose explicit label excludes the answer. Update the focused assertions.

This was written by Codex on behalf of max-sixty

A side-list row's answer line is part of its accessible name, so its
description no longer repeats the line's words. An answered single item
whose line reads its answer ("Alpha") is described "Answered", not
"Answered: Alpha"; an open item whose line reads its turn ("On Claude")
gets no description; several open items whose line reads the turn are
described by the count alone ("1 of 3 answered"). A tab that shows a
template face keeps its label as its name and its full description.

The parts test now asserts the answered row's description "Answered" and
the sent row's name "Sent On Claude" with no description, and the face
test asserts the faced row keeps its summary as its description.
@leaf-agent

Copy link
Copy Markdown
Collaborator Author

Revised in 3c3b58f. A row whose answer line contributes to its name now describes only the state that line leaves out:

Row Name Description before Description now
Answered single item "Answered Alpha" "Answered: Alpha" "Answered"
Open single item, agent's turn "Sent On Claude" "On Claude" none
Several items open, agent's turn label + "On Claude" "On Claude, 1 of 3 answered" "1 of 3 answered"
User's turn (answer line empty) label "To answer" "To answer" (unchanged)

A template-faced row is still named by its label, so its description keeps everything, the answer included. The focused tests in test_tabs.py now assert "Answered" and the sent row's name with an empty description. I also added an assertion that the faced row in test_a_queue_entry_shows_the_face_its_item_opens_with keeps its summary as its description. The four affected tests pass locally.

@max-sixty
max-sixty merged commit 027e558 into main Nov 27, 2026
7 checks passed
@max-sixty
max-sixty deleted the fix/issue-7393 branch November 27, 2026 17:32
leaf-agent added a commit that referenced this pull request Nov 27, 2026
#7403 names an lf-tabs row by its label, summary and answer line, and
describes it by the state those leave out. The side-list journey still
expected the label alone and the old 'Answered: Fix' description, so it
failed before reaching the undo this PR changes.
leaf-agent added a commit that referenced this pull request Nov 27, 2026
…res (#7419)

Four of the five journeys in #7401 still expected behavior that #7325
deliberately replaced. One of them, the side list's journey, also still
expected the tab names from before #7403. #7325 made a widget that asks
say whether its question is answered, so a press answers or reopens the
question at once. It also stopped an answer written only into markup
from answering. This PR changes only the four tests and keeps all of
#7325's and #7403's intent, so no product behavior moves.

- **`test_a_link_into_the_page_previews_where_it_points`** (both
engines): the decision's answer came only from `selected` in
`LINKS_PAGE`'s markup. The test now logs the user's pick through
`append_command`, as #7350 did for `OBLIGATIONS_PAGE`.
- **`test_a_side_list_is_a_queue_beside_the_item_it_opens`**: an undo
now reopens the question in its own press. So while the undo's POST is
held, the row shows On Me's symbol and no answer. The test used to
expect the answer to stay until the log admitted the undo.
- The same side-list journey also asserted each row's accessible name as
its label alone, with descriptions such as `sev a · suggested fix.
Answered: Fix`. #7403 names an `lf-tabs` row by the words it shows
(label, summary, answer line) and describes it by the state those leave
out, but it updated only the browser tests. The journey now expects
names such as `Ticket a sev a · suggested fix Fix` and descriptions `To
answer` / `Answered`, and finds rows by those names.
-
**`test_a_settled_delivery_activates_one_fresh_document_with_continuity`**:
the held pick answers the page's only question at once, so nothing waits
on the user and the tab title has no `(1)` count. The test now expects
`Live first`, which still proves the first document's head stands while
the delivery is held, since the second revision's title is `Live
second`.
- **`test_a_finger_reaches_the_page_commands_its_keys_reach`**:
`UNDO_PAGE` answers its question only through markup, so the undo
reopens it. While a question waits on the user, a tap on the leaf opens
On Me (`leafOpens`), not the menu. The test now picks again before it
reaches the leaf's menu.

**Verification.** All five node ids failed on `15536dfc8` with the
errors the issue lists. At `e76edf860`, after #7403's naming change, all
four of this PR's tests pass locally, and pre-commit passes on the
changed files.

**What this leaves.** The fifth journey,
`test_presses_and_fills_leave_no_element_naming_stale_keys[data-explorer]`,
shows a panel layout defect, not a stale test. Pressing *Build query* on
the On Me card replaces the press-height commit button with a three-line
`Answered: …` text, which grows `.lf-fp-answers` from 37 to 93 px. The
card keeps its height, so the third line is clipped. Before #7325 the
same growth happened at `849f305d2`, but it arrived with the server's
reading, so the swap watch didn't count it as part of the press. How the
panel should fit a long answer is a design choice, and it stays on
#7401.

Refs #7401 — automated triage

---------

Co-authored-by: leaf-agent <[email protected]>
leaf-agent added a commit that referenced this pull request Nov 28, 2026
…s names in five tests (#7493)

#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

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.

2 participants