fix(a11y): opening a filter list with the mouse also moves focus to its options (#33352)

This commit is contained in:
G30 2026-10-29 02:08:12 -04:00 • committed by GitHub
parent 6e569978d9
commit e56bd11957
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,6 +1,7 @@
<script lang="ts">
import { flyAndScale } from '$lib/utils/transitions';
import { tick } from 'svelte';
import { mobile } from '$lib/stores';
import DropdownMenu from '$lib/components/common/DropdownMenu.svelte';
/** Currently selected value */
@ -161,7 +162,7 @@
class="focus-ring {triggerClass}"
type="button"
aria-expanded={open}
on:click={() => toggleOpen()}
on:click={() => toggleOpen(!$mobile)}
on:keydown={handleTriggerKeydown}
>
<slot name="trigger" {selectedLabel} {open}>