From d66e90a6d5ff904c2499f542cba28e01d3e068be Mon Sep 17 00:00:00 2001 From: Your Name Date: Thu, 19 Feb 2026 19:54:22 +0200 Subject: [PATCH] add ARIA labels, pressed states, and fix keyboard visibility across card detail components --- src/components/card-detail/AttachmentSection.tsx | 5 +++-- src/components/card-detail/ChecklistSection.tsx | 7 +++++-- src/components/card-detail/CommentsSection.tsx | 3 ++- src/components/card-detail/LabelPicker.tsx | 5 +++++ src/components/card-detail/MarkdownEditor.tsx | 3 +++ src/components/card-detail/PriorityPicker.tsx | 1 + 6 files changed, 19 insertions(+), 5 deletions(-) diff --git a/src/components/card-detail/AttachmentSection.tsx b/src/components/card-detail/AttachmentSection.tsx index 56af145..7af368e 100644 --- a/src/components/card-detail/AttachmentSection.tsx +++ b/src/components/card-detail/AttachmentSection.tsx @@ -52,6 +52,7 @@ export function AttachmentSection({ size="icon-xs" onClick={handleAdd} className="text-pylon-text-secondary hover:text-pylon-text" + aria-label="Add attachment" > @@ -71,14 +72,14 @@ export function AttachmentSection({ @@ -95,6 +96,8 @@ export function LabelPicker({ key={label.id} onClick={() => toggleCardLabel(cardId, label.id)} className="flex items-center gap-2 rounded px-2 py-1 text-left text-sm transition-colors hover:bg-pylon-column" + aria-pressed={isSelected} + aria-label={`${isSelected ? "Remove" : "Add"} label: ${label.name}`} > setNewLabelName(e.target.value)} onKeyDown={handleCreateKeyDown} placeholder="Label name..." + aria-label="New label name" className="h-7 rounded-md bg-pylon-column px-2 text-sm text-pylon-text outline-none placeholder:text-pylon-text-secondary/60 focus:ring-1 focus:ring-pylon-accent" />
@@ -130,6 +134,7 @@ export function LabelPicker({ key={color} onClick={() => setNewLabelColor(color)} className="size-5 rounded-full transition-transform hover:scale-110" + aria-label={`Color ${color}`} style={{ backgroundColor: color, outline: diff --git a/src/components/card-detail/MarkdownEditor.tsx b/src/components/card-detail/MarkdownEditor.tsx index c046bea..991c31d 100644 --- a/src/components/card-detail/MarkdownEditor.tsx +++ b/src/components/card-detail/MarkdownEditor.tsx @@ -76,6 +76,7 @@ export function MarkdownEditor({ cardId, value }: MarkdownEditorProps) { variant={mode === "edit" ? "secondary" : "ghost"} size="xs" onClick={() => setMode("edit")} + aria-pressed={mode === "edit"} className="font-mono text-xs" > Edit @@ -83,6 +84,7 @@ export function MarkdownEditor({ cardId, value }: MarkdownEditorProps) {