From dbdfb2226b56a0a7d8076ac36a7cdf887c0c99d9 Mon Sep 17 00:00:00 2001 From: Deepak Mardi Date: Sun, 31 Mar 2024 23:05:15 +0530 Subject: [PATCH] Keyboard Navigation only on vissible elements --- src/components/NavigationDropdown.tsx | 53 +++++++++++++-------------- 1 file changed, 26 insertions(+), 27 deletions(-) diff --git a/src/components/NavigationDropdown.tsx b/src/components/NavigationDropdown.tsx index c0a691175..7eb9fed31 100644 --- a/src/components/NavigationDropdown.tsx +++ b/src/components/NavigationDropdown.tsx @@ -71,34 +71,33 @@ export function NavigationDropdown() { > -
- {links.map((link) => ( - - - - - - - {link.label} + {isOpen && ( +
+ {links.map((link) => ( + + + + + + + {link.label} + + {link.description} - {link.description} - - - ))} -
+ + ))} +
+ )} ); }