From affc739f7ebff706f3fddb7311ffd32940c32862 Mon Sep 17 00:00:00 2001 From: Georges-Antoine Assi Date: Mon, 6 Jul 2026 11:02:56 -0400 Subject: [PATCH] feat(v2): improve keyboard tab navigation in the gallery MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - useGridNav: keep every card in the Tab order (Tab walks card → card) while pulling the hidden in-card hover-overlay action buttons out of it (tabindex="-1"), applied eagerly on mount and re-synced as virtualised rows mount/unmount. Adds tests. - GalleryShell: opt the virtual scroller out of the tab order (tabindex="-1") so Tab no longer lands on the scroll container. - RBtn: stop the scoped `outline: none` from swallowing the global modality-gated focus ring; only clear the native UA outline for non-focus-visible (mouse) focus, so keyboard/pad show the branded ring. - RTabNav: replace the outline focus ring (clipped into vertical slivers by the nav's overflow) with a contained, rounded inset focus highlight. Generated-By: PostHog Code Task-Id: 2dcae833-1422-499e-bf58-0c555cf5e96e --- .../v2/components/Gallery/GalleryShell.vue | 1 + .../v2/composables/useGridNav/index.test.ts | 136 ++++++++++++++++++ .../src/v2/composables/useGridNav/index.ts | 71 ++++++--- frontend/src/v2/lib/primitives/RBtn/RBtn.vue | 16 ++- .../src/v2/lib/primitives/RTabNav/RTabNav.vue | 29 ++++ 5 files changed, 236 insertions(+), 17 deletions(-) create mode 100644 frontend/src/v2/composables/useGridNav/index.test.ts diff --git a/frontend/src/v2/components/Gallery/GalleryShell.vue b/frontend/src/v2/components/Gallery/GalleryShell.vue index baac21799..7e881d0ca 100644 --- a/frontend/src/v2/components/Gallery/GalleryShell.vue +++ b/frontend/src/v2/components/Gallery/GalleryShell.vue @@ -878,6 +878,7 @@ defineExpose({ :overscan="virtualOverscan" :min-content-width="layout === 'list' ? listMinWidth : undefined" class="r-v2-shell__scroller r-v2-scroll-hidden" + :tabindex="-1" @update:viewport-range="onViewportRangeChange" >