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

Some dialogs ("Email Settings", "Unenroll") not keyboard navigable. #2075

Closed
ChristopherChudzicki opened this issue Jan 30, 2024 · 3 comments · Fixed by #2079
Closed

Some dialogs ("Email Settings", "Unenroll") not keyboard navigable. #2075

ChristopherChudzicki opened this issue Jan 30, 2024 · 3 comments · Fixed by #2079
Assignees
Labels
bug Something isn't working product:mitx-online

Comments

@ChristopherChudzicki
Copy link
Contributor

Expected Behavior

Dialog buttons should be actionable via keyboard.

Current Behavior

Dialog buttons not keyboard navigable

Steps to Reproduce

This issue seems to affect both the "Email Settings" and "Unenroll" dialogs on dashboard page.

  1. Visit https://mitxonline.mit.edu/dashboard/
  2. Click (or navigate via keyboard) to the ... icon on one of the course cards.
  3. From the dropdown menu, click "Unenroll" (or "Email Settings")
  4. Navigate the dialog with keyboard controls. With any of the buttons focused, press "Enter". The button should activate but it does not.

Possible Solution

This should be double checked, but:

  • The button elements all seem to be real buttons (using a <div role="button"> is one source of similar issues)
  • The event handlers seem to be attached with onClick, not with something like onPointerUp, which would also cause this.

Button element click handlers should be firing on "click" events, so I'm confused. Perhaps there is some other keyboard-only event handler that is interfering with the events?

@ChristopherChudzicki ChristopherChudzicki added the bug Something isn't working label Jan 30, 2024
@ChristopherChudzicki
Copy link
Contributor Author

Screenshot 2024-01-29 at 8 04 31 PM

@collinpreston
Copy link
Contributor

Could be related to jaredpalmer/formik#2468.

@collinpreston
Copy link
Contributor

@ChristopherChudzicki, I've created a branch with changes which do the following:

  1. Pressing escape closes the modal (worked as before).
  2. Pressing enter submits the modal, regardless of which button is focused via keyboard navigation.

I think the functionality of #2 above is correct based on what I read here: https://accessibility.asu.edu/articles/forms. The accessibility requirements for a modal containing a form are difficult to narrow down.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working product:mitx-online
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants