fix(documents): FolderBreadcrumb a11y — aria-hidden separators + aria-current

Match the existing src/components/ui/breadcrumb.tsx pattern: separator
chevrons are aria-hidden so screen readers don't announce them, and
the terminal segment (Root or current folder name) carries
aria-current="page" so SR users know which crumb is the current page.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-10 11:57:30 +02:00
parent dd481e0c7d
commit d904122498

View File

@@ -47,15 +47,19 @@ export function FolderBreadcrumb({ selectedFolderId, onSelect }: FolderBreadcrum
</button>
{path.length === 0 && selectedFolderId === null ? (
<>
<ChevronRight className="h-3.5 w-3.5" />
<span className="text-foreground">Root</span>
<ChevronRight className="h-3.5 w-3.5" aria-hidden="true" />
<span className="text-foreground" aria-current="page">
Root
</span>
</>
) : null}
{path.map((node, i) => (
<span key={node.id} className="flex items-center gap-1">
<ChevronRight className="h-3.5 w-3.5" />
<ChevronRight className="h-3.5 w-3.5" aria-hidden="true" />
{i === path.length - 1 ? (
<span className="text-foreground">{node.name}</span>
<span className="text-foreground" aria-current="page">
{node.name}
</span>
) : (
<button
type="button"