From 06285548036f7a8b2cf446a1711b3f3e6b596509 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sun, 14 Jun 2026 23:07:26 +0530 Subject: [PATCH] feat: add keyboard shortcut hints to command palette --- app/components/CommandPalette.client.vue | 37 ++++++++++++++++++++- i18n/locales/en.json | 5 +++ i18n/schema.json | 15 +++++++++ test/nuxt/components/CommandPalette.spec.ts | 11 ++++++ 4 files changed, 67 insertions(+), 1 deletion(-) diff --git a/app/components/CommandPalette.client.vue b/app/components/CommandPalette.client.vue index 311b31ac54..d66c68db08 100644 --- a/app/components/CommandPalette.client.vue +++ b/app/components/CommandPalette.client.vue @@ -303,7 +303,7 @@ useEventListener(document, 'keydown', handleGlobalKeydown) {{ statusMessage }}

-
+
+
+ + + ↑ + + + ↓ + + {{ $t('command_palette.footer.navigate') }} + + + + ↵ + + {{ $t('command_palette.footer.select') }} + + + + Esc + + {{ $t('command_palette.footer.close') }} + +
+
{ expect(input?.getAttribute('aria-controls')).toBe('command-palette-modal-results') }) + it('shows keyboard shortcut hints in the palette footer', async () => { + await mountPalette() + + const footer = document.querySelector('[data-command-palette-footer="true"]') + + expect(footer).not.toBeNull() + expect(footer?.textContent).toContain('to navigate') + expect(footer?.textContent).toContain('to select') + expect(footer?.textContent).toContain('to close') + }) + it('updates the live region when the query changes', async () => { await mountPalette()