Skip to content
Open
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: 3 additions & 0 deletions .Jules/palette.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## 2026-04-27 - [ARIA labels for icon-only buttons]
**Learning:** In React components like `<Button size="icon">`, the presence of a `title` attribute is insufficient for comprehensive accessibility. Screen readers and assistive technologies require explicit `aria-label` attributes to reliably parse icon-only interactive elements.
**Action:** Always include `aria-label` along with `title` when creating icon-only buttons to ensure they are accessible.
4 changes: 4 additions & 0 deletions src/components/editor/extensions/code-block-codemirror.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,8 @@ const CodeMirrorComponent = ({
<button
type="button"
className="flex items-center gap-1 focus:outline-none"
aria-label="Select language"
title="Select language"
>
{React.createElement("selectedcontent")}
<HugeiconsIcon icon={ArrowDown01Icon} size={12} />
Expand Down Expand Up @@ -477,6 +479,7 @@ const CodeMirrorComponent = ({
isLineWrapped ? "text-primary" : "text-muted-foreground",
)}
title="Toggle Line Wrap"
aria-label="Toggle Line Wrap"
>
<HugeiconsIcon icon={TextWrapIcon} size={14} />
</button>
Expand All @@ -485,6 +488,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 ? (
<HugeiconsIcon
Expand Down
4 changes: 4 additions & 0 deletions src/components/frontmatter-editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,8 @@ export function InlineFrontmatterEditor({
className="[&_svg]:inline"
variant="ghost"
size="icon"
aria-label={`Type: ${prop.type}`}
title={`Type: ${prop.type}`}
>
<HugeiconsIcon
icon={
Expand Down Expand Up @@ -296,6 +298,8 @@ export function InlineFrontmatterEditor({
size="icon"
className="opacity-0 group-focus-within:opacity-100"
onClick={() => removeProperty(index)}
aria-label={`Remove property ${prop.key || 'new property'}`}
title={`Remove property ${prop.key || 'new property'}`}
>
<HugeiconsIcon icon={Cancel01Icon} />
</Button>
Expand Down
2 changes: 2 additions & 0 deletions src/components/graph-tab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1319,6 +1319,7 @@ interface ForceGraphInstance {
variant="ghost"
size="icon"
title="Reset settings"
aria-label="Reset settings"
onClick={() => setPanel(DEFAULT_PANEL)}
className="size-7"
>
Expand All @@ -1328,6 +1329,7 @@ interface ForceGraphInstance {
variant="ghost"
size="icon"
title="Close panel"
aria-label="Close panel"
onClick={() => setPaneOpen(false)}
className="size-7"
>
Expand Down
2 changes: 1 addition & 1 deletion src/routes/settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ function SettingsPage() {
<div className="mx-auto max-w-2xl space-y-8">
<div className="flex items-center gap-4">
<Link to="/">
<Button variant="ghost" size="icon" type="button">
<Button variant="ghost" size="icon" type="button" aria-label="Go back" title="Go back">
<HugeiconsIcon icon={ArrowLeft01Icon} className="h-5 w-5" />
</Button>
</Link>
Expand Down