From 50a709808736dec608545ea65e11e5b9232f9069 Mon Sep 17 00:00:00 2001 From: Blake Vandercar Date: Tue, 19 Nov 2024 09:59:04 -0700 Subject: [PATCH 1/3] feat(a11y): add aria-keyshortcuts to search button --- packages/docsearch-react/src/DocSearchButton.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/docsearch-react/src/DocSearchButton.tsx b/packages/docsearch-react/src/DocSearchButton.tsx index 9aca83897..ca27288e4 100644 --- a/packages/docsearch-react/src/DocSearchButton.tsx +++ b/packages/docsearch-react/src/DocSearchButton.tsx @@ -37,11 +37,14 @@ export const DocSearchButton = React.forwardRef] as const) : (['Meta', 'Command', key] as const); + const shortcut = `${actionKeyAltText}+K` + return (