Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix disabled, selected Tab in TabList from impeding keyboarding navigation when trying to tab in #3235

Merged
merged 8 commits into from
Nov 29, 2023

Conversation

lawrencewin
Copy link
Contributor

Platforms Impacted

  • iOS
  • macOS
  • win32 (Office)
  • windows
  • android

Description of changes

Currently, whenever a selected tab becomes disabled, this prevents keyboard users from switching focus to the TabList and any other elements after.

This PR fixes this by setting the defaultTabbableElement of the TabList's focus zone to the next available Tab if a selected tab becomes disabled. In the edge case where every tab is disabled, the TabList's state will become disabled and focus should skip the TabList entirely.

Verification

New Behavior:
https://github.com/microsoft/fluentui-react-native/assets/15683103/7395c4d1-1085-4b19-a5e5-1716f7a27122

Pull request checklist

This PR has considered (when applicable):

  • Automated Tests
  • Documentation and examples
  • Keyboard Accessibility
  • Voiceover
  • Internationalization and Right-to-left Layouts

If a selected tab manages to be disabled, the user cannot change
keyboard focus to the tablist or any element beyond that. This commit
fixes the issue.
@lawrencewin lawrencewin requested a review from ksiler November 15, 2023 00:14
@lawrencewin lawrencewin requested a review from a team as a code owner November 15, 2023 00:14
@lawrencewin lawrencewin merged commit bdfa459 into microsoft:main Nov 29, 2023
@lawrencewin lawrencewin deleted the tablist-disabled-tab-bug-fix branch November 29, 2023 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants