Description
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:
It is recommended that tabs activate automatically when they receive focus as long as their associated tab panels are displayed without noticeable latency. This typically requires tab panel content to be preloaded. Otherwise, automatic activation slows focus movement, which significantly hampers users' ability to navigate efficiently across the tab list. For additional guidance, see § 6.4 Deciding When to Make Selection Automatically Follow Focus.
(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