From b70f8d27e73ba04e1881489eb3a7ce691a22b487 Mon Sep 17 00:00:00 2001 From: Jake/Rads Date: Mon, 27 Jun 2022 10:58:30 +0200 Subject: [PATCH] feat(dashboard): keyboard navigation between list items --- dashboard/src/lib/list/List.svelte | 116 +++++++++++++++++++---------- 1 file changed, 78 insertions(+), 38 deletions(-) diff --git a/dashboard/src/lib/list/List.svelte b/dashboard/src/lib/list/List.svelte index d7060238..ebd1b7a6 100644 --- a/dashboard/src/lib/list/List.svelte +++ b/dashboard/src/lib/list/List.svelte @@ -1,7 +1,7 @@ @@ -156,48 +188,56 @@ {#if settings && settings.accessibility ? (!settings.accessibility.expandedcards && !settings.accessibility.pagelinks) : true} - {#each slicedList as item, index (item.id + index)} - - -
- {#if isPublic || item.privacy.visibility === "public"} + +

+ +

+ + {#if itemType === "member"} - + {:else if itemType === "group"} - + {/if} - {:else} - - {/if} -
-
- {#if itemType === "member"} - - {:else if itemType === "group"} - - {/if} -
+ + + {/each} -
{:else if settings.accessibility.expandedcards} {#each slicedList as item, index (item.id + index)} - - -
- {#if isPublic || item.privacy.visibility === "public"} - {#if itemType === "member"} - - {:else if itemType === "group"} - - {/if} - {:else} - - {/if} -
-
-
+
skipToNextItem(e, index)} tabindex={0}> + + +
+ {#if isPublic || item.privacy.visibility === "public"} + {#if itemType === "member"} + + {:else if itemType === "group"} + + {/if} + {:else} + + {/if} +
+
+
+
{#if itemType === "member"} @@ -211,7 +251,7 @@