Repository navigation
Stop a bold line in prose naming its paragraph or list item, or grouping On Me under it - #6248
Merged
Merged
Conversation
…ing On Me under it Both runtimes took a leading `<strong>` as the title of any element, so a bold line opening a paragraph, list item, cell or section named it in the chrome's labels, a link's preview and an obligation's prompt. When no words followed the bold on its line, the element also became a part that On Me's bands grouped by; `runsIntoLine` walked the markup after the bold to tell the two cases apart, and `page-authoring.md` taught every author the difference. Max ruled that Leaf should not infer meaning from an author's markup, and that a formatting element never carries data (survey item #11). So a `<strong>` now titles only an element the registry registers, such as an option or a card (`addressableName`, `gesture_words.element_name`), and never makes a part. A question standing in `<li><strong>Canary</strong><lf-ask>…</lf-ask></li>` under `<h2>Rollout</h2>` now groups in On Me under "Rollout" where it grouped under "Canary" (`leaf-dev probe --base`), and the list item's label is its words. Two other readings of plain markup go with it: - The thread card's accessible name no longer reads its target's `:scope > strong`. It names the quoted passage, else the margin entry's title, which `addressableLabel` supplies. - `addressableLabel` no longer falls back to a descendant's `aria-label`. A figure holding a labelled `<svg>`, with no caption and no named element around it, now has an empty label beside its word. Removed with them: `runsIntoLine` and `partOver`'s run-in check, the run-in teaching in `page-authoring.md` ("Markup"), and the sentence on it in the kernel registry's `why-phrasing`. Whether option titles stay `<strong>` is a separate decision this leaves as it was. Tests, by behavior changed: - `tests/name_cases.json`: a bold line in a paragraph or over a list item's blocks names nothing; the option case declares `lf-option`, which its title now needs; the header eyebrow case uses an `<h2>`. - `place-preview.test.mjs`: the run-in cases become one rule, the heading over a bold line is its part, plus a widget whose `<strong>` names it and makes no part. - `passage-boundaries.test.mjs` keeps only its quote-across-an-edge half; `test_a_bold_lead_in_runs_on_by_its_markup_whatever_draws_it` is deleted. - The thread card's name in two journeys (`ship-review`, the thread panel gallery) is now the quoted passage or the element's label. `pnpm run test:runtime` (999 pass), `pnpm run check:browser`, the model tests that read `name_cases.json`, `gesture_words` and question validation, and both edited journeys pass, apart from `test_the_shipped_long_thread_keeps_the_margin_and_its_height`, which fails on the card's width (320 >= 379) at main too, after its name assertion. Co-Authored-By: Claude <[email protected]>
…-names # Conflicts: # browser/runtime/kernel-registry.json # browser/runtime/passages.js # skills/leaf/references/page-authoring.md # tests/browser/controls/test_previews.py # tests/runtime/place-preview.test.mjs
leaf-agent
approved these changes
Nov 17, 2026
This was referenced Nov 17, 2026
max-sixty
added a commit
that referenced
this pull request
Nov 17, 2026
… or what it says (#6255) Adds "Read what the page states" to root `AGENTS.md`'s cross-runtime invariants. Leaf takes each fact about a page from the structure HTML defines or from a declaration in an attribute, a registry entry or the log. A declaration on a plain element uses a standard attribute that means the same to every reader; one on Leaf's own element uses Leaf's attribute, such as `label`. It takes no fact from how content looks or what it says: restyling a page changes no fact Leaf holds, and rewording changes only its words. Any other reading of markup is an exception the maintainer agrees to. "What it puts between the author and HTML" now points at it rather than restating the clause. Max asked for it, in a shorter form than a Fable review proposed, on his design page for how Leaf takes names and On Me questions from markup. Existing code that reads markup, such as the leading-title and first-heading rules, is brought in line as it is touched; #6248 removed the bold-line rule. Scored with a scratch A/B: asked where a board card's name should come from, agents reading main's guidance read the card's `<strong>` (2 of 2); with this text they declared it with `label` (2 of 2). An earlier wording without `label` named sent them to `aria-label` on the card instead, which no standard defines there. Docs only; no tests. > _This was written by Claude Code on behalf of max-sixty_ --------- Co-authored-by: Claude <[email protected]>
This was referenced Nov 17, 2026
leaf-agent
added a commit
that referenced
this pull request
Nov 17, 2026
`test_dense_selection_hints_stay_short_and_reach_an_atomic_visual` has failed on every push run since #6248, most recently [run 44026724181](https://github.com/max-sixty/leaf/actions/runs/44026724181). After two Tabs, the live region reads `Hint s: figure. Press Enter to choose.` where the test expects `figure: Visual 0`. #6248 deliberately stopped `addressableLabel` from borrowing a descendant's `aria-label`, and this fixture named each `<figure>` only through its child `<svg role="img" aria-label="Visual N">`. So the figure now has no name, which is what #6248 intended. The fixture now declares each name where the page should state it: `aria-label` on the figure, which the element's own accessible name still reads (`accessibleNaming` in `browser/runtime/addressable-names.js`). The drawing svg is `aria-hidden`. The assertions are unchanged, so the test still checks that a two-key tail hint reaches the figure and announces its name. No product behavior moves. Verification: - `git bisect run` over the test, between `a747871a2` (passes) and `c2ec34fd4^` (fails), names `edd00343b` (#6248). Its parent passes. - With this change, the test and its sibling on the same fixture, `test_the_picker_s_close_ends_it_whatever_escape_would_take_back`, pass locally. The test fails on `origin/main` without it. Refs #3985 — automated triage Co-authored-by: leaf-agent <[email protected]>
max-sixty
added a commit
that referenced
this pull request
Nov 17, 2026
…6256) A question on a page is now a group its author names, and `lf-ask` goes. The author writes the section holding the question and its case as `<section id role="group" aria-labelledby>`, naming the id of the heading that asks it. A `<fieldset>` is a group too, named by its legend. Leaf reads the group into the obligation: `prompt.target` is the group, and `prompt.text` is its name: the words `aria-labelledby` points at, else `aria-label`, else the legend. `lf-ask`, `x-encloses`, `state.encloses`, `ask.css` and the `untitled-question` advice go. What the user gets is what `lf-ask` gave: the obligation is the whole group. `m` selects the group and lands at its opening however tall it is, the ring and the On Me marker stand on it, and digits answer from anywhere inside it. A group holding several questions leaves each at its own widget. Arrival no longer looks for a heading over the widget or a block before it. Max picked plain HTML over `lf-ask` on a survey of places Leaf puts its own layer between authors and HTML. He then picked the named group over a section Leaf finds by its heading (`question-region-group` on the obligation-names design), so a question's region and name are data the author writes rather than Leaf's reading of headings. That design's other changes, such as removing the leading-title rule, follow in their own pull requests (#6248). What changes for authors: - `page check` refuses an asking widget no named group holds (`unframed-question`) and a group without an id (`question-group-id`). Widgets in thread messages, records widgets, suggestions and widgets in samples are exempt. Every authored question was converted: 58 groups on 25 example pages, 10 on fixture pages, 29 in eval files, and 357 in test sources. - A widget can't be the group itself, since widgets take no `role`, so a question in an `lf-tab` needs a section inside it. - A suggestion's arrival lands at the block holding it, with the section's heading just above the window. - A thread message's question takes the name of a named group if it writes one, else the widget's own name; a heading in the message no longer names it. The reference teaches the group as the section holding the question and its case. In scoring, authors otherwise kept a section's subject heading and nested a small group round a new question heading and the options below the evidence, which left the captures outside what `m` selects. A playground alone in a group that is a workspace's body now keeps the panel's room below it: the playground keeps the minimum its rows set, and the workspace body carries the scroll padding that used to sit on the playground. The full-height rule `ask.css` held moves to `section[role~="group"]`, so an ordinary section keeps its flow. Where the panel seats a thread reply's question, the copy left in the thread drops the question's whole group, as it dropped `lf-ask`. Scored on 31 asking eval cases (page asks and playground authoring) against this branch, with Opus 5.5 as author and judge: 28 of 31 passed. `record-asks-hold-their-table` fails on main too (1 of 1), and `audit-calls-are-proposals` passed its rerun. `proposals-show-what-they-change` failed 2 of 2 because authors nested a small group below the evidence, where main passed 1 of 1. After the reference change above, the four cases that place evidence round a question passed 5 of 8: - `proposals-show-what-they-change`, 1 of 2. The failure was a section pointing at a capture in the section before it. - `record-asks-hold-their-table`, 0 of 2. Its table now sits inside the group; it fails, as on main, on where the buffering paragraph goes. - `audit-calls-are-proposals` and `record-asks-hold-their-premise`, 2 of 2 each. Thread asks, which the check exempts, and the turn-end check's replays weren't run. Tests: the focused model and process tests (55 files, 2023 passed), about 140 browser tests on questions, workspaces and playgrounds, a stubbed run of `tests/browser` that stamps every page through the new check, `pnpm run test:runtime`, `pnpm run check`, and the new check over every example, fixture and registry example. > _This was written by Claude Code on behalf of max-sixty_
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.
A
<strong>now titles only an element the registry registers, such as an option or a card, and never makes a part. Before this, a bold line opening a paragraph, list item or cell named that element in the chrome's labels, link previews and On Me's groups, andrunsIntoLinewalked the markup after it to tell a title alone on its line from a run-in label. Both runtimes follow the new rule (addressableName,gesture_words.element_name, held together bytests/name_cases.json). The run-in machinery and its paragraph inpage-authoring.md("Markup") are deleted. The thread card's accessible name no longer reads its target's<strong>, andaddressableLabelno longer borrows a descendant'saria-label.Worth weighing: examples that open list items with
<strong>Title</strong>…, such asship-review, now label those items by their words. A question inside<li><strong>Canary</strong>…</li>under<h2>Rollout</h2>groups in On Me under "Rollout" where it grouped under "Canary" (leaf-dev probe --base). Whether option titles stay<strong>is a separate open decision; this change leaves them as they were.leading_title_nodenow takes the registry, so the question-frame branch for survey item #9 (question-section-frame) needs that argument if it still calls it after this lands.Max ruled that Leaf should not infer meaning from authored markup and that a formatting element never carries data; this is survey item #11 on his design page. A separate Codex review of the commit found no regressions.
Tests:
pnpm run test:runtime(1000 pass),pnpm run check:browser, and the model tests for naming and question validation (102 pass).test_the_shipped_long_thread_keeps_the_margin_and_its_heightfails on card width at main too.