From 3432054a58646480b2e583dfa14c21e35cfe7bc7 Mon Sep 17 00:00:00 2001 From: tristan Date: Tue, 9 Jun 2026 17:07:44 +0200 Subject: [PATCH] feat(select-checkbox) : anneau focus clavier, navigation APG et clic pleine ligne MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Anneau de focus clavier (clavier-only), combo bouton + liste selon le sens - Navigation clavier WAI-ARIA APG : ouverture, flèches + scroll auto, Home/End, Entrée/Espace togglent (liste reste ouverte), Échap/Tab ferment - Ligne "Tout sélectionner" intégrée à la navigation clavier (index -1) - aria-activedescendant ; focus conservé sur le bouton - Clic sur toute la ligne (li) coche/décoche, plus seulement sur le label Co-Authored-By: Claude Opus 4.8 (1M context) --- .../malio/select/SelectCheckbox.vue | 107 ++++++++++++++++-- 1 file changed, 97 insertions(+), 10 deletions(-) diff --git a/app/components/malio/select/SelectCheckbox.vue b/app/components/malio/select/SelectCheckbox.vue index db819e1..d457b1f 100644 --- a/app/components/malio/select/SelectCheckbox.vue +++ b/app/components/malio/select/SelectCheckbox.vue @@ -37,15 +37,24 @@ label ? 'min-h-[40px]' : 'h-[40px] py-0', rounded, textField, + keyboardFocused + ? (isOpen + ? (openDirection === 'down' ? 'm-combo-ring-top' : 'm-combo-ring-bottom') + : 'm-focus-ring-kbd') + : '', ]" :aria-expanded="isOpen" :aria-controls="listboxId" + :aria-activedescendant="!isOpen ? undefined : (activeIndex === -1 ? selectAllId : (activeIndex >= 0 ? optionId(activeIndex) : undefined))" :aria-invalid="hasError" :aria-describedby="describedBy" :aria-required="required || undefined" :aria-readonly="isReadonly || undefined" :disabled="disabled" @click="toggle" + @keydown="onKeydown" + @focus="onKbdFocus" + @blur="onKbdBlur" >