From 3a156ff21d66499a31cc1dc2958bdd6a905640cd Mon Sep 17 00:00:00 2001 From: arc53-machine <232052973+arc53-machine@users.noreply.github.com> Date: Mon, 28 Sep 2026 10:47:30 +0100 Subject: [PATCH] Name the file in the remove button's failure description The remove button's label is "Remove attachment" and doesn't say which file. Its failure description now reads ": ", the same text as the tooltip. --- .../src/components/message-input/AttachmentChipList.test.tsx | 3 ++- frontend/src/components/message-input/AttachmentChipList.tsx | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/message-input/AttachmentChipList.test.tsx b/frontend/src/components/message-input/AttachmentChipList.test.tsx index b117f6bc..df8a5a1d 100644 --- a/frontend/src/components/message-input/AttachmentChipList.test.tsx +++ b/frontend/src/components/message-input/AttachmentChipList.test.tsx @@ -106,8 +106,9 @@ describe('AttachmentChipList failed chip', () => { )!; const describedBy = remove.getAttribute('aria-describedby'); expect(describedBy).toBeTruthy(); + // Named, since the button's own label doesn't say which file. expect(document.getElementById(describedBy!)?.textContent).toBe( - 'Upload failed. The file could not be read.', + 'scan.pdf: Upload failed. The file could not be read.', ); }); diff --git a/frontend/src/components/message-input/AttachmentChipList.tsx b/frontend/src/components/message-input/AttachmentChipList.tsx index f6d6cd48..6376e7fd 100644 --- a/frontend/src/components/message-input/AttachmentChipList.tsx +++ b/frontend/src/components/message-input/AttachmentChipList.tsx @@ -124,7 +124,7 @@ export default function AttachmentChipList({ {failureReason && ( )}