Feature request.
I want to be able to set mat-tabs tabindex values declaratively.
tabindex value of the first md-tab item is 0 by default and others are -1 and I can't change it.
This came from keyboard accessibility requirements that have explicit tabindex implementation. For example, I have one tabindexed block before mat-tab-group (say, 300 - 308) and another one after (500-504). And I need the first (active) md-tab to have tabindex 400.
Another use case is to have a possibility to switch between md-tabs by TAB key pressing.
Closing as you are able to set the current tab index using the selectedIndex attribute on mat-tab-group as seen here
@josephperrott This does not solve native tabindex attribute issue. No matter of selectedIndex on mat-tab-group the real tabindex on real DOM elements would be 0 (if active) or -1 (inactive). And explicit tabindex keyboard accessibility implementation would be broken.
Also, it does not help with md-tabs TAB key switching (per -1 tabindex attribute value if inactive). Maybe this one should be extracted into a separate issue.
If you have no plans to support native tabindexes manipulation, the issue could stay closed with appropriate comment. Currently it seems there is some misunderstanding...
Not good to affect native tabindex behavior. This affects accessibility.
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._
Most helpful comment
@josephperrott This does not solve native
tabindexattribute issue. No matter ofselectedIndexonmat-tab-groupthe realtabindexon real DOM elements would be 0 (if active) or -1 (inactive). And explicit tabindex keyboard accessibility implementation would be broken.Also, it does not help with
md-tabsTAB key switching (per -1tabindexattribute value if inactive). Maybe this one should be extracted into a separate issue.If you have no plans to support native tabindexes manipulation, the issue could stay closed with appropriate comment. Currently it seems there is some misunderstanding...