add ARIA labels and pressed states to board list and remaining components

This commit is contained in:
2026-02-19 19:55:30 +02:00
parent 8e3e644127
commit 964284295d
5 changed files with 8 additions and 2 deletions
+1
View File
@@ -183,6 +183,7 @@ export function BoardCard({ board, sortable = false }: BoardCardProps) {
<ContextMenuTrigger asChild>
<button
onClick={handleOpen}
aria-label={`Open board: ${board.title} - ${board.cardCount} cards, ${board.columnCount} columns, updated ${relativeTime}`}
className="group flex w-full flex-col rounded-lg bg-pylon-surface shadow-sm transition-all duration-200 hover:-translate-y-0.5 hover:shadow-md text-left"
>
{/* Color accent stripe */}
+3 -1
View File
@@ -170,6 +170,7 @@ export function NewBoardDialog({ open, onOpenChange }: NewBoardDialogProps) {
variant={template === t && !selectedUserTemplate ? "default" : "outline"}
size="sm"
onClick={() => { setTemplate(t); setSelectedUserTemplate(null); }}
aria-pressed={template === t && !selectedUserTemplate}
className="capitalize"
>
{t}
@@ -182,6 +183,7 @@ export function NewBoardDialog({ open, onOpenChange }: NewBoardDialogProps) {
variant={selectedUserTemplate?.id === ut.id ? "default" : "outline"}
size="sm"
onClick={() => { setSelectedUserTemplate(ut); setColor(ut.color); }}
aria-pressed={selectedUserTemplate?.id === ut.id}
>
<span
className="inline-block size-2 rounded-full shrink-0"
@@ -193,7 +195,7 @@ export function NewBoardDialog({ open, onOpenChange }: NewBoardDialogProps) {
type="button"
onClick={() => handleDeleteTemplate(ut.id)}
className="rounded p-0.5 text-pylon-text-secondary opacity-0 hover:opacity-100 hover:bg-pylon-danger/10 hover:text-pylon-danger transition-opacity"
title="Delete template"
aria-label="Delete template"
>
<X className="size-3" />
</button>