Repository navigation
test: expect a box's own outline over focus alone in the target-boundary test - #5668
Merged
Merged
Conversation
…ary test #5524 made focus alone (`data-lf-mark="focus"`) draw Leaf's ring at no weight, so an outline the page gives the box wins. The `rounded` fixture carries an authored dashed outline, so after Escape it now shows that outline instead of Leaf's solid 2px ring, and the test still expected the ring. The behavior the test protects changes: focus alone on a box with an authored outline shows the page's outline. The square target, which has none, still checks Leaf's focus ring on the region's perimeter, and every other mark still stands over the page's outline. Whether focus should keep a ring a page can't remove stays open in #5525. Closes #5647
max-sixty
pushed a commit
that referenced
this pull request
Nov 18, 2026
…ing on a commentable box (#6397) Records #5525's decision in the header of `browser/styles/components/surfaces.css`: on a commentable control, focus alone stands at no weight, so a page's `:focus { outline: none }` or decorative outline replaces Leaf's ring, as an author's outline replaces the browser's own focus ring. The header now says the user chose this and why the `!important` alternative fails (it overrides the author's focus outline and a ring overlay's `outline: none`, drawing a second ring outside the overlay's clipping box). This is a comment-only change. The tests from #5524 and #5668 already expect this behavior. Refs #5525 Co-authored-by: leaf-agent <[email protected]>
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.
#5524 made focus alone (
data-lf-mark="focus") draw Leaf's ring at no weight, so the box's own outline wins. Its comment insurfaces.csssays so: "the box's own focus treatment wins, an author's outline or a carrier's". Theroundedtarget intest_target_brackets_and_focus_share_the_visible_boundaryhas an authoredoutline: 1px dashed. After Escape it now shows that outline, but the test still expected Leaf's solid 2px ring. That expectation came from before #5524, so this updates it instead of rolling #5524 back.Behavior the test now protects: focus alone on a box with an authored outline shows the page's outline. The
squaretarget has no outline of its own, and it still checks Leaf's focus ring, whole, on the region's perimeter. The aim and a draft's mark still stand over the page's outline on both targets, and the page's outline comes back once no mark stands there.What stays open: the fixture's dashed outline is decorative, not a focus style. So on a box like this, keyboard focus no longer gets a ring of its own. That follows from #5524's rule, which treats this the same way the focus floor treats every other control. #5525 already asks
max-sixtywhether focus should keep a ring the page can't remove. This PR doesn't decide that, and if the answer is yes, this subtest's focus step goes back to expecting the ring.Verification: the test fails on main at
a54c1bceain itsroundedsubtest ('dashed' == 'solid'attest_render_aim.py:3658) and passes with this change.ruff checkandruff format --checkare clean.Closes #5647 — automated triage