From 877b42475c4c4b85caa2e1ce9dd2909614e05025 Mon Sep 17 00:00:00 2001 From: Amos Jun-yeung Ng Date: Fri, 10 May 2024 01:05:04 +0700 Subject: [PATCH] Restore ARIA accessibility to send button --- src-svelte/src/lib/controls/Button.svelte | 3 +++ src-svelte/src/routes/chat/Form.svelte | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src-svelte/src/lib/controls/Button.svelte b/src-svelte/src/lib/controls/Button.svelte index 870afb9b..8590af94 100644 --- a/src-svelte/src/lib/controls/Button.svelte +++ b/src-svelte/src/lib/controls/Button.svelte @@ -3,6 +3,7 @@ export let unwrapped = false; export let rightEnd = false; + export let ariaLabel: string | undefined = undefined; const dispatchClickEvent = createEventDispatcher(); function handleClick() { @@ -15,6 +16,7 @@ class="cut-corners inner" class:right-end={rightEnd} type="submit" + aria-label={ariaLabel} on:click={handleClick} > @@ -24,6 +26,7 @@ class="cut-corners outer" class:right-end={rightEnd} type="submit" + aria-label={ariaLabel} on:click={handleClick} >
diff --git a/src-svelte/src/routes/chat/Form.svelte b/src-svelte/src/routes/chat/Form.svelte index 08952df9..6b950499 100644 --- a/src-svelte/src/routes/chat/Form.svelte +++ b/src-svelte/src/routes/chat/Form.svelte @@ -52,7 +52,7 @@ bind:this={textareaInput} bind:value={currentMessage} /> - +