Skip to content

Drop heading ids that open a question's group, so pointing at the heading aims at the question - #6345

Merged
leaf-agent merged 3 commits into
mainfrom
fix/issue-6296
Nov 18, 2026
Merged

leaf-agent merged 3 commits into
mainfrom
fix/issue-6296

Conversation

@leaf-agent

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

Copy link
Copy Markdown
Collaborator

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. Name a group, and the question asked in it, by lf-group's label #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

A question takes its name from lf-group's label, so nothing reads the ids
that headings opening an lf-group carried for aria-labelledby. Leaf aims a
comment at the nearest element with an id, so those ids made pointing at a
question's heading comment on the heading instead of the question. Removing
them aims it at the question again, as before #6256; such a heading offers
no copy-link control, also as before.

Removes the id from each heading that opens an lf-group in the references,
examples, docs and the playground package's instructions and registry example
(62 headings), and drops page-authoring.md's stale sentence about ids a
heading needs for aria-labelledby.

Closes #6296

@leaf-agent leaf-agent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One heading that opens an lf-group still has its id: the generated page source in examples/developer/feature-gallery.page/generated-sample.js writes <h2 id="delivery-ask-h">Which delivery?</h2> inside <lf-group id="delivery-ask" …>. On that sample, pointing at the heading still comments on the heading instead of the question. The description also says every such heading in examples/ was changed, and that claim becomes the squash commit's message. I'm pushing a fix that drops this id too.

The generated sample page in the feature gallery still put an id on the
heading that opens its lf-group, so pointing at that heading commented on
the heading instead of the question.
Removing the ids let nine headings that open an lf-group fit on one line, so
the pre-commit prettier hook failed the test job. Whitespace only.
@leaf-agent
leaf-agent merged commit ab74022 into main Nov 18, 2026
6 checks passed
@leaf-agent
leaf-agent deleted the fix/issue-6296 branch November 18, 2026 06:44
max-sixty added a commit that referenced this pull request Nov 18, 2026
…cenarios, and list a pass's answers at its end (#6016)

Adds `examples/catch-up.html`, "Catch up on notifications", to the
catalog's Everyday work group: a maintainer back from a week away
answers the seven notifications an agent couldn't, one card at a time.
It is the first catalog page that uses `lf-deck`. Max asked for it
("definitely add an example based on it"). Each of its seven questions
recommends an option with its reason and cost, and every option carries
chips. The deck's developer page, `examples/developer/deck.html`,
becomes its scenario page: one card of each shape a deck holds, with a
list of what to try. Both pages use today's question markup: each card
is an `lf-group` whose `label` asks it, each option has a `label` and a
`<strong>` title, and `recommended` is an attribute.

Building and using the pages changed the deck:

- **A card that comes up clears the floating panel.** After an answer,
Back, Later or "Go through the 1 left", the card is brought in nearest
once its motion ends, so one that would end under the panel scrolls up.
The runtime's nearest landing already counts what the panel covers as
unseen, so the deck relies on it rather than measuring the panel itself.
- **The end of a pass lists each card's question beside the answer
given**, and each question links to its card. A row names its question
by the runtime's rule for On Me (`queueTitle`), so both lists use the
same name for a question. The deck's height now glides to the end
frame's full height, list included.
- **A keyboard user keeps their place at the end of a pass.** Back from
the end frame, or Later pressed on the bar's forward control as the pass
ends, used to leave focus on the page, so the next arrow key did
nothing.
- The count line reserves its height, so the page no longer moves 8 px
when the first reading arrives.

The registry examples for `lf-deck`, `lf-options` and `lf-tabs` also
drop the heading ids that #6345 removed elsewhere.

To weigh: in Firefox, a user who reaches a card by pointer, such as by a
recap link, and then presses an arrow key still loses focus after one
step. The deck decides between keyboard and pointer users by
`:focus-visible`, which Firefox doesn't set on a later key press. Fixing
it means either exporting the runtime's own reading (`pressLed`) to
packages, or moving focus to the next card after a pointer answer too.
Both change more than this PR should, so it is left for a follow-up.

Checked with `page check --render` on both pages (no findings); a
first-time reader pass on each in headless Firefox, whose wording and
keyboard findings are fixed; a Codex review, whose three findings are
fixed; `pre-commit`; the browser type check; all twelve deck browser
tests; and the catalog and corpus tests by node id. Each new deck test
fails without its fix.

> _This was written by Claude Code on behalf of max-sixty_
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.

Should aiming at a question's labelling heading aim at its group?

1 participant