-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Description
Feature Description
When using MatTabGroup with manual tab activation, focus returns to the last arrow-key-focused tab when a user re-enters the tab list via the Tab key. I understand this is intentional roving tabindex behavior #14194.
Possible Solution
Since I understand the current behavior is intended, we could implement an input focusActivatedTabOnReturn set to false by default but if set to true we would restore focus to the currently selected tab when the user returns focus to the tab-group.
Use Case
However this creates an accessibility scenario for keyboard-only users when they select a tab, user moves across tabs with arrow keys, then moves away from the tab-group and finally they circle back to the tab-group they will land on the last focused tab.
This behavior departs from the WAI-ARIA APG Tabs Pattern which states:
When focus moves into the tab list, places focus on the active tab element.
APG Tabs Pattern
Personally I encountered this issue while working with an application with strict accessibility compliance requirements and had to patch it which in my opinion is a bit fragile and not sustainable (on our side).