From 0d6b0035ed18e282398572fd83dddd8aefbde934 Mon Sep 17 00:00:00 2001 From: Andreas Reinhold / reini Date: Mon, 14 Sep 2026 13:36:12 +0200 Subject: [PATCH] Bring a pressed carousel item into focus, though it is a tab stop Plan step 32, found by the Browser suite. Since containment.md C-18 put the tab stop on each item, the item itself matches the selector for interactive controls, so every press on an item read as a press on a control inside it and never scrolled a partly hidden item into focus. A mouse press still worked through the focus it gives the item; an activation that clicks without focusing, as a test or assistive technology does, did nothing. Only a control other than the item counts now. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01Qwx5USif3wFFmxtHg5U1g9 --- resources/js/carousel.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/resources/js/carousel.js b/resources/js/carousel.js index 3e9e26a7..c1260e8e 100644 --- a/resources/js/carousel.js +++ b/resources/js/carousel.js @@ -1198,9 +1198,10 @@ document.addEventListener('alpine:init', () => { const element = event.target.closest(ITEM) const index = state.items.findIndex((item) => item.element === element) + // The item is a tab stop itself, so it matches INTERACTIVE: only a control inside it counts. const control = event.target.closest(INTERACTIVE) - if (index >= 0 && this.isMasked(index) && !(control && element.contains(control))) { + if (index >= 0 && this.isMasked(index) && !(control && control !== element && element.contains(control))) { this.scrollToItem(index) } },