From 56cb10ca88837a5e2c17791c2ccc81a4654a837d Mon Sep 17 00:00:00 2001 From: Derek Lewis Date: Tue, 25 Aug 2026 16:32:01 +0000 Subject: [PATCH 1/3] =?UTF-8?q?=F0=9F=92=84=F0=9F=94=A7=EF=BC=9Amake=20the?= =?UTF-8?q?=20sidebar=20open=20on=20the=20first=20tap?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The toggle was bound only once Bento's runtime had come down from the CDN, so a tap made before that was dropped with nothing to catch it. The buttons are bound as the page parses now and the handler waits on the API, so a tap in that gap opens the sidebar once the runtime lands. The rest is the 350ms slide. Bento draws the panel and its backdrop across the button on the way in, so a second tap landed on whichever was passing: the backdrop closed the sidebar again, and the panel's own wrapper swallowed the tap entirely. The sidebar stops taking taps for that beat and the toggle ignores them, so an impatient press leaves the menu open rather than shutting it. Measured in headless Chromium at a phone viewport. Tapping at first contentful paint with the runtime 500ms out did nothing before and opens the sidebar now; tapping three times at 100ms ended closed before and ends open now. Signed-off-by: Derek Lewis Assisted-by: Claude-Code:claude-opus-5 --- _assets/styles/_nav.scss | 8 ++++++++ _includes/footer.liquid | 36 +++++++++++++++++++++++++++--------- 2 files changed, 35 insertions(+), 9 deletions(-) diff --git a/_assets/styles/_nav.scss b/_assets/styles/_nav.scss index 9815609c2..a26ae3b65 100644 --- a/_assets/styles/_nav.scss +++ b/_assets/styles/_nav.scss @@ -8,6 +8,14 @@ height: $navbar-height; } +// The panel and its backdrop both cross the toggle while the sidebar slides, +// so a tap in that beat would land on whichever one is passing. Sealing the +// sidebar off sends it back to the button, which ignores it until the slide +// settles. The footer script sets the attribute. +[data-sidebar-busy] bento-sidebar { + pointer-events: none; +} + bento-sidebar { background-color: $secondary; diff --git a/_includes/footer.liquid b/_includes/footer.liquid index f325beeec..a1c8d6930 100644 --- a/_includes/footer.liquid +++ b/_includes/footer.liquid @@ -5,16 +5,34 @@ From f68b692b57ca0fb1d092a5a4ceede2f929f03528 Mon Sep 17 00:00:00 2001 From: Derek Lewis Date: Tue, 25 Aug 2026 16:32:02 +0000 Subject: [PATCH 2/3] =?UTF-8?q?=E2=99=BF=E2=9C=A8=EF=BC=9Ahave=20the=20nav?= =?UTF-8?q?=20toggles=20report=20their=20state?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The buttons opened and closed the sidebar without saying which of the two they would do, so only sight told you whether the menu was showing. They carry aria-expanded now, kept in step by watching the open attribute on the sidebar rather than by counting presses, which keeps the answer right when the sidebar closes on the backdrop or on Escape. aria-controls names what they operate. Signed-off-by: Derek Lewis Assisted-by: Claude-Code:claude-opus-5 --- _includes/footer.liquid | 12 ++++++++++++ _includes/header.liquid | 4 ++++ 2 files changed, 16 insertions(+) diff --git a/_includes/footer.liquid b/_includes/footer.liquid index a1c8d6930..5d114bf50 100644 --- a/_includes/footer.liquid +++ b/_includes/footer.liquid @@ -35,4 +35,16 @@ }, slideDuration); }); } + + // The buttons say which state they are in. Reading it off the element keeps + // the answer right when the sidebar closes on the backdrop or on Escape. + const sidebar = document.querySelector('#sidebar'); + const togglers = document.querySelectorAll('.navbar-toggler'); + + new MutationObserver(() => { + const expanded = String(sidebar.hasAttribute('open')); + for (const toggler of togglers) { + toggler.setAttribute('aria-expanded', expanded); + } + }).observe(sidebar, { attributeFilter: ['open'] }); diff --git a/_includes/header.liquid b/_includes/header.liquid index b17ebac8c..605a14695 100644 --- a/_includes/header.liquid +++ b/_includes/header.liquid @@ -11,6 +11,8 @@ class='navbar-toggler' type='button' aria-label='Toggle navigation' + aria-controls='sidebar' + aria-expanded='false' > {% include 'assets/img/sublime-theme/hamburger-secondary.svg' %} @@ -47,6 +49,8 @@ class='navbar-toggler' type='button' aria-label='Toggle navigation' + aria-controls='sidebar' + aria-expanded='false' > {% include 'assets/img/sublime-theme/hamburger-primary.svg' %} From f78fbdd1093085eb3956ca7416f3847b0e786a4e Mon Sep 17 00:00:00 2001 From: Derek Lewis Date: Tue, 25 Aug 2026 16:32:02 +0000 Subject: [PATCH 3/3] =?UTF-8?q?=F0=9F=92=84=F0=9F=9A=AE=EF=BC=9Adrop=20the?= =?UTF-8?q?=20sidebar's=20inert=20layout=20attribute?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit layout='nodisplay' is an AMP attribute, and Bento has no layout handling at all. It did nothing but imply the element starts out of the layout, which is the reverse of what happens: the host is laid out from the start, and only its first close puts the hidden attribute on it. Signed-off-by: Derek Lewis Assisted-by: Claude-Code:claude-opus-5 --- _includes/header.liquid | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/_includes/header.liquid b/_includes/header.liquid index 605a14695..19efdb88f 100644 --- a/_includes/header.liquid +++ b/_includes/header.liquid @@ -38,11 +38,7 @@ - +