Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

MDC Tab Bar: Make manual activation the default behavior #3286

Closed
kfranqueiro opened this issue Aug 2, 2018 · 1 comment
Closed

MDC Tab Bar: Make manual activation the default behavior #3286

kfranqueiro opened this issue Aug 2, 2018 · 1 comment

Comments

@kfranqueiro
Copy link
Contributor

kfranqueiro commented Aug 2, 2018

(See https://www.w3.org/TR/wai-aria-practices/#tabpanel for info and examples on automatic vs. manual activation.)

Currently the new MDC Tab Bar implements automatic activation (each tab activates as soon as you focus it with the arrow keys). However, this risks many "drive-by" requests in cases where the Tab Bar governs content that is asynchronously requested on Tab activation. The default behavior should be manual activation (press space/enter to activate a tab after focusing it with the arrow keys) to avoid risking this situation. Mouse/touch interaction behavior should remain unaffected.

If possible, it'd be nice to still provide an option for automatic activation.

@kfranqueiro
Copy link
Contributor Author

The current implementation is going to need to be revised quite a bit to make this work...

Currently, both mdc-tab-bar and mdc-tab make assumptions that activation is directly tied to focus - so much so, that activation actually drives the setting of the tabindex attribute (i.e. focus happens in reaction to activation, which is the reverse of how this should function). We're going to need to revise logic in at least 2 packages to accomplish this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants