From f006f22aaa4f1dd08fad9e00ff79edadef4a1923 Mon Sep 17 00:00:00 2001 From: Gregg Brewster Date: Tue, 1 Jul 2025 11:04:07 -0400 Subject: [PATCH 1/2] add accessible title to submit button --- chat/input-bar/src/InputBar/InputBar.spec.tsx | 2 +- chat/input-bar/src/InputBar/InputBar.tsx | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/chat/input-bar/src/InputBar/InputBar.spec.tsx b/chat/input-bar/src/InputBar/InputBar.spec.tsx index 6a358807c2..5969e2a397 100644 --- a/chat/input-bar/src/InputBar/InputBar.spec.tsx +++ b/chat/input-bar/src/InputBar/InputBar.spec.tsx @@ -71,7 +71,7 @@ describe('packages/input-bar', () => { test('fires when enter is clicked', () => { const textarea = screen.getByRole('textbox'); - const sendButton = screen.getByRole('button'); + const sendButton = screen.getByTitle('Send message'); userEvent.type(textarea, testText); userEvent.click(sendButton); diff --git a/chat/input-bar/src/InputBar/InputBar.tsx b/chat/input-bar/src/InputBar/InputBar.tsx index c38f79596e..ea5add6da1 100644 --- a/chat/input-bar/src/InputBar/InputBar.tsx +++ b/chat/input-bar/src/InputBar/InputBar.tsx @@ -433,6 +433,7 @@ export const InputBar = forwardRef( className={cx({ [sendButtonDisabledStyles]: isSendButtonDisabled(), })} + title="Send message" > {shouldRenderButtonText && 'Enter'} From ffab96f0db44a212727ac4b8e7cfc9b69f308189 Mon Sep 17 00:00:00 2001 From: Gregg Brewster Date: Tue, 1 Jul 2025 11:46:14 -0400 Subject: [PATCH 2/2] add changeset --- .changeset/spotty-areas-work.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/spotty-areas-work.md diff --git a/.changeset/spotty-areas-work.md b/.changeset/spotty-areas-work.md new file mode 100644 index 0000000000..4d90b44fe9 --- /dev/null +++ b/.changeset/spotty-areas-work.md @@ -0,0 +1,5 @@ +--- +'@lg-chat/input-bar': patch +--- + +Add an accessible title to the submit button