Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion apps/loopover-miner-ui/src/chat-composer.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ const MAX_HEIGHT_PX = 160;
function setup(props: Partial<Parameters<typeof ChatComposer>[0]> = {}) {
const onSubmit = vi.fn();
render(<ChatComposer onSubmit={onSubmit} {...props} />);
const textarea = screen.getByRole("textbox") as HTMLTextAreaElement;
// #7440: query by accessible name so this pins that the composer's textarea actually has one.
const textarea = screen.getByRole("textbox", { name: /chat message/i }) as HTMLTextAreaElement;
return { onSubmit, textarea, button: screen.getByRole("button", { name: /send/i }) };
}

Expand Down
4 changes: 4 additions & 0 deletions apps/loopover-miner-ui/src/components/chat-composer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ export function ChatComposer({
<div className="flex items-end gap-2">
<Textarea
ref={textareaRef}
// #7440: the ui-kit Textarea is a bare native <textarea> with no label of its own, and a
// placeholder is not a reliable accessible name (it vanishes once typing starts and is exposed
// to AT inconsistently). Give it a stable, purpose-describing name independent of `placeholder`.
aria-label="Chat message"
value={value}
onChange={(event) => setValue(event.target.value)}
onKeyDown={(event) => {
Expand Down
Loading