fix: improve keyboard navigation and screen-reader labels (#1445)

This commit is contained in:
Björn F.
2026-04-21 15:21:23 -05:00
committed by GitHub
parent 605c8b2ba4
commit a9fdab10f1
7 changed files with 55 additions and 5 deletions
@@ -17,7 +17,7 @@
</script>
<DropdownMenu.Root>
<DropdownMenu.Trigger
<DropdownMenu.Trigger aria-label={m.my_account()}
><Avatar.Root class="size-9">
<Avatar.Image src={cachedProfilePicture.getUrl($userStore!.id)} />
</Avatar.Root></DropdownMenu.Trigger
+5 -1
View File
@@ -77,7 +77,11 @@
const delayUpdateLink = () => `${layout().total * ROW_STAGGER}ms`;
</script>
<nav class="text-muted-foreground grid gap-2 text-sm">
<nav
class="text-muted-foreground grid gap-2 text-sm"
aria-label={m.settings()}
data-sveltekit-keepfocus
>
{#each items as item, i}
{#if item.children?.length}
{@const id = groupId(item, i)}
@@ -223,7 +223,16 @@
{/if}
{#each visibleColumns as column}
<Table.Head class={cn(column.sortable && 'p-0')}>
<Table.Head
class={cn(column.sortable && 'p-0')}
aria-sort={column.sortable
? requestOptions.sort?.column === column.column
? requestOptions.sort?.direction === 'asc'
? 'ascending'
: 'descending'
: 'none'
: undefined}
>
{#if column.sortable}
<Button
variant="ghost"
@@ -13,6 +13,7 @@
<th
bind:this={ref}
data-slot="table-head"
scope="col"
class={cn(
'text-foreground h-12 px-4 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]',
className