We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
a11y-click-events-have-key-events
1 parent 9bec7b0 commit 00db4e3Copy full SHA for 00db4e3
src/ToastItem.svelte
@@ -85,7 +85,15 @@ onDestroy(() => {
85
{/if}
86
</div>
87
{#if item.dismissable}
88
- <div class="_toastBtn pe" role="button" tabindex="-1" on:click={close} />
+ <div
89
+ class="_toastBtn pe"
90
+ role="button"
91
+ tabindex="0"
92
+ on:click={close}
93
+ on:keydown={(e) => {
94
+ if (e instanceof KeyboardEvent && ['Enter', ' '].includes(e.key)) close()
95
+ }}
96
+ />
97
98
<progress class="_toastBar" value={$progress} />
99
0 commit comments