Repository navigation
fix(foundation): keep phone menu focus rings inside the menu - #1691
Merged
gregpriday merged 2 commits intoNov 28, 2026
Merged
gregpriday merged 2 commits into
gregpriday merged 2 commits into
Conversation
…an action - the column menus reset both inline margins of the links list, so the last-child pull meant for the open row no longer overflows the menu sideways - the menu's side padding never drops below the 5 px a focus ring needs - refresh the Foundation pack digests
…nu control - a 16 px gutter in the compact menu, so the compact floor can't regress alone - Tab has to reach each control the open menu shows
gregpriday
force-pushed
the
bugfix/issue-1379-phone-navigation-clips-the-right-edge-of
branch
from
November 28, 2026 10:22
25dedda to
9b048d3
Compare
gregpriday
deleted the
bugfix/issue-1379-phone-navigation-clips-the-right-edge-of
branch
November 28, 2026 10:23
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.
Resolves #1379
With no action button, the header's list of links is the nav's last child, so
.so-header__list:where(:last-child)pulls its end out by--so-header-link-xto line the open row's last word up with the page edge. The phone and compact column menus reset onlymargin-inline-start. The list (and every full-width link in it) therefore stuck out past the menu's end: 4 px at 320 px and 2 px at 390 px. The menu is a scroll container (overflow-y: auto), so it scrolled sideways and clipped the focus outline's right side. At 820 px the compact menu's wider gutter hid the overflow, but the same −8 px margin was there.Changes
.so-header__listrules (phone and.so-header--compact) resetmargin-inline: 0.max(5px, gutter − space.sm)), the room the theme's focus ring (2 px outline + 3 px offset) needs. Default gutters already give 8.5 px or more, so default rendering is unchanged; only a gutter token under 17 px moves the rows' words inward.resources/packs/foundation,resources/packs-dev/foundation-alt), with the digests inresources/packs.lock.jsonrefreshed.npm run build:packs -- --committedreports they match.Follow-up: the header is authored in siteorigin/builder-components, so the same two CSS changes need to land there too. Otherwise the next
npm run build:packsrefresh from that checkout would undo this fix.Testing
tests/unit/header-menu-focus-ring-browser.test.ts(Chromium, both themes). It mounts the showcase header with no action, opens the menu with Enter and Tabs through every visible control. It checks that the menu doesn't scroll sideways, that the list's end margin is 0, and that each control's rect, expanded by its computed outline width and offset, sits inside the menu's padding box and the viewport. Cases: 320 × 720, 390 × 844, compact at 820 × 1180, and 320 and compact 820 with a 16 px gutter. All cases failed ondevelop(324 > 320, 392 > 390,-8px≠0px). They all pass now, and putting back only the compact padding floor fails the compact 16 px case.committed-packs,pack-loader,packs-gate,theme-packs,foundation-html,header-focus-browser,header-menu,header-menu-order,foundation-interactive(-browser)and others. All green.npm run typecheck:changedgreen; prettier clean on the changed test.