Repository navigation
Show margin labels on a phone only while held or reached by keyboard - #3451
Merged
Merged
Conversation
A phone browser leaves the entry a finger last pressed hovered and focused until the next tap elsewhere, and the label reveal answered to both. Hover now reveals a label only under (hover: hover), and under (hover: none) focus reveals it only where the keyboard placed it (:focus-visible). Press-and-hold reads a label on a phone; mouse and keyboard behavior is unchanged. The touch label test now asserts a tap leaves no label and the label hides when the hold ends. Max's decision #30 on the overnight report. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
approved these changes
Oct 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On a phone, a tap on a margin entry no longer leaves its label up over the margin. Press-and-hold (#3341) is the way to read a label there, and the label goes when the finger lifts. With a mouse, and from the keyboard on any device, labels show as before.
This is Max's decision #30 on the overnight report (option A, "Show hover labels only with a real pointer").
A phone browser leaves the entry a finger last pressed both hovered and focused until the next tap elsewhere. The label reveal answered to both:
:hover, and[data-lf-focus], which marks any focus, a tap's included. Gating only the hover part on(hover: hover)still left the label up after a tap in Chromium under touch, because the tap had also focused the entry. So on a device without real hover ((hover: none)), focus reveals the label only where the keyboard placed it (:focus-visible). Tab and the Left/Right route between a target's entries both match it.theme.css: the hover reveal sits under@media (hover: hover), and under(hover: none)a focus that isn't:focus-visiblehides the label unless a press holds it. The held and focused reveals share one rule.margin-layout.js: the label's placement reads the same rule, fromhoveringPointerinpointer.js, so it doesn't place or count a label the theme hides.test_a_finger_holding_a_margin_entry_reads_its_label_above_itnow asserts that a tap leaves the label hidden and that the label hides when the hold ends. Against the base runtime, the tap assertion fails.Checked with
leaf-dev probeon a page with a status entry and an action entry, base against this branch: