mirror of
https://github.com/pocket-id/pocket-id.git
synced 2026-10-14 05:39:05 +02:00
fix: improve keyboard navigation and screen-reader labels (#1445)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user