From 5b25e7c6922562205a23829bccea2604755aa7bf Mon Sep 17 00:00:00 2001 From: tristan Date: Tue, 9 Jun 2026 16:59:25 +0200 Subject: [PATCH] =?UTF-8?q?feat(select)=20:=20anneau=20focus=20clavier,=20?= =?UTF-8?q?navigation=20APG=20et=20focus=20conserv=C3=A9=20apr=C3=A8s=20s?= =?UTF-8?q?=C3=A9lection?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Anneau de focus clavier (clavier-only) ; ouvert, l'anneau entoure bouton + liste d'un seul tenant, adapté au sens d'ouverture (haut/bas) - Navigation clavier WAI-ARIA APG (manquait) : ouverture, flèches avec scroll auto de l'option active, Home/End, Entrée/Espace, Échap, Tab - aria-activedescendant pour les lecteurs d'écran - Le focus reste sur le bouton après sélection (plus de blur vers le body) Co-Authored-By: Claude Opus 4.8 (1M context) --- app/components/malio/select/Select.vue | 82 +++++++++++++++++++++++++- 1 file changed, 79 insertions(+), 3 deletions(-) diff --git a/app/components/malio/select/Select.vue b/app/components/malio/select/Select.vue index e331f76..28c6b65 100644 --- a/app/components/malio/select/Select.vue +++ b/app/components/malio/select/Select.vue @@ -37,15 +37,24 @@ twMerge(label ? 'min-h-[40px]' : 'h-[40px] py-0', fieldClass), 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 && 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" >