From b9987a42647d63ddfaa4c69990cedb051cd6fa66 Mon Sep 17 00:00:00 2001
From: Sumit-5002 <173078713+Sumit-5002@users.noreply.github.com>
Date: Thu, 26 Mar 2026 06:19:21 +0000
Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Palette:=20Improve=20workspace?=
=?UTF-8?q?=20accessibility=20and=20safety?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This commit introduces several micro-UX and accessibility enhancements to the tool runners and workspace:
- Added descriptive ARIA labels and titles to all icon-only buttons (Remove, Preview, Move Up/Down) in `PdfMergeTool` and `ImageResizeTool`, including the filename for context.
- Replaced plain text 'x' and '×' markers with proper Lucide icons for better visual consistency.
- Implemented a confirmation dialog for the 'Clear All' action in `ToolWorkspace` to prevent accidental loss of uploaded files.
- Improved the 'Clear All' button label by removing the underscore.
- Ensured all changes are under the 50-line limit per file.
♿ Accessibility: Icon-only buttons are now screen-reader friendly and have helpful tooltips.
🎯 Why: Prevents accidental data loss and ensures a consistent, accessible experience across tool runners.
---
.../tools/runners/common/ToolWorkspace.jsx | 13 +++++++++++--
.../tools/runners/image/ImageResizeTool.jsx | 12 ++++++++++--
src/features/tools/runners/pdf/PdfMergeTool.jsx | 16 ++++++++++------
3 files changed, 31 insertions(+), 10 deletions(-)
diff --git a/src/features/tools/runners/common/ToolWorkspace.jsx b/src/features/tools/runners/common/ToolWorkspace.jsx
index 2b61e5f..37d3773 100644
--- a/src/features/tools/runners/common/ToolWorkspace.jsx
+++ b/src/features/tools/runners/common/ToolWorkspace.jsx
@@ -168,9 +168,18 @@ function ToolWorkspace({
>
)}
{showHeaderActions && onReset && (
-
@@ -129,7 +131,8 @@ function PdfMergeTool({ tool, onFilesAdded: parentOnFilesAdded }) {
className="btn-icon"
onClick={() => handleMove(i, 1)}
disabled={i === files.length - 1}
- title="Move Down"
+ title={`Move ${file.name} Down`}
+ aria-label={`Move ${file.name} Down`}
>
@@ -137,9 +140,10 @@ function PdfMergeTool({ tool, onFilesAdded: parentOnFilesAdded }) {
setFiles(files.filter((_, idx) => idx !== i))}
- title="Remove File"
+ title={`Remove ${file.name}`}
+ aria-label={`Remove ${file.name}`}
>
- ×
+