Activation
Manual by default
Manual activation
PanelControl allows users to move focus with arrow keys and commit with Enter / Space / click (activation: 'manual').
Key Features
- This is our most important feature ever!
Pricing Plans
- Starter Plan: Whenever you don’t want to pay a lot.
- Professional Plan: Ideal for managers who like to spend money!
Support Options
- If you send us an email, we will probably ignore it.
- We don’t even have a community forum.
- Opening an issue on GitHub is your next best option. Or even better: PR’s! You do the work!
Auto activation
It is also possible to enable auto activation. This allows users to activate a tab as they arrow across, without needing to press Enter / Space / click (activation: 'auto'). Set data-activation="auto" (or init({ activation: 'auto' })) to enable this behaviour.
Key Features
- This is our most important feature ever!
Pricing Plans
- Starter Plan: Whenever you don’t want to pay a lot.
- Professional Plan: Ideal for managers who like to spend money!
Support Options
- If you send us an email, we will probably ignore it.
- We don’t even have a community forum.
- Opening an issue on GitHub is your next best option. Or even better: PR’s! You do the work!
PanelControl.init({ activation: 'auto' });
// or per control, in markup:
// <div role="tablist" data-panelcontrol data-activation="auto">
Arrow protection (from auto back to manual)
auto falls back to manual whenever activating-on-arrow would hurt: when the PanelSet uses autoFocus (focus would jump into the panel, out of the strip) or loads content asynchronously (every keystroke would fire a load). The autoFocus check covers the JS option, data-auto-focus on the set, and data-auto-focus on any individual tab.
This strip asks for data-activation="auto" too, but its PanelSet has data-auto-focus="input". So PanelControl quietly keeps it manual: Tab into the strip and arrow across. The panel stays put. Press Enter to switch, and watch focus drop into the field. That focus-stealing on every arrow is exactly what auto avoids here.
Account
Profile
Confirm
Nothing to focus here, so activating this one leaves focus on the tab.