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 @@
## 2024-05-18 - Missing Aria Labels on Icon-only Buttons
**Learning:** Found several icon-only buttons across components (e.g., Code block language selector, copy, wrap toggle, search dialog results, slash command list, graph tab controls) lacking `aria-label`s, which impacts screen reader accessibility. Some have `title` but `aria-label` is crucial.
**Action:** Always verify `aria-label` is present on any `<button>` element that only contains icons without visible text.
3 changes: 3 additions & 0 deletions src/components/editor/extensions/code-block-codemirror.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,7 @@ const CodeMirrorComponent = ({
>
<button
type="button"
aria-label="Select language"
className="flex items-center gap-1 focus:outline-none"
>
{React.createElement("selectedcontent")}
Expand All @@ -471,6 +472,7 @@ const CodeMirrorComponent = ({
<div className="flex items-center gap-1 border-border border-l pl-2">
<button
type="button"
aria-label="Toggle line wrap"
onClick={toggleLineWrapping}
className={cn(
"rounded p-1 transition-colors hover:bg-accent",
Expand All @@ -482,6 +484,7 @@ const CodeMirrorComponent = ({
</button>
<button
type="button"
aria-label="Copy code"
onClick={handleCopy}
className="rounded p-1 text-muted-foreground transition-colors hover:bg-accent hover:text-foreground"
title="Copy Code"
Expand Down