add ARIA labels, pressed states, and fix keyboard visibility across card detail components
This commit is contained in:
@@ -70,6 +70,7 @@ export function LabelPicker({
|
||||
variant="ghost"
|
||||
size="icon-xs"
|
||||
className="text-pylon-text-secondary hover:text-pylon-text"
|
||||
aria-label="Manage labels"
|
||||
>
|
||||
<Plus className="size-3.5" />
|
||||
</Button>
|
||||
@@ -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}`}
|
||||
>
|
||||
<span
|
||||
className="size-3 shrink-0 rounded-full"
|
||||
@@ -122,6 +125,7 @@ export function LabelPicker({
|
||||
onChange={(e) => 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"
|
||||
/>
|
||||
<div className="flex flex-wrap gap-1.5">
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user