From a70b7efc422e0fbf41fc667812df921c363eeeb1 Mon Sep 17 00:00:00 2001 From: Jonas Lindenskov Nielsen Date: Fri, 30 Jan 2026 23:06:01 +0100 Subject: [PATCH] Search modal: Improve focus state and tab navigation This commit attempts to improve the focus state of the search modal, by reducing the amount of "tab" states for each hit entry to 1 (before there was it took at least two tab-keypresses to navigate to the next hit). Additionally, the visual design of the focus state has been updated. --- src/components/Search.tsx | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/src/components/Search.tsx b/src/components/Search.tsx index f576d10c..c4367e54 100644 --- a/src/components/Search.tsx +++ b/src/components/Search.tsx @@ -13,18 +13,20 @@ export const HitComponent = ({ hit, onClick }: HitProps) => { const path = `/${hit.slug}/`; return ( -
- - - {hit.category} - + +
+ + {Boolean(hit.category) ? `- ${hit.category}` : ''} +
- +

- -

+

+ ); }; @@ -55,7 +57,10 @@ export default function Search(props: SearchProps) { )} /> - } /> + } + /> ); }