Skip to content

♿🔧:let a tap on the menu button land - #1857

Merged
openinf-commit-queue[bot] merged 3 commits into
livefrom
drop-bento-sidebar
Aug 25, 2026
Merged

openinf-commit-queue[bot] merged 3 commits into
livefrom
drop-bento-sidebar

Conversation

@DerekNonGeneric

@DerekNonGeneric DerekNonGeneric commented Aug 25, 2026 •

Copy link
Copy Markdown
Member

Supersedes #1856, which did not fix this. My testing there used
synthetic taps at the button's exact center, which cannot reproduce a
finger on real hardware, so I was never testing the reported fault.

What was actually wrong

Safari holds a tap for about a third of a second to see whether a
second one follows and a double-tap should zoom instead. Tapping again
inside that wait reads as the double-tap and cancels both clicks. Only
touch-action turns that off, and it was never set anywhere in the
stylesheet.

The viewport asked for maximum-scale=1,minimum-scale=1, which looks
like it should have covered this, but iOS has ignored those since iOS
10 precisely so that people can still zoom. So they never suppressed
the delay — they only took pinch-zoom away on the browsers that do
honor them. Both are gone, and the button carries
touch-action: manipulation.

The button was also 34px tall, under the 48px Google recommends for a
tap target. Its reach is now 48px; the button itself is unchanged, so
nothing on the page moves. The drawer's own links already measure
240x48.

Why bento-sidebar is gone

Three requests to a CDN we do not control, one a render-blocking
stylesheet that the whole page waited on to paint — and in exchange, a
drawer that could not be steered: an invisible full-height host that
swallowed taps meant for the brand, a panel that slid across the very
button that opened it, and a second copy of that button riding in on
the panel to land under a finger mid-slide.

A drawer is a fixed panel, a transform, and a backdrop. The header's
button is now the only control and never moves, so nothing crosses it
while it slides. Nothing is fetched, so it works from the moment the
page is parsed. cdn.ampproject.org is off the critical path entirely.

Verified

Driven in WebKit on an iPhone 14 profile this time, not only
Chromium:

  • every tap toggles, at every interval from 50ms to 300ms — no lost or
    swallowed taps, because nothing ever covers the button
  • every tap target at least 48px: the toggle reaches 50x48 from a 50x34
    button with nothing drawn differently, the drawer links are 240x48
  • touch-action: manipulation present in the built production CSS
  • opens on all seven page types, no console errors, no horizontal
    overflow
  • desktop unchanged: the toggle stays hidden, the inline nav does the
    work, the drawer stays inert
  • aria-expanded tracks state, the drawer is inert while closed,
    focus moves in and comes back, Escape and the backdrop close it, and
    the focus ring is shown to a keyboard and not to a finger
  • nps test passes

Audited against bento-sidebar's own source

Read the component's source rather than assuming a drawer is a drawer.
Four things it did that this had dropped, now restored:

  • Right-to-left. The panel hangs off the trailing edge, so in an
    RTL page it has to leave to the left. It was leaving to the right
    whatever the direction, parking the closed panel mid-viewport. No
    page sets lang: ar yet, but the layout emits dir='rtl' for one
    that does. Verified closed at x=-240 in RTL and x=390 in LTR.
  • overflow-x: hidden. overflow-y: auto alone makes the other
    axis scrollable too, so a long entry would have given the drawer a
    horizontal scrollbar. The old one pinned this deliberately.
  • The backdrop swallows drags, so the page behind does not scroll
    under a finger. touch-action: none says what the old one needed a
    120vw box and a 101vh spacer to say.
  • Escape stops there instead of carrying on to other listeners.
  • The slide is the old one's again: a sharp decelerate over 350ms.

Dropped on purpose: role="menu" on a list of links, which wants
menuitem children to mean anything and reads worse than the labelled
nav around it. The toolbar attribute, the open attribute as an
API, and pausing media on close were never used here. History
integration — the back button closing the drawer — belonged to
amp-sidebar, not the component this site loaded, so it was never
ours to lose.

Please test on your phone

The deploy preview is the thing to try, since I cannot run real iOS
here. One tap should open it now.

@netlify

netlify Bot commented Aug 25, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for gh-pages-openinf ready!

Name Link
🔨 Latest commit f53671c
🔍 Latest deploy log https://app.netlify.com/projects/gh-pages-openinf/deploys/6a8ddb94bbeb8a00087021c8
😎 Deploy Preview https://deploy-preview-1857--gh-pages-openinf.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Safari holds a tap for about a third of a second to see whether a
second one follows and it should zoom instead, and a tap inside that
wait reads as the double-tap and cancels both. Only touch-action turns
that off; iOS ignores the scale limits in the viewport, so those never
did, and asking for them took pinch-zoom from anyone who needs it on
the browsers that do listen. That is why the menu took several goes.

The button was also 34px tall, under the 48px recommended for a tap
target. Its reach grows to 48 and the button itself is left alone, so
nothing on the page moves.

Signed-off-by: Derek Lewis <DerekNonGeneric@inf.is>
Assisted-by: Claude-Code:claude-opus-5
Refs: #1856
bento-sidebar cost three requests to a CDN we do not control, one of
them a render-blocking stylesheet, and gave back a drawer we could not
steer: an invisible full-height host that took taps meant for the
brand, a panel that slid across the button that opened it, and a second
copy of that button riding in on the panel.

A drawer is a fixed panel, a transform, and a backdrop. That is what
this is now. The header's button is the only control and never moves,
so nothing crosses it while it slides and there is no second one to
land under a finger. Nothing is fetched, so it works from the moment
the page is parsed rather than once a runtime has come down the wire.

The page no longer waits on cdn.ampproject.org to paint.

The drawer it replaces reports aria-expanded, is inert while closed so
nothing tabs into an off-screen menu, and takes focus and hands it back.
Escape and the backdrop close it, and the ring a returning focus leaves
is shown to a keyboard and not to a finger.

Signed-off-by: Derek Lewis <DerekNonGeneric@inf.is>
Assisted-by: Claude-Code:claude-opus-5
Read against bento-sidebar's own source rather than trusting that a
drawer is a drawer. Four things it did that this had dropped:

The panel hangs off the trailing edge, so in a page that reads right to
left it has to leave to the left. It was leaving to the right whatever
the direction, which parked the closed panel in the middle of the
viewport. No page sets `lang: ar` yet, but the layout emits `dir='rtl'`
for one that does.

`overflow-y: auto` alone makes the other axis scrollable too, so a long
entry would have given the drawer a horizontal scrollbar. The old one
pinned `overflow-x: hidden` on purpose.

A drag on the backdrop scrolled the page behind it. The old one made
the backdrop swallow the gesture; `touch-action` says the same thing
without the two hacks it needed to do it.

Escape closed the drawer and carried on to whatever else was listening.

The slide is the old one's again as well, a sharp decelerate over
350ms, so the motion is the one the site had rather than a new one.

Left behind deliberately: `role="menu"` on a list of links, which wants
`menuitem` children to mean anything and reads worse than the labelled
`nav` around it. The toolbar attribute, the `open` attribute as an API,
and pausing media on close were never used here. History integration —
the back button closing the drawer — belonged to `amp-sidebar`, not to
the component this site loaded, so it was never ours to lose.

Signed-off-by: Derek Lewis <DerekNonGeneric@inf.is>
Assisted-by: Claude-Code:claude-opus-5
@OpenINFbot OpenINFbot added the 🚀 Status: Commit Queue Land this pull request when its checks pass label Aug 25, 2026
@openinf-commit-queue
openinf-commit-queue Bot merged commit 79b5fbe into live Aug 25, 2026
15 of 16 checks passed
@openinf-commit-queue openinf-commit-queue Bot removed the 🚀 Status: Commit Queue Land this pull request when its checks pass label Aug 25, 2026
@DerekNonGeneric
DerekNonGeneric deleted the drop-bento-sidebar branch August 25, 2026 18:35
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.

2 participants