I have the following angular material tab-group:
<mat-tab-group mat-align-tabs="start">
<mat-tab tabindex="0" cdkTrapFocus label="First">Content 1</mat-tab>
<mat-tab tabindex="1" cdkTrapFocus label="Second">Content 2</mat-tab>
<mat-tab tabindex="2" cdkTrapFocus label="Third">Content 3</mat-tab>
</mat-tab-group>
(from here )
Currently, I must improve the a11y aspects of this, and the request is that the user should be able to navigate the tabs with the "Tab" button on the keyboard. The default way in material is that you can only focus the "tab-group" as a whole, and then can select the mat-tabs with the arrow keys.
Is there any way to change this? To integrate the tabs themselves into the focus order instead of the groups?
You can see I have tried cdkTrapFocus and tabIndex as well but no luck. I also tried removing the mat-tab-group but strangely only the first mat-tab gets focus that way too.