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: keyboard focus looping issue #158

Merged
merged 6 commits into from
Jan 29, 2024
Merged

Conversation

TSeelig
Copy link
Contributor

@TSeelig TSeelig commented Jan 26, 2024

Resolved an issue where changing focus with keyboard tabbing would focus on un expected element (date-picker__dialog).

Issue

  1. When user expects to switch keyboard focus from close button to previous month button (forward tabbing) they first had to go through the unexpected focus on date-picker__dialog before focusing on previous month button.

  2. When user expects to switch keyboard focus from previous month button to close button (backwards tabbing) they would tab first to date-picker__dialog unexpectedly but then would be unable to tab backwards from there to the close button as focus was essentially stuck on the date-picker__dialog until they switched focus with forward tabbing.

Resolution

  1. On switching focus with forward tabbing focus now goes from close button to previous month button
  2. On switching focus with backward tabbing focus now goes from previous month button to close button

Video demo

date-picker-bug-fixed.mov
date-picker-bug.mov

(at end of above bug demo I am pressing back tab multiple times but it does not go back to the cancel button)

@lewisbirks
Copy link
Collaborator

Are there any tests that you can add that demonstrate the issue and that your solution resolves it?

@TSeelig TSeelig force-pushed the bugfix-keyboard-focus-loop-issue branch 4 times, most recently from 4dcb0f0 to c5e19fa Compare January 26, 2024 14:33
@TSeelig TSeelig force-pushed the bugfix-keyboard-focus-loop-issue branch from c5e19fa to ef606cb Compare January 26, 2024 14:47
package.json Outdated Show resolved Hide resolved
package-lock.json Outdated Show resolved Hide resolved
@TSeelig TSeelig self-assigned this Jan 26, 2024
@TSeelig TSeelig requested a review from lewisbirks January 26, 2024 16:32
@TSeelig TSeelig merged commit fd055d7 into main Jan 29, 2024
3 checks passed
@TSeelig TSeelig deleted the bugfix-keyboard-focus-loop-issue branch January 29, 2024 16:04
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.

2 participants