From 5054a415d810fa635ee771171fb48ea335146a53 Mon Sep 17 00:00:00 2001 From: TechTide AI Date: Thu, 21 May 2026 18:54:58 -0400 Subject: [PATCH] fix(a11y): add ARIA combobox pattern to command palette and quick open MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Both picker overlays lacked ARIA attributes, making them invisible to screen readers. This adds: - role=dialog + aria-modal + aria-label on the overlay container - aria-autocomplete=list + aria-controls on the search input - aria-activedescendant pointing to the currently highlighted item - role=listbox on the results container - role=option + aria-selected on each result item No visual or behavioral changes — purely assistive technology support. --- components/command-palette.tsx | 12 +++++++++++- components/quick-open.tsx | 12 +++++++++++- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/components/command-palette.tsx b/components/command-palette.tsx index 606b188..6c8fb29 100644 --- a/components/command-palette.tsx +++ b/components/command-palette.tsx @@ -519,6 +519,9 @@ export function CommandPalette({ open, onClose, onRun }: CommandPaletteProps) { onClick={onClose} >
e.stopPropagation()} > @@ -551,6 +554,10 @@ export function CommandPalette({ open, onClose, onRun }: CommandPaletteProps) { } }} placeholder="Run a command..." + aria-label="Run a command" + aria-autocomplete="list" + aria-controls="command-palette-list" + aria-activedescendant={flatList[selectedIndex] ? `command-palette-item-${selectedIndex}` : undefined} className="flex-1 bg-transparent text-[14px] text-[var(--text-primary)] outline-none placeholder:text-[var(--text-tertiary)]" /> @@ -558,7 +565,7 @@ export function CommandPalette({ open, onClose, onRun }: CommandPaletteProps) {
-
+
{flatList.length === 0 && (
No matching commands @@ -578,6 +585,9 @@ export function CommandPalette({ open, onClose, onRun }: CommandPaletteProps) { return (