Reevaluate tab navigation interaction pattern
See original GitHub issueWe currently support two interaction patterns for our tabs component: tablist + tab + tabpanel, and nav + anchor.
We’ve received feedback that the nav + anchor pattern can be confusing, since it looks like tabs, but behaves differently. Furthermore, if these two interaction patterns are mixed, the inconsistency can be confusing for users. These issues would affected users with some degree of vision that use assistive technology to supplement their experience.
We should explore ways to reduce or eliminate the confusion here. Some options include (but are not limited to):
- Eliminate the nav + anchor pattern and exclusively use tablist + tab + tabpanel. (i.e. deprecate and remove
MatTabNavBar
) - Change the visuals of the nav + anchor pattern such that it’s more visually distinct
- Keep both patterns, but add additional guidance and/or checks to ensure that users aren’t introducing confusing behaviors, such as assertions that nav-tabs apply focus management or warning if both are used in the same app.
- Change nav-tabs to use tablist + tab while still using anchor elements and routing for the content (i.e., keep
MatNavTabBar
, but change its interaction pattern)
It’s worth mentioning that using anchors is desirable for use cases where you want the URL to change and/or want to support opening in new browser tabs. Using routing to drive tab navigation also easily fits into Angular’s route-based lazy-loading system.
cc @zelliott
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:7 (1 by maintainers)
Top GitHub Comments
Yeah, that was what I meant to convey; I updated the original to clarify.
Based on some of those examples, I have a feeling it would be worth raising this to the Material Design team to explore option two above (changing the visuals of nav tabs) so that, while they kind of look like tabs in general, they’re distinctive from the thing that the specification calls tabs (i.e., introduce a new component).
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.