Skip to content

Commit 1cd224f

Browse files
🎨 Palette: Add aria-label and title to icon-only buttons in CloudflareDocsBetaPage
Added explicit `aria-label` and `title` attributes to the Delete, Stop, and Send icon-only buttons to improve accessibility and UX tooltips. Also documented this standard in `.Jules/palette.md`. Co-authored-by: jmbish04 <26469722+jmbish04@users.noreply.github.com>
1 parent f48d6ea commit 1cd224f

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

‎.Jules/palette.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## 2024-06-01 - Add context to icon-only buttons
2+
**Learning:** Found that icon-only buttons (like Send or Stop in chat interfaces) often lack both `aria-label` for screen readers and `title` for sighted users simultaneously. This breaks accessibility and degrades UX for users relying on mouse-hover tooltips for clarity.
3+
**Action:** Always ensure icon-only buttons get an explicit `aria-label` attribute and a matching `title` attribute for tooltip rendering.

‎src/frontend/src/components/tools/toolbox/CloudflareDocsBetaPage.tsx‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -513,6 +513,7 @@ function BetaThreadSidebar({
513513
onClick={e => { e.stopPropagation(); setConfirmId(t.id); }}
514514
className="absolute top-2 right-2 p-1.5 rounded-lg opacity-0 group-hover:opacity-100 text-muted-foreground/40 hover:text-red-400 hover:bg-red-500/10 transition-all"
515515
aria-label="Delete thread"
516+
title="Delete thread"
516517
>
517518
<Trash2 className="w-3 h-3" />
518519
</button>
@@ -937,6 +938,7 @@ function BetaChatPanel({
937938
}}
938939
className="p-2 rounded-xl text-red-400 hover:bg-red-500/10 shrink-0 transition-colors"
939940
title="Stop generating"
941+
aria-label="Stop generating"
940942
>
941943
<Square className="w-4 h-4" />
942944
</button>
@@ -945,6 +947,8 @@ function BetaChatPanel({
945947
onClick={() => sendMessage()}
946948
disabled={!input.trim() || wsStatus !== "open"}
947949
className="p-2 rounded-xl bg-orange-500 hover:bg-orange-600 text-white disabled:opacity-30 disabled:cursor-not-allowed shrink-0 transition-colors shadow-md shadow-orange-500/20"
950+
title="Send message"
951+
aria-label="Send message"
948952
>
949953
<Send className="w-4 h-4" />
950954
</button>

0 commit comments

Comments
 (0)