From 111e0333f091885153f8d650ec4e833769022dc4 Mon Sep 17 00:00:00 2001 From: Sebastiaan de Schaetzen Date: Tue, 17 Jun 2025 14:32:01 +0200 Subject: [PATCH] Refactor keyboard navigation to focus on current thumbnail for better accessibility --- static/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/static/index.html b/static/index.html index e5ab030..193e38a 100644 --- a/static/index.html +++ b/static/index.html @@ -493,7 +493,7 @@ let nextIndex = (currentIndex - 1 + activeFocusableSet.length) % activeFocusableSet.length; activeFocusableSet[nextIndex].focus(); } else if (activeFocusableSet.length > 0) { // If nothing specific focused, focus last - activeFocusableSet[activeFocusableSet.length - 1].focus(); + $("#current-thumb").focus(); } keyHandled = true; break; @@ -504,7 +504,7 @@ let nextIndex = (currentIndex + 1) % activeFocusableSet.length; activeFocusableSet[nextIndex].focus(); } else if (activeFocusableSet.length > 0) { // If nothing specific focused, focus first - activeFocusableSet[0].focus(); + $("#current-thumb").focus(); } keyHandled = true; break;