Skip to content

test: restore seven browser tests #6256's named-group migration left red - #6295

Merged
leaf-agent merged 2 commits into
mainfrom
fix/issue-6292
Nov 17, 2026
Merged

leaf-agent merged 2 commits into
mainfrom
fix/issue-6292

Conversation

@leaf-agent

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

Copy link
Copy Markdown
Collaborator

Seven browser tests on main broke because #6256's markup migration left test pages behind. This fixes those pages, not the runtime. Each test failed on main at 2aabb54 and passes on this branch. So do the rest of test_commenting.py, which shares one of the edited pages, and the model tests that read the fixture corpus.

#6256 made every question a named group and gave its heading an id for aria-labelledby. Four pages didn't follow that:

  • Live-keys pages (test_current_location.py, three tests). LIVE_KEYS_APPARATUS and both rewritten pages replaced <h2>Which one?</h2>, which no longer matched once the heading had an id. The replacement silently did nothing, so #lk-note and #lk-tick never reached the page and each test waited out its 120 s timeout. The pages now replace the heading through one constant, LIVE_KEYS_ASKS.
  • Tabs revision (test_tabs.py). The revision added an <lf-options> outside any group, which page stamp now refuses. It now writes the question in a named group.
  • Runbook fixture (sidebar-contents.html, the contents-marks test). The migration made the whole "Switch the services" section the group, including the paragraph and the Ledger subsection where its threads are anchored. A comment inside a question's group hands the question to the agent, so the question left the user's On Me list and the row showed thread. The group now wraps only the options, named by aria-label so the contents gain no row.
  • Where-I-stand page and the first-line aim case (test_key_scopes.py aim subtest, test_render_aim.py[first line]). Leaf takes the nearest element with an id as a comment's target. With an id on the heading, Alt-clicking it commented on the heading rather than the question. Escape then returned focus to the heading, and the comment stood in the heading's own margin row. Both pages now name the group with aria-label, so the heading has no id and the tests check aiming at the question again.

The last item is a choice about what the evidence leaves open. Pages written the way the reference teaches still comment on the heading. #6296 asks the maintainer whether a heading its group names should aim at the group, which would be one rule in aimTargetAt. This PR moves no runtime behavior.

#6289 edits lines near these in the same files, so whichever lands second will need a small rebase.

Closes #6292 — automated triage

#6256 gave each question heading an id for aria-labelledby and widened
each question to its whole group. Five test pages did not follow:

- The live-keys pages replaced `<h2>Which one?</h2>`, which no longer
  matched, so the apparatus and the rewritten heading never reached the
  page. They now replace the heading through one constant.
- The tabs test's revision added an ungrouped question, which page
  stamp refuses. It now writes the question in a named group.
- The runbook fixture's group spanned its whole section, threads and
  subsections included, so a comment in it handed the question to the
  agent and its contents row lost its On Me mark. The group now holds
  only the question.
- The where-I-stand page and the first-line aim case named their group
  by an id'd heading, which made the heading a comment target of its
  own. They name it by aria-label, so aiming at the heading aims at the
  question as the tests protect.

Behavior unchanged; whether a heading a group names should aim at the
group is left to the maintainer.

Closes #6292
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.

Seven browser tests fail after #6256 retired lf-ask and requires a named group for each question

1 participant