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

Unable to navigate in EntryModal by keyboard #811

Open
derBretti opened this issue Jan 3, 2022 · 0 comments
Open

Unable to navigate in EntryModal by keyboard #811

derBretti opened this issue Jan 3, 2022 · 0 comments

Comments

@derBretti
Copy link

Type: minor

Description
In the 'Login' modal, only the first link is accessible by keyboard, since any KeyDown event triggers the underlying action and therefore the next element cannot be focused by using the tab key. The same logic prevents users in the 'SignUp' and 'ForgotPassword' modal from focusing a different element once they have focused one of the links there.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Sign In'
  2. Try to focus an element below 'Forgot Password?' by using the tab key
  3. The 'Forgot Password' modal is opened when the 'Forgot Password?' link is focused and the tab key is pressed

Expected behavior
All neccessary elements can be focused by using the tab key and activated by hitting enter.

Proposed solution
Check which key is pressed in the event handler function, e.g. instead of
onKeyDown={handleForgotPasswordClick}
use
onKeyDown={(e) => e.key === "Enter" && handleForgotPasswordClick()}

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

No branches or pull requests

1 participant