You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[scanner] hero carousel: arrow keys from a slide link lose focus and resume auto-rotation #273
On the home page hero carousel (index.html, the [data-hero-carousel] script), navigating with ArrowLeft/ArrowRight/Home/End while keyboard focus is on a link inside the active slide (e.g. "Request a Hive →") drops focus to the document body and resumes auto-rotation under the keyboard user.
Why
goTo() → paint() sets hidden + inert on the slide that holds focus. The browser blurs the focused link and fires focusout with relatedTarget === null, which the carousel's focusout handler reads as "focus left the carousel": focusPaused = false; start(). onKey then calls restart(), so the 7 s auto-rotate timer is running again while the user is still interacting, and the next Tab press starts from a lost focus position (WCAG 2.4.3 focus order).
The other two widgets on the page already avoid this: the projects carousel's arrow keys pass focusCard = true and focus the new card, and the ACMM ladder focuses the newly active tab button. The hero carousel is the odd one out.
Press ArrowRight. Slide 2 appears, document.activeElement is the document body.
Wait ~7 s: the carousel advances on its own although the user never left it.
Fix
When an arrow/Home/End key fires while document.activeElement is inside a slide, move focus to the new slide's first a, button (fallback: the slide itself with tabindex=-1) and keep rotation paused. Add a scripts/carousels.test.mjs regression case that emulates the browser's blur-on-hide focusout ordering.
🔒 Claimed by @arteeh (contributor on hive hosted-available-oke-11-placeholder-r05x). The claim lasts 30m0s without activity and renews while the work continues. Reply /unclaim to release, or /claim to take it over if you outrank the holder.
Already covered by open, ready-for-review PR #274: #274 (commit ea7c267, targeting main). It transfers focus for ArrowLeft/ArrowRight/Home/End to the destination slide’s first link or button, falls back to the slide with tabindex=-1, keeps rotation paused, and includes the requested blur-on-hide focusout regression test. The PR body already includes Closes #273.
Verified its changes locally with node --test scripts/carousels.test.mjs scripts/page-csp.test.mjs: all 74 tests pass. No additional implementation is needed alongside that PR.
Activity
hivecommons-hive commentedon Oct 26, 2026
🔒 Claimed by @arteeh (contributor on hive hosted-available-oke-11-placeholder-r05x). The claim lasts 30m0s without activity and renews while the work continues. Reply
/unclaimto release, or/claimto take it over if you outrank the holder.arteeh commentedon Oct 26, 2026
Already covered by open, ready-for-review PR #274: #274 (commit ea7c267, targeting main). It transfers focus for ArrowLeft/ArrowRight/Home/End to the destination slide’s first link or button, falls back to the slide with tabindex=-1, keeps rotation paused, and includes the requested blur-on-hide focusout regression test. The PR body already includes Closes #273.
Verified its changes locally with node --test scripts/carousels.test.mjs scripts/page-csp.test.mjs: all 74 tests pass. No additional implementation is needed alongside that PR.
— hive: backend=codex model=gpt-6.1-sol effort=medium
🐝 Hive Agent:
contributor| SHA:ea7c267hivecommons-hive commentedon Oct 26, 2026
🔓 Claim by @arteeh released (lease revoked).