From 4f926c238b3bd6ed783f282306c1cd4d3b72f4ff Mon Sep 17 00:00:00 2001 From: Petri Saarinen Date: Wed, 25 Nov 2026 06:36:52 +0200 Subject: [PATCH] Let the theme be chosen by clicking its label in the profile menu Clicking a theme option's text moved focus nowhere, and the focusout rule closed the panel before the radio was checked. The panel now closes only when focus moves to an element outside it; clicks outside and Escape still close it. Each theme option is a full-width row with a hover state, and the chosen one is also shown in bold. Co-Authored-By: Claude Opus 5.5 --- resources/views/components/profile-menu.blade.php | 7 ++++--- tests/Browser/ProfileMenuTest.php | 10 ++++++++++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/resources/views/components/profile-menu.blade.php b/resources/views/components/profile-menu.blade.php index 42053e1..5a95686 100644 --- a/resources/views/components/profile-menu.blade.php +++ b/resources/views/components/profile-menu.blade.php @@ -7,14 +7,15 @@ The signed-in user's profile menu: a disclosure button (WAI-ARIA disclosure, not role="menu") that opens a panel with the language (kept on the account), the theme (kept on this device by tallstackui_darkTheme() on , whose "mode" the radios bind to) and logging out. Escape and a click outside close it, and so does moving focus - out of it. The button's name stays the same; aria-expanded tells whether the panel is open. + out of it to another element (a click on a radio's label text moves focus nowhere, so it must not close the + panel). The button's name stays the same; aria-expanded tells whether the panel is open. --}}