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

♿️ Add focus trap to the menu #955

Merged
merged 7 commits into from Jan 9, 2022

Conversation

johannchopin
Copy link
Collaborator

Description

Added a focus trap to the menu to that the user can't tab somewhere else in the hidden page. Use the react component base on focus-trap who seems trustworthy.

Tests

  • All tests passed.

@vercel
Copy link

vercel bot commented Jan 8, 2022

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/carloscuesta/gitmoji/6wbyxKHbqozhfzeC1Fq49A2NYW4D
✅ Preview: https://gitmoji-git-fork-johannchopin-feature-a11n-menu-carloscuesta.vercel.app

Copy link
Owner

@carloscuesta carloscuesta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey! That's a great improvement thanks 😊

A small detail with the dependencies

package.json Outdated Show resolved Hide resolved
@carloscuesta
Copy link
Owner

I was testing this was Safari and seems to not work properly, the menu is always open and you can't close it 😅

Screen Shot 2022-01-09 at 10 59 52

@johannchopin
Copy link
Collaborator Author

johannchopin commented Jan 9, 2022

@carloscuesta Outch really sorry 😓 seems that we can't use the dialog balise for now:

image

I removed it and seems to work properly now. However the tabulation doesn't work in safari and firefox (but it is already the case in https://gitmoji.dev/). Will need to investigate waht this browsers need to handle tabulation.

Copy link
Owner

@carloscuesta carloscuesta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! 😍

@carloscuesta carloscuesta merged commit 15ccc71 into carloscuesta:master Jan 9, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants