Search
Star
Feedback
Setup for Free
© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Make links not focusable inside a burger menu - Kevin Powell - Community
KP-C
Kevin Powell - Community
•
3y ago
•
1 reply
フセヴォロド
Make links not focusable inside a burger menu
I
'm trying to create a keyboard accessible menu
, but the problem is if
button
button
/
a
a
/
input
input
are in that menu
, they are still focusable
. To move menu in
-n
-out I use
translateX
translateX
.
The only solution I can think of is conditionally setting each focusable element
's
tabIndex
tabIndex
to
-1
-1
, if menu is closed
. Yet I wonder is it the best solution out here
?
Codepen
:
https://codepen.io/Kamidashi/pen/poQaYvZ
(Just
Tab
Tab
through and you
'll get what I mean
)
CodePen
ᅚKamidashi
poQaYvZ
.
.
.
Kevin Powell - Community
Join
A friendly place for developers to meet other devs, ask questions, get help, and just have a good time 🙂.
36,263
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Recent Announcements
Similar Threads
Was this page helpful?
Yes
No
Similar Threads
Burger menu JavaScript not working
KP-C
Kevin Powell - Community / front-end
3y ago
How to make element not focusable with tab navigation
KP-C
Kevin Powell - Community / front-end
4y ago
revert vs unset & svg focusable attribute
KP-C
Kevin Powell - Community / front-end
16mo ago
How to make a button inside an input
KP-C
Kevin Powell - Community / front-end
3y ago