Skip to content

Decide whether focus on a commentable control keeps a ring a page can't turn off #5525

Closed as not planned

Description

@leaf-agent

@max-sixty, this needs your call on part of #5306's intent that #5524 gave up.

What #5306 intended: every mark round a box is the box's own outline at !important, so that a page or widget rule turning outlines off can't hide the mark.

What conflicted: a focused page control also wears a mark, data-lf-mark="focus", from anchor-paint.js. At !important it overrode each box's own focus treatment. An author's focus outline lost (a 4px outline read 2px), and so did a ring overlay's outline: none; the trace canvas then drew a second ring outside its clipping viewport. Two tests went red (#5478).

What #5524 gave up: focus alone now draws at no weight, as the focus floor does for every other control. A page's :focus {outline: none} on a commentable control now removes Leaf's focus cue there. Before #5306 the overlay drew it regardless, and so did #5306's !important outline. Marks combined with focus keep !important.

Still open: should focus on a commentable control keep a cue that a page can't turn off? If so, it needs a carrier that leaves the author's outline and a ring overlay's ::after alone, such as a ring a page rule doesn't reach, rather than the box's outline.

This issue stays open until you decide; Tend won't settle it.

Activity

  1. leaf-agent commented on Nov 7, 2026

    @leaf-agent
    CollaboratorAuthor

    Another case for this decision, from #5647: under #5524's rule, a decorative outline also outranks focus alone, not just a focus style. A box with .authored-contour { outline: 1px dashed } that takes keyboard focus shows only that dashed outline, with no ring that tells it has focus. #5668 updates test_target_brackets_and_focus_share_the_visible_boundary to expect this. If focus should keep a ring the page can't remove, that subtest's focus step should go back to expecting Leaf's solid 2px ring.

  2. max-sixty commented on Nov 18, 2026

    @max-sixty
    Owner

    Keeping #5524's rule, so closing. On a commentable control, a page's own focus style wins over Leaf's ring, as it does on every other control and as an author's outline replaces the browser's native focus ring. A page that sets :focus { outline: none }, or a decorative outline, shows no Leaf ring on a focused commentable box; that is the page's choice.

    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

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