Skip to content

Commit

Permalink
Restore ARIA accessibility to send button
Browse files Browse the repository at this point in the history
  • Loading branch information
amosjyng committed May 9, 2024
1 parent b88307f commit 877b424
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src-svelte/src/lib/controls/Button.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
export let unwrapped = false;
export let rightEnd = false;
export let ariaLabel: string | undefined = undefined;
const dispatchClickEvent = createEventDispatcher();
function handleClick() {
Expand All @@ -15,6 +16,7 @@
class="cut-corners inner"
class:right-end={rightEnd}
type="submit"
aria-label={ariaLabel}
on:click={handleClick}
>
<slot />
Expand All @@ -24,6 +26,7 @@
class="cut-corners outer"
class:right-end={rightEnd}
type="submit"
aria-label={ariaLabel}
on:click={handleClick}
>
<div class="cut-corners inner" class:right-end={rightEnd}>
Expand Down
2 changes: 1 addition & 1 deletion src-svelte/src/routes/chat/Form.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
bind:this={textareaInput}
bind:value={currentMessage}
/>
<Button unwrapped rightEnd><IconSend /></Button>
<Button ariaLabel="Send" unwrapped rightEnd><IconSend /></Button>
</form>

<style>
Expand Down

0 comments on commit 877b424

Please sign in to comment.