diff options
| author | Joel Klinghed <the_jk@spawned.biz> | 2026-11-23 14:04:08 +0100 |
|---|---|---|
| committer | Joel Klinghed <the_jk@spawned.biz> | 2026-11-23 14:04:08 +0100 |
| commit | c5e81304a31fc6dbbbbd50177481aedc8c11c32c (patch) | |
| tree | 3ac0ed31727b7c4729d91a05f0585b5484e33455 /web/src/lib/ui/MainList.svelte | |
| parent | 51da41ccfbfcfe94aee610719973cbb320e506f8 (diff) | |
web: add ARIA roles to drag-and-drop containers
Static divs with drag handlers need an ARIA role: the main game list
slots become listitems inside a list (they are reorderable list
entries), and the draw-pile columns in the ability/modifier deck
menus become labelled groups (they are drop zones for reordering).
Diffstat (limited to 'web/src/lib/ui/MainList.svelte')
| -rw-r--r-- | web/src/lib/ui/MainList.svelte | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/web/src/lib/ui/MainList.svelte b/web/src/lib/ui/MainList.svelte index e83df7d..3abe09b 100644 --- a/web/src/lib/ui/MainList.svelte +++ b/web/src/lib/ui/MainList.svelte @@ -70,10 +70,11 @@ } </script> -<div class="list"> +<div class="list" role="list" aria-label="Game list"> {#if $gameState} {#each $gameState.currentList as item, i (item.id)} <div + role="listitem" class="list__slot" class:list__slot--drop={dropIndex === i && dragIndex != null && dragIndex !== i} draggable={!!$player} |
