fix(a11y): add aria-label to collapsed sidebar links, aria-current to active

This commit is contained in:
Jason Staack
2026-03-15 21:08:09 -05:00
parent b07659e2c2
commit 9ce4c9aa60

View File

@@ -282,8 +282,10 @@ export function Sidebar() {
showCollapsed && 'justify-center px-0', showCollapsed && 'justify-center px-0',
)} )}
title={showCollapsed ? item.label : undefined} title={showCollapsed ? item.label : undefined}
aria-label={showCollapsed ? item.label : undefined}
aria-current={active ? 'page' : undefined}
> >
<Icon className="h-4 w-4 flex-shrink-0" /> <Icon className="h-4 w-4 flex-shrink-0" aria-hidden="true" />
{!showCollapsed && ( {!showCollapsed && (
<> <>
<span className="truncate">{item.label}</span> <span className="truncate">{item.label}</span>