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.
leaf-agent
left a comment
There was a problem hiding this comment.
A registered widget's aria-label no longer names it in the chrome. ariaNaming returns null for every registered element, and accessibleNaming now goes through it in place of reading aria-label itself, so the guard meant for addressableNaming (where label owns a widget's name) also removes the aria-label fallback in ownNaming. Bundled packages use this pattern (lf-timeline, lf-motion and lf-file-tree in their registry examples, lf-tabs, and lf-widget-builder in examples/dynamic-widgets.html). With <section><h2>Rollout</h2><lf-timeline id="it" aria-label="Deploy order">…</lf-timeline></section>, addressableLabel gives "Deploy order" on main and "Rollout" on this head. So an On Me row, thread anchor or feed row about that widget falls back to its section's name. Moving the guard to addressableNaming keeps the new rule and restores the fallback (suggestions below). The comment above ariaNaming would then say that addressableNaming skips ARIA for a registered widget, not that ARIA names none.
…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
|
Closing: Max chose a Leaf element,
|
… from an attribute (#6289) An option's and a board card's title move from a leading `<strong>` to a `label` attribute, which the widget draws as its heading (`words.says`), as a tab's and a column's are. `recommended` becomes a boolean attribute that draws the badge, in place of a `<small class="tag ok">recommended</small>` chip whose words Leaf read. On Me's description of an option is its sentence: its words up to the first element HTML sets apart from a line of words, less `<small>` side comments such as chips and any SVG drawn among them, where a walk read computed style. `phrasing` joins the package API for that. A thread message's words, which name its thread and its On Me row, hold its options' labels, as the drawn message does. With titles moved, no widget takes a name from its markup, so the walk that found a widget's leading heading, summary or `<strong>` is deleted in both runtimes (`addressable-names.js`, `gesture_words.py`); plain markup keeps its caption rule. Root `AGENTS.md`'s "Read what the page states" asks for this. A codemod moved about 470 options and 110 cards across examples, docs, references, tests and evals. The 2 titles that held `<code>` became plain text. `page check` gives advice where a widget that takes `label` leads with a `<strong>`, the habit 3,076 options on real pages still follow. What to weigh: - **One visual change, left to Max.** Chips that stood above a card's title now follow it and lead the line its words start on. Where cards are laid across with different chips, their sentences no longer align, though their titles do. Keeping chips above the title needs a placement rule in both runtimes that reads where chips stand. The markup-meaning page puts this as #d5, with stills. Stills of 14 decision and board states show no other pixel change. - **Before the runtime dresses the page, or without script,** the theme paints the title from the attribute, but a recommended card shows no badge. - **A labelled option or card is now a part** in previews and thread trails, as a tab is. Before, an option's `<strong>` title named the option alone, and the part went on to its question. - **The title is written after the pick mark,** by `lf-options` where it upgrades first, because the mark's float has to come first to stand on the title's line. Labelled cards trim only their frame's end, so a figure after the title keeps its margin. Max picked `label` as #d3 on his design page for how Leaf reads markup. It targets main: #6283, which it stood on, closed when Max chose an `lf-group` element over reading ARIA names, so it reads no ARIA. The runtime suite, `check:browser` and the model tests pass on this head, and the option, board, On Me and obligation browser tests that read titles or descriptions passed before main was merged in. Codex reviewed it; its findings are fixed or listed above. > _This was written by Claude Code on behalf of max-sixty_
`lf-group` is a named group of whatever it holds. Its `label` names 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 where `m` lands. It replaces the question group written in HTML (`role="group"` named by `aria-labelledby` or `aria-label`, or a `<fieldset>` named by its legend), so Leaf names no group from ARIA: Leaf's own elements are named by `label`, 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_name` and the `question-group` finding go; `page check` still 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: - **A question's words are written twice**, in the group's `label` and in its heading, and nothing holds the two together. - **A group is not a section**, so CSS written for `section` no 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. > _This was written by Claude Code on behalf of max-sixty_
A name the author declares on plain markup now comes before Leaf's own reading of it, in both runtimes.
aria-labelledby(the words of the elements it names, by id), thenaria-label, then a fieldset's<legend>name a section, a div or a question's group before the heading a section opens with. A registered widget's name stays itslabel; anaria-labeloraria-labelledbyon one is only the chrome's fallback where it has none, as anaria-labelwas before. RootAGENTS.md's "Read what the page states" asks for this: a declaration is a fact, and the opening-heading rule (#6264) is the exception the maintainer agreed to.Each runtime now has one ARIA reader. In Python,
group_namebecomesaria_name:element_namecalls it for plain markup,page checkstill requires it of a question's group, and a widget's prompt is its group'selement_name, which equalsaria_namefor every group the check accepts. In the browser,ariaNamingnames plain markup inaddressableNaming, andaccessibleNamingreuses it, so a control'saria-labelledbynow names it before its<label>, as ARIA orders them.labelledBymoves intoaddressable-names.jsfrompreview.js.Authoring.by_idreplaces the two id maps thatobligations.pyand the check each built.What to weigh: a declared name can withdraw a heading's title but never give one. A section whose
aria-labelledbynames its opening heading is still that heading's. One whosearia-labelledbynames a later heading, or whosearia-labelnames it, is no heading's. That keeps which heading heads which part in reading order. Lettingaria-labelledbymake a later heading the section's title madepartOvercycle between the two headings, so counting a heading's conversations overflowed the stack; a test now covers that case. Two cases still differ between the runtimes. Python reads a name's words as raw text, so a referenced<br>reads "FirstSecond" where the browser reads "First Second", as heading names already do. Python also can't resolve an id inside an SVG.Max asked for the declared-name clause when he picked #d2 on the design page for how Leaf takes names from markup. It waited for #6256, so that Python keeps one ARIA reader.
tests/name_cases.jsongains seven cases that both runtimes pass. Runtime suite,check:browser, and the obligation, interaction and delivery model tests pass. Codex reviewed it; its findings are fixed or listed above.