Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/thawkin3/accessible-drag-and-drop

This project is meant to teach software engineers how to create drag and drop functionality in React. It includes good examples and bad examples.
https://github.com/thawkin3/accessible-drag-and-drop

a11y accessibility drag-and-drop javascript react

Last synced: 16 days ago
JSON representation

This project is meant to teach software engineers how to create drag and drop functionality in React. It includes good examples and bad examples.

Awesome Lists containing this project

README

        

# Accessible Drag and Drop

This project is meant to teach software engineers how to create accessible drag and drop functionality in React. It includes good examples and bad examples.

This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).

## Main Takeaways

1. Drag and drop functionality is inherently inaccessible because it requires the use of a mouse and fine motor control.
2. Drag and drop functionality needs to be accessible for mouse users, keyboard users, and screen reader users.
3. Keyboard users should be able to activate drag and drop mode and use the arrow keys to move items.
4. Screen reader users should have adequate instructions and communication to know how to interact with the drag and drop functionality and also to know what is happening throughout the interaction.
5. There are many third-party libraries that implement drag and drop functionality, all with varying levels of accessibility support.

## Available Scripts

In the project directory, you can run:

- `build`: Builds the app
- `eject`: Ejects the app from using react-scripts
- `format`: Formats the code using Prettier
- `format-watch`: Formats the code using Prettier in watch mode
- `start`: Starts the app in development mode
- `test`: Runs the tests in watch mode

## Resources

- [react-sortable-hoc](https://github.com/clauderic/react-sortable-hoc)
- [dnd-kit](https://github.com/clauderic/dnd-kit)
- [react-dnd](https://github.com/react-dnd/react-dnd/)
- [react-beautiful-dnd](https://github.com/atlassian/react-beautiful-dnd)