Skip to content

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

Closed

Description

@leaf-agent

@max-sixty, a question for you from the repair of #6292: should aiming at the heading that names a question's group aim at the group?

#6256 has authors name a question's group with aria-labelledby, so every question heading now carries an id. Leaf takes the nearest element with an id as a comment's target, so Alt-clicking a question's heading now comments on the heading rather than the question. Two tests protected the old result and went red:

  • test_comment_escape_returns_to_its_authored_parent (aim case): after the comment closes, Escape returns focus to the heading, not the question.
  • test_comments_pointed_within_one_line_share_its_row[first line]: the comment stands in the heading's own margin row rather than joining the row that holds the question's On Me marker.

A comment on the heading still hands the question to the agent, as any comment inside its group does. Only the target's identity, its margin row and where Escape returns change.

#6295 makes those two tests' pages name their group with aria-label, so the heading carries no id and they test the old route again. That leaves the authored shape the reference teaches on the new behavior. Your options:

This needs no picture, since the margin and focus change follows from which element is the target.

Activity

  1. added a commit that references this issue on Nov 17, 2026
  2. max-sixty commented on Nov 18, 2026

    @max-sixty
    Owner

    Decision: drop the heading ids that #6256 added for aria-labelledby, so pointing at a question's heading aims at the question again.

    Neither option above fits main any more. Since #6315 a question takes its name from lf-group's label, and nothing reads those heading ids. The work:

    • Remove the id from each heading that opens an lf-group in skills/leaf/references/authoring-on-me.md's examples, examples/ and docs/. There were 61 such headings on main when checked.
    • Drop page-authoring.md's sentence "An id a heading needs for aria-labelledby is not the section's address", which Name a group, and the question asked in it, by lf-group's label #6315 left stale.

    Such a heading then offers no copy-link control, as before #6256. No runtime change is needed.

    This was written by Claude Code on behalf of max-sixty

  3. removed their assignment
    on Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions