diff --git a/.Jules/palette.md b/.Jules/palette.md new file mode 100644 index 0000000..0642f7b --- /dev/null +++ b/.Jules/palette.md @@ -0,0 +1,3 @@ +## 2024-05-18 - [Add ARIA labels to icon-only buttons] +**Learning:** Found multiple instances where icon-only buttons lacked an `aria-label` attribute (e.g. `title` attributes were present, but not `aria-label`). This causes screen readers to have a poor experience because they do not reliably read `title` attributes on interactive elements. This app uses ` @@ -485,6 +486,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 ? ( removeProperty(index)} + title="Remove Property" + aria-label="Remove Property" > diff --git a/src/components/graph-tab.tsx b/src/components/graph-tab.tsx index 4b13707..8b08df9 100644 --- a/src/components/graph-tab.tsx +++ b/src/components/graph-tab.tsx @@ -1319,6 +1319,7 @@ interface ForceGraphInstance { variant="ghost" size="icon" title="Reset settings" + aria-label="Reset settings" onClick={() => 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 {