Repository navigation
Conversation
…ns with A section, div or question group's aria-labelledby, then aria-label, then a fieldset's legend now name it before Leaf's own opening-heading reading, in both runtimes. Registered widgets keep `label` and take no ARIA name. Python's group_name becomes aria_name, which element_name calls for plain markup and page check still requires of a question's group; a widget's prompt is its group's element_name. The browser gains ariaNaming, used by addressableNaming and accessibleNaming, and labelledBy moves from preview.js into addressable-names.js. Authoring.by_id replaces two hand-built id maps. A declared name withdraws a heading's title but never gives one, so which heading heads which part stays in reading order: letting aria-labelledby title a section by a later heading made partOver cycle between the two headings and overflowed the stack in conversationsAbout (Codex review). Max asked for the declared-name clause when he picked #d2 on the markup-meaning page; it waited for #6256 so Python keeps one ARIA reader.
…preview.js The leaf-agent review found that skipping ARIA for every registered element dropped the aria-label that bundled widgets such as lf-timeline carry from On Me rows and feed rows; only addressableNaming skips it now.
…-names # Conflicts: # src/leaf/obligations.py # src/leaf/validation/instances.py
# Conflicts: # packages/default/registry.json # skills/leaf/references/authoring-on-me.md
… its end; tests and rubric follow
…tests read the drawn title The leaf-agent review found that taking an option's whole words put its chips and an SVG's text into On Me's two-line description. HTML's phrasing content (now exported as phrasing) ends the sentence, and <small> side comments and foreign drawings stay out. CI's four failures read <strong> titles or the old snapshot.
…uestion asked in it
…'s rules still win
… group's drawn title
leaf-agent
left a comment
There was a problem hiding this comment.
The playground package's author instructions still teach the old question group, so an agent that follows them writes a page that page check now refuses. The full example in packages/playground/instructions/author.md wraps the playground in <section id="notification-ask" role="group" aria-labelledby="notification-ask-h"> with an <h2>. I pasted that example into a page with the playground package selected and ran leaf page check at this head, and it returned ungrouped-question for <lf-playground id=notification-playground>. These are the instructions leaf page instructions hands an agent for a playground page. The PR already converted the same example in packages/playground/registry.json, but this file is outside the diff.
The same file and one other package still describe the group the old way:
packages/playground/instructions/author.mdline 63 saysdata-width="available"widens the playground "inside the<section>of its question's group". The group is now anlf-group.packages/monitoring/instructions/author.mdasks for "a named group whose heading asks whether to roll back".lf-group's instructions now say "write no heading of your own as the group's first child", and the label is what asks the question.
The fix is mechanical: convert the example to <lf-group id="notification-ask" label="Which deployment notification should we build?"> and drop its <h2>, and reword the two sentences to name the group's label. I can push that commit to this branch if you'd like.
…nside it Max, on #d7 of his markup-meaning page: "I wouldn't have this in `lf-group` at all; the title is some HTML within the `lf-group`, it's not some core part of it." A group's `label` stays the name Leaf reads, for On Me, links and threads, and the group draws none of it, so the name is data apart from whatever title the page shows. - The registry drops `says` from lf-group, so the runtime writes no title; base.css keeps only the group's block display, and reading.css, passages.js and the frame trim lose the exceptions they made for a drawn title. - A message drawn without its widgets keeps a group that asks nothing by what it holds, its heading included. - Every question's heading goes back inside its group, as the author wrote it before the conversion: a three-way merge of the branch with the codemod rerun keeping headings, then by group id from main for the hand-converted groups. Eyebrows return to their hgroups, and the motion playground's added page title goes. - Tests that pointed at the drawn title point at the heading again, as on main. Stills of six question states against main change only the feature gallery's "lf-group" eyebrow words. #d7 (one title size) no longer arises.
…pt group's heading to one The workspace example in page-layout.md had lost the question its header asked when the group stopped naming that heading by ARIA; the header asks it again, and the group's label repeats it. The held-message test now refuses a second heading, which a drawn title would add, and the options test looks for a drawn title on the group rather than its options.
# Conflicts: # tests/model/test_interact_anchors.py
…e walk's own list (#6327) With nothing focused, every page walk (`m`, `t`, `h`, a tally's Next On Me) started from the first text block on screen and passed any stop standing ahead of it that holds no text block, such as a question of options alone, a figure or a widget drawing its own words. So `m` at the top of a page opening with such a question went to the second one, `t` opened the next paragraph's thread, and with a question's options at the window's top and its heading scrolled away, `m` skipped it. #6315 hit the same skip with its drawn group title and patched it by making the title one more kind of reading block. Here the walk decides with its own stops instead: a viewport origin is a `view`, and `stepFrom` arrives at the first stop ahead of the read block that the reader sees where they read it (`seenWhereRead`: same reading region, on screen, and the stuck-box and reader-column tests `readingBlock` chose the block by, with the same fallbacks). A press naming one obligation (a Page Map row, `obligationActions.open`, which a deck's arrival uses) used to announce its position in a list its caller passed. `obligationActions.open` counted every obligation, answered ones and updates included, so the second of two open questions read "Options 3 of 4 waiting on me" while `m` said "2 of 2". It now arrives through the queue walk and says the walk's position, or, for one On Me doesn't hold, its word and how it ended. The obligation view's `goToObligation` is gone. To weigh: precedence in `stepFrom` (`current-target.js`), where the thread walk's at-target now passes in as `at` so a stop in view ahead of the read block comes first. The `m` keydown on a 400-question page takes 18–28 ms on both base and head. That cost already grows with the page, which is a separate follow-up. Max asked for this after #6315. Codex reviewed each commit; its six findings (pane regions compared by object, the stuck and column fallbacks, a boxless block, a nested answered question announcing its parent's place, a stale walk position) are fixed with tests where a browser case reaches them. Tests: new browser cases for `m` (page top, scrolled, beside another column), `t`, a workspace pane, and the announced position, each failing on base or without its part of the fix; `pnpm run check:browser`, the runtime suite, and 106 walk and obligation browser tests pass. > _This was written by Claude Code on behalf of max-sixty_
…ding aims at the question (#6345) A question takes its name from `lf-group`'s `label` since #6315, so nothing reads the ids on headings that open an `lf-group`. Those ids were added in #6256 for `aria-labelledby`. Leaf aims a comment at the nearest element with an id, so with them in place, pointing at a question's heading commented on the heading instead of the question. This PR removes them, so pointing at the heading aims at the question again, as @max-sixty decided in #6296. Without an id, such a heading offers no copy-link control, as it did before #6256. No runtime code changes. - Removes the id from all 63 headings that open an `lf-group` in `skills/leaf/references/authoring-on-me.md`, `examples/` (including the page source the feature gallery's generated sample writes), `docs/`, and the playground package's `instructions/author.md` and `registry.json` example. I checked that no other tracked file refers to these ids. The one match, `ship-ask-h`, is in a test's own fixture. - Drops the sentence "An id a heading needs for `aria-labelledby` is not the section's address" from `page-authoring.md`. #6315 left it stale. Test fixtures and `leaf-dev bench` pages still put ids on such headings. They are outside the decision's scope, and leaving them changes nothing a user sees. Checks I ran: the registry-example, docs and published-page tests in `tests/model/test_product_page.py` and `tests/model/test_interact_product.py` pass. `leaf page check` reports no markup findings on preview builds of `alert-review` and `notification-playground`. Chrome couldn't launch in the sandbox, so the browser half of that check didn't run. Closes #6296 --------- Co-authored-by: leaf-agent <[email protected]>
…ons that still showed a section (#6365) #6256 retired `lf-ask` and #6315 made a question's group an `lf-group` named by its `label`, so `page check` refuses a bare `lf-options` outside a group as `ungrouped-question`. Some shipped text still showed the old shape, and an agent copying it got refused. This PR corrects that text. `lf-board`'s "One answer in its question and on a board" instructions (`packages/default/registry.json`) now wrap the snippet's `lf-options` in an `lf-group` whose label asks the question, and the prose says "its question's `lf-options`" rather than its section's. The matching heading in `authoring-on-me.md` follows. `packages/detail/instructions/author.md`, `authoring-on-me.md` (the finding-then-question paragraph and the permission example's "not to the section round it") and `package-data.md`'s "Views of an answer" now name the question's `lf-group` where they named a section. Eval comments that named `lf-ask` now name the question's `lf-group` or a page widget (`words-question-takes-a-thread`, `option-cards-take-their-width`, `options-draw-their-arrangement`, `options-stay-words-for-wording`, `workflows/usability_eval.yaml`). Fixture data that records past state is left as it was. `view-reveal-arrival`'s prompt no longer claims `layoutChanged` returns a promise, since `browser/runtime/widget-upgrade.js` returns nothing from it. Verification: I wrote the board snippet into a scratch page and ran `bin/leaf page check` on it. Before the change it failed with `ungrouped-question` on `<lf-options id=rail-choice>`. After the change it passes. Across every package registry's `instructions` there are only two HTML snippets, `lf-text-document`'s and `lf-board`'s, and both pass `page check` now. I added no regression test: two snippets don't make it cheap enough to pay for, a registry-only test would leave the package `instructions/*.md` snippets uncovered, and an agent that copies a bad snippet already gets the refusal from its own `page check`. A grep of `skills/`, `packages/*/instructions`, `packages/*/registry.json` and `docs/` finds no other `lf-ask` or section-as-group wording. Focused tests on registry instructions pass, as do `dev/tests/test_evals.py` cases apart from one that needs `pnpm install` in this environment. Co-authored-by: leaf-agent <[email protected]>
…two journey tests (#6387) Two nightly journey tests broke in the [Nov 18 scheduled run](https://github.com/max-sixty/leaf/actions/runs/44289276069) because they search for markup that #6289 and #6315 changed. Neither change moved what these tests protect, so only the tests change. - `test_flag_attribute_accepts_both_html_spellings` (`assert 0 == 1`): #6289 gave the fixture's `backfill-first` option a `label` after its id. The test's `replace('id="backfill-first">', …)` stopped matching, so both checks read the unchanged page and `selected="yes"` was never put in front of `page check`. The flag now goes straight after the id, and the test again sees `selected=""` accepted and `selected="yes"` refused. - `test_every_table_the_theme_sets_honestly_passes_the_gate` (`ValueError: substring not found`): the test cuts the `opts-decision` and `figure-asked` questions out of their pages as `<section>` elements, and #6315 made both `<lf-group>`. It now cuts the `lf-group`. Both tests fail on main `90ec76548` and pass on this branch. `git bisect run` from the previous scheduled run's commit `2aabb5436` puts the first failure at #6289 for the flag test. The render-gate test passes at #6315's parent and fails at #6315. The run's other new failures have separate owners, linked from the report. Refs #4225 — automated triage Co-authored-by: leaf-agent <[email protected]>
…p option cards' first box on upgrade (#6396) This fixes the two nightly journey failures that #6315 caused. The feature gallery's "On this page" contents linked two rows to generated heading ids, and the new `lf-group` worked example's option cards grew 2px on upgrade. Before this change both tests fail on main, and after it both pass locally: - `tests/journeys/test_render_navigation.py::test_the_feature_gallery_exercises_its_core_journeys` - `tests/journeys/test_widget_quality.py::test_bundled_widgets_meet_the_widget_quality_checks[default]` **Contents.** #6315 changed two gallery parts from `<section role="group">` to `lf-group`: "Evidence widgets" (`#bg-default-presentation`) and "Interactive sample on this page" (`#bg-inline-sample-section`). Neither part asks a question of its own. #6315 also settled that a heading names only a `section` or `article` it opens (`titledElement` in `browser/runtime/addressable-names.js`), so a heading never names a Leaf element. That leaves the `h2` inside each group as its own destination, and the contents lent it an `lf-bg-contents-section-N` id. This change makes both parts plain `<section>`s again, so the contents links them by their authored ids. `leaf page check` on the gallery stays clean. **Option card.** A labeled option in a live group gets a pick mark from the runtime. The mark floats over a 22px state band (`--lf-card-state-height`). At working density a one-line card's line is 20.3px, so the card grew from 40.3px to 42px once the mark arrived. I checked this outside the gallery: the group isn't a flex box before or after upgrade, so the growth comes from the card itself, not from `lf-group`. #6315 added the first worked example with that card shape. In `packages/default/styles/options.css`, the card's content box now holds the band's height before the mark arrives. After upgrade the float already holds that height, so the presented card doesn't change. `leaf-dev stills` for `ship-option-references`, `alert-options-in-pane`, `settled-option`, `plan-option-card-picked`, `ideas-ask` and `hub-choice` reports 6 of 6 states unchanged against main. The 47 option-layout tests in `tests/browser/test_render_options.py` (`-k "height or row or card or box"`) pass. Left open, not changed here: on any page, a question `lf-group` whose heading is a contents row gets a lent heading id rather than the group's authored id. That follows from #6315's naming rule. Whether the contents should prefer an enclosing `lf-group`'s id is a design call for that rule, not something this fix decides. Closes #6388 — automated triage Co-authored-by: leaf-agent <[email protected]>
lf-groupis a named group of whatever it holds. Itslabelnames it wherever Leaf names it, such as On Me, a link to it or a thread on it, and the group draws none of it: any heading the group shows is the author's own HTML inside it, so the name is data apart from the title on the page. A widget that asks inside a group takes the innermost one as its question: the label is the question's words on On Me, and the group is wheremlands. It replaces the question group written in HTML (role="group"named byaria-labelledbyoraria-label, or a<fieldset>named by its legend), so Leaf names no group from ARIA: Leaf's own elements are named bylabel, and plain markup by HTML's structure. Max chose this over #6283, which read ARIA names more widely, as #d6 on his design page for how Leaf reads markup, and asked that the group draw no title.The kernel declares the role (
reading-role: group), so the obligation reader in both runtimes and the workspace's full-height rule read the role, not the tag. Where a thread message draws without its widgets, a group that asks nothing keeps what it holds.group_nameand thequestion-groupfinding go;page checkstill refuses a widget that asks with no group round it. 465 groups moved across examples, docs, evals and tests, each keeping the heading its author wrote.What to weigh:
labeland in its heading, and nothing holds the two together.sectionno longer reaches a question. Stills of six question states against main change only the feature gallery's "lf-group" eyebrow words.It builds on #6289, which has merged. The runtime suite,
check:browser, the model and process tiers, page checks of the 21 changed examples and site pages, and the browser tests edited by hand pass locally.