From 39fb12bef3b17fd3760160d97d10462c41bfa2a8 Mon Sep 17 00:00:00 2001
From: "google-labs-jules[bot]"
<161369871+google-labs-jules[bot]@users.noreply.github.com>
Date: Wed, 22 Apr 2026 05:52:00 +0000
Subject: [PATCH] feat(a11y): add aria-labels to icon-only buttons
Co-authored-by: threehymns <70611435+threehymns@users.noreply.github.com>
---
.Jules/palette.md | 3 +++
src/components/editor/extensions/code-block-codemirror.tsx | 3 +++
src/components/graph-tab.tsx | 4 ++++
3 files changed, 10 insertions(+)
create mode 100644 .Jules/palette.md
diff --git a/.Jules/palette.md b/.Jules/palette.md
new file mode 100644
index 0000000..a65a8ec
--- /dev/null
+++ b/.Jules/palette.md
@@ -0,0 +1,3 @@
+## 2024-04-22 - Missing ARIA Labels on Icon-Only Buttons
+**Learning:** Common pattern found across UI components (`graph-tab.tsx`, `code-block-codemirror.tsx`) where icon-only buttons using `HugeiconsIcon` are missing `aria-label` attributes. While they often include a `title` attribute for mouse users, screen readers require the `aria-label` for proper accessibility context.
+**Action:** When adding new icon-only buttons, consistently include `aria-label` alongside `title`.
diff --git a/src/components/editor/extensions/code-block-codemirror.tsx b/src/components/editor/extensions/code-block-codemirror.tsx
index cbc217e..731d719 100644
--- a/src/components/editor/extensions/code-block-codemirror.tsx
+++ b/src/components/editor/extensions/code-block-codemirror.tsx
@@ -446,6 +446,7 @@ const CodeMirrorComponent = ({
>
@@ -485,6 +487,7 @@ const CodeMirrorComponent = ({
onClick={handleCopy}
className="rounded p-1 text-muted-foreground transition-colors hover:bg-accent hover:text-foreground"
title="Copy Code"
+ aria-label="Copy Code"
>
{copied ? (
setPanel(DEFAULT_PANEL)}
className="size-7"
>
@@ -1328,6 +1329,7 @@ interface ForceGraphInstance {
variant="ghost"
size="icon"
title="Close panel"
+ aria-label="Close panel"
onClick={() => setPaneOpen(false)}
className="size-7"
>
@@ -1431,6 +1433,8 @@ interface ForceGraphInstance {