Open dgreene1 opened 2 years ago
I believe this feature has been implemented but on the Tabs
component instead of the Tab
itself by enabling the automatic prop. The Configurable Tabs Demo can be used to preview that functionality and with the persistent
flag as well. Maybe it would be better for me to simplify the example and showcase the selection mode as a separate demo.
That being said, I like the activationMode: "manual" | "automatic"
naming more than automatic: boolean
, so I'll probably rename that prop in the future.
Is your feature request related to a problem? Please describe.
When using a keyboard to navigate tabs, the new tab does not become active until you press enter or space.
W3 says:
(link)
Describe the solution you'd like A clear and concise description of what you want to happen.
A new property would be added to TabProps called
activationMode
that would be of type"automatic" | "manual"
. This property would be optional and would default to "manual" since that is the current behavior.When
activationMode: "automatic"
, if you pressed the right arrow key on the keyboard to cycle through the tabs, the tab panel that is associated with that tab would be shown.We can consider linking this feature to the
persistent
flag since the W3 quote above shows that you shouldn't use automatic activation unless the component has been pre-rendered.Describe alternatives you've considered
I haven't considered any other options.
Additional context none