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

Don't let users Tab to other elements when dragging #17

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ayy-bc
Copy link

@ayy-bc ayy-bc commented Sep 26, 2023

When drag and drop mode is turned on (i.e an item is being dragged ~ isDragging() is true) ensure that users cannot tab to other elements on the screen.

Note: I was thinking of adding tests for this but saw that we didn't have any testing library for react-dnd-accessible-backend. Is there any preference? I was thinking of installing Jest for unit tests but wanted to make sure that its okay before making any changes on that. I can start a follow-up PR to add some tests around some of these things if we can finalize a library to use.

@ayy-bc
Copy link
Author

ayy-bc commented Sep 26, 2023

Would love to get your thoughts on this @faultyserver @mzlock

Thanks a ton for this amazing library

@kendallgassner
Copy link
Contributor

@ayy-bc I wonder if it would be better to create a container component that developers could wrap around their drag and drop container. Perhaps using the useFocusTrap Primer hook.

The hook would have disabled={true} if drag and drop mode is not turned on. Thoughts?

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