Skip to content
Merged
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
4 changes: 4 additions & 0 deletions .Jules/palette.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

## 2024-05-18 - Added aria-label to Dashboard icon buttons
**Learning:** React components returning icon-only buttons via `lucide-react` icons (like `Users`, `BookOpen`) inside Radix UI primitives (`Button`, `DropdownMenuTrigger`) must explicitly have `aria-label` attributes set to be accessible by screen readers. The `title` attribute is primarily for visual tooltips and does not sufficiently substitute for `aria-label` for assistive technologies in all contexts.
**Action:** When adding new icon-only buttons to the UI, particularly within navigation bars or dropdown triggers, always include a descriptive `aria-label` attribute alongside the `title` attribute.
12 changes: 6 additions & 6 deletions web/src/pages/Dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -313,15 +313,15 @@ export default function Dashboard() {
<h1 className="text-2xl font-bold">My Journal</h1>
<div className="flex gap-2">
<Link to="/connections">
<Button variant="ghost" size="icon" title="Connections">
<Button variant="ghost" size="icon" title="Connections" aria-label="Connections">
<Users className="w-5 h-5" />
</Button>
</Link>

{/* Resources Dropdown */}
<DropdownMenu>
<DropdownMenuTrigger asChild>
<Button variant="ghost" size="icon" title="Resources">
<Button variant="ghost" size="icon" title="Resources" aria-label="Resources">
<BookOpen className="w-5 h-5" />
</Button>
</DropdownMenuTrigger>
Expand Down Expand Up @@ -354,7 +354,7 @@ export default function Dashboard() {
{/* User Dropdown */}
<DropdownMenu>
<DropdownMenuTrigger asChild>
<Button variant="ghost" size="icon" title="User Menu">
<Button variant="ghost" size="icon" title="User Menu" aria-label="User Menu">
<UserIcon className="w-5 h-5" />
</Button>
</DropdownMenuTrigger>
Expand Down Expand Up @@ -384,7 +384,7 @@ export default function Dashboard() {

<Popover>
<PopoverTrigger asChild>
<Button variant="outline" size="icon" title="Filter & Sort">
<Button variant="outline" size="icon" title="Filter & Sort" aria-label="Filter & Sort">
<Filter className="w-4 h-4" />
</Button>
</PopoverTrigger>
Expand Down Expand Up @@ -528,12 +528,12 @@ export default function Dashboard() {

<div className="fixed bottom-8 right-8 flex flex-col gap-4">
<Link to="/chat">
<Button className="w-14 h-14 rounded-full shadow-lg" size="icon" variant="secondary" title="Ask AI">
<Button className="w-14 h-14 rounded-full shadow-lg" size="icon" variant="secondary" title="Ask AI" aria-label="Ask AI">
🤖
</Button>
</Link>
<Link to="/notes/new">
<Button className="w-14 h-14 rounded-full shadow-lg text-2xl" size="icon" title="New Note">
<Button className="w-14 h-14 rounded-full shadow-lg text-2xl" size="icon" title="New Note" aria-label="New Note">
+
</Button>
</Link>
Expand Down
Loading