Add tabindex to elements for better keyboard navigation

This commit is contained in:
2021-12-06 15:03:41 +01:00
parent 778e15dfbd
commit 8ac954b1a2
9 changed files with 20 additions and 14 deletions

View File

@@ -25,7 +25,7 @@
</script>
{#if tag === 'button'}
<button class={classes} on:click disabled={disabled}>
<button class={classes} tabindex="0" {disabled} on:click>
<slot />
<SplitText {text} clone={true} />
</button>
@@ -35,7 +35,8 @@
{rel} {target}
sveltekit:prefetch={url && isExternal ? null : true}
sveltekit:noscroll={isExternal ? null : true}
disabled={disabled}
{disabled}
tabindex="0"
on:click
>
<slot />