Skip to content

Fix keyboard trap #277

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

Merged
merged 1 commit into from
Jul 25, 2023

Conversation

julian-carvajal-gh
Copy link
Contributor

Currently, if you visit haskell.org and attempt to navigate with the keyboard, you will find that it's impossible to go through the entire page. This is a major a11y concern, as many users rely on keyboard navigation, often with a screen reader, to navigate sites. Closes #10.

Summary of changes: This diff handles the pressing of the "tab" key by removing focus from the current element using the blur (bad name, IMO) method, and removing the current doComplete callback on tab. I also made sure the right styling is applied when focusing on the console by tabbing.

Testing

  • Browsers used: Firefox, Chrome
  • I tabbed through the document and made sure we can land on and leave the console. When focused on the console, it should apply the correct styles and allow us to start typing commands. See attached video.
  • In Chrome, the "Accessibility Insights for Web" extension helped me visualize what the tab "steps" were.

Out of scope:

  • Next to the console there are buttons to quickly insert commands like "help" by clicking on them. These weren't navigable to before, and that's not addressed here.
  • I don't have a screen reader currently set up, so I don't know what a user would hear when focusing on the console. Probably something like "text area"

N.B. The code for this feature is ancient, and likely uses deprecated methods/patterns.

focus-in-away-tab.webm

@TikhonJelvis
Copy link
Member

Thanks for catching this too!

I just started working at a company that does some accessibility scanning. I should see what problems our product can currently detect on haskell.org...

@julian-carvajal-gh
Copy link
Contributor Author

My pleasure! Please tag me if you share the output from your product. I'd love to help fix any other accessibility issues.

@TikhonJelvis TikhonJelvis merged commit 527507e into haskell-infra:master Jul 25, 2023
@julian-carvajal-gh julian-carvajal-gh deleted the keyboard-trap branch July 25, 2023 05:17
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.

Haskell.org homepage has poor accessibility
3 participants