Skip to content

Commit ccfa6da

Browse files
committed
fix: prevent keyboard focus on hidden navbar buttons with inert attribute
1 parent 977f3d0 commit ccfa6da

File tree

1 file changed

+2
-0
lines changed
  • apps/sim/app/(landing)/components/navbar

1 file changed

+2
-0
lines changed

apps/sim/app/(landing)/components/navbar/navbar.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,7 @@ export default function Navbar({ logoOnly = false, blogPosts = [] }: NavbarProps
215215

216216
<div
217217
aria-hidden={!shouldShow}
218+
inert={shouldShow ? undefined : ''}
218219
className={cn(
219220
'hidden items-center gap-2 pr-16 pl-5 transition-opacity duration-200 lg:flex',
220221
shouldShow ? 'opacity-100' : 'pointer-events-none opacity-0'
@@ -336,6 +337,7 @@ export default function Navbar({ logoOnly = false, blogPosts = [] }: NavbarProps
336337

337338
<div
338339
aria-hidden={!shouldShow}
340+
inert={shouldShow ? undefined : ''}
339341
className={cn(
340342
'mt-auto flex flex-col gap-2.5 p-5 transition-opacity duration-200',
341343
shouldShow ? 'opacity-100' : 'pointer-events-none opacity-0'

0 commit comments

Comments
 (0)