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 @@
## 2023-10-24 - Added aria-hidden="true" to decorative icons
**Learning:** Decorative icons from libraries like lucide-react (such as `ChevronRight`, `ChevronLeft`, `ChevronUp`, `ChevronDown`, `X`, etc) used within focusable or interactive elements that already have text or an `aria-label` attribute can cause redundancy or confusion for screen readers if not explicitly hidden.
**Action:** When adding or auditing decorative icons in interactive components (especially `button` or `Link` elements), always ensure they are marked with `aria-hidden="true"` to prevent redundant screen reader announcements.
4 changes: 2 additions & 2 deletions packages/web/src/components/dashboard/event-detail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ export function EventDetail({ event, onClose }: EventDetailProps) {
<span
className={`flex h-6 w-6 shrink-0 items-center justify-center rounded-full ${bg}`}
>
<Icon className="h-3.5 w-3.5 text-background" />
<Icon className="h-3.5 w-3.5 text-background" aria-hidden="true" />
</span>
<div className="min-w-0">
<div className="text-sm font-medium truncate">{label}</div>
Expand All @@ -141,7 +141,7 @@ export function EventDetail({ event, onClose }: EventDetailProps) {
aria-label="Close event details"
className="flex h-7 w-7 items-center justify-center rounded-md text-muted-foreground hover:bg-muted hover:text-foreground focus:outline-none focus-visible:ring-2 focus-visible:ring-ring"
>
<X className="h-4 w-4" />
<X className="h-4 w-4" aria-hidden="true" />
</button>
)}
</div>
Expand Down
3 changes: 2 additions & 1 deletion packages/web/src/components/dashboard/event-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ function RowView({
bg,
)}
>
<Icon className="h-3 w-3 text-background" />
<Icon className="h-3 w-3 text-background" aria-hidden="true" />
</span>
<span className="w-20 shrink-0 text-sm font-medium truncate">
{label}
Expand All @@ -183,6 +183,7 @@ function RowView({
"h-3 w-3 shrink-0 transition-transform",
chevron === "expanded" && "rotate-90",
)}
aria-hidden="true"
/>
)}
<span className="truncate">{preview}</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ export function ContextSection({ title, children, defaultOpen = false }: Context
>
<h2 className="text-base font-medium">{title}</h2>
{open ? (
<ChevronUp className="h-4 w-4 text-muted-foreground" />
<ChevronUp className="h-4 w-4 text-muted-foreground" aria-hidden="true" />
) : (
<ChevronDown className="h-4 w-4 text-muted-foreground" />
<ChevronDown className="h-4 w-4 text-muted-foreground" aria-hidden="true" />
)}
</button>
{open && (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export function WeekNavigator({ currentIsoKey, label, isCurrent }: WeekNavigator
aria-label="이전 μ£Ό"
className={cn(buttonVariants({ variant: 'outline', size: 'icon-sm' }))}
>
<ChevronLeft className="h-4 w-4" />
<ChevronLeft className="h-4 w-4" aria-hidden="true" />
</Link>
<div className="flex items-center gap-2 px-3 py-1.5 rounded-md bg-muted">
<span className="text-sm font-medium tabular-nums">{label}</span>
Expand All @@ -69,7 +69,7 @@ export function WeekNavigator({ currentIsoKey, label, isCurrent }: WeekNavigator
aria-label="λ‹€μŒ μ£Ό"
className={cn(buttonVariants({ variant: 'outline', size: 'icon-sm' }))}
>
<ChevronRight className="h-4 w-4" />
<ChevronRight className="h-4 w-4" aria-hidden="true" />
</Link>
</div>
)
Expand Down
4 changes: 2 additions & 2 deletions packages/web/src/components/ui/pagination.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export function Pagination({
disabled={safePage <= 1}
aria-label="이전 νŽ˜μ΄μ§€"
>
<ChevronLeftIcon />
<ChevronLeftIcon aria-hidden="true" />
</Button>

{/* λͺ¨λ°”일: ν˜„μž¬ νŽ˜μ΄μ§€ / μ „μ²΄λ§Œ ν‘œμ‹œ */}
Expand Down Expand Up @@ -156,7 +156,7 @@ export function Pagination({
disabled={safePage >= totalPages}
aria-label="λ‹€μŒ νŽ˜μ΄μ§€"
>
<ChevronRightIcon />
<ChevronRightIcon aria-hidden="true" />
</Button>
</div>
)}
Expand Down
Loading