Skip to content

Make the docs nav usable on a phone - #2438

Draft
kylemclaren wants to merge 3 commits into
mainfrom
mobile-nav-overhaul
Draft

Make the docs nav usable on a phone#2438
kylemclaren wants to merge 3 commits into
mainfrom
mobile-nav-overhaul

Conversation

@kylemclaren

Copy link
Copy Markdown
Contributor

No description provided.

kylemclaren and others added 3 commits July 27, 2026 12:37
Three changes to the nav accordion, all measured on fly.io/docs at 390x844:

Collapsed sections were clipped with grid-rows/opacity only, so all 112 links
in closed sections stayed focusable and stayed in the accessibility tree — a
screen reader user swiped through 128 items to reach the 16 that were visible.
Collapsed panels now carry `inert`.

Section headers were two tap targets with no visible seam: on "Getting Started"
the first 127px navigated to the section index and the remaining 221px toggled
it. The header is now a single button that toggles, and the section's index
page moves into the list as an "Overview" child. Sections whose links already
include that page (8 of 15 in the main nav) are left alone rather than growing
a duplicate.

Triggers gained aria-controls pointing at the panel they own. The panels no
longer claim role="region" — every closed section was announcing itself as a
landmark, and a nav sublist is better left as a list.

Breadcrumbs put `truncate` on every segment inside a flex row, so they all
shrank together and a three-level path rendered as "D... > Fly Mac... > An
introduction to Fly ..." on a phone. They now scroll sideways instead.

Needs the matching CSS and JS in superfly/landing to land together.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The layout renders crumbs twice below lg: once in the sticky context bar and
once inside the article for the desktop rail, with exactly one visible at any
width. Both need different wrapper classes, so take an optional wrapper_class
local instead of hard-coding "mb-11 flex".

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The full trail does not fit the 44px sticky bar. Next to the "On this page"
chip the crumbs get about 220px, so on /docs/machines/overview/ the trail
overflowed by 175px and the bar became a sideways scroller — swiping it moved
the strip under your thumb, which reads as the page being loose.

Trading the trail for a single "up one level" link removes the motion and keeps
the only thing the trail was doing at this width, since the page's own title is
the h1 immediately below. Verified at every depth: /docs/machines/ goes up to
Docs, /docs/machines/overview/ to Fly Machines, /docs/reference/regions/ to
Fly.io reference.

Wide screens keep the full trail in the article via mode: :trail.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant