From 6a844f565c7425f1b0600bdd6314577952208e5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mathias=20Gla=CC=88ser?= Date: Mon, 25 May 2026 07:38:29 +0200 Subject: [PATCH] Fix activatable pulldown enabling behavior --- components/interactive-elements.html | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/components/interactive-elements.html b/components/interactive-elements.html index 5263192..c7320c4 100644 --- a/components/interactive-elements.html +++ b/components/interactive-elements.html @@ -700,11 +700,20 @@ return; } + const hasSelectedOption = Array.from(options).some((option) => option.getAttribute('aria-checked') === 'true'); + if (isActive && !hasSelectedOption) { + options[0].setAttribute('aria-checked', 'true'); + } if (!isActive) { options.forEach((option) => { option.setAttribute('aria-checked', 'false'); }); } + + options.forEach((option) => { + option.classList.toggle('sg-checkbox-field--inactive-selectable', !isActive); + option.classList.toggle('sg-form-active', option.getAttribute('aria-checked') === 'true'); + }); target.dataset.open = 'false'; trigger.setAttribute('aria-expanded', 'false'); updatePulldownSelectionState(target);