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

Navigating on mouse down is bad for accessibility #49

Open
joshuajaco opened this issue Oct 21, 2024 · 1 comment · May be fixed by #61
Open

Navigating on mouse down is bad for accessibility #49

joshuajaco opened this issue Oct 21, 2024 · 1 comment · May be fixed by #61

Comments

@joshuajaco
Copy link

Navigating on mouse down instead of mouse up is bad for accessibility for several reasons:

  1. It breaks the ability to drag and drop links.
  2. You cannot "cancel" the navigation. (I often click something and, before releasing, realize I wanted to click something else.)
  3. It can cause scrolling issues on mobile, where I only want to scroll but accidentally trigger navigation.

People expect links to work on mouse up and have adapted their workflows accordingly.

Relevant code: https://github.com/ethanniser/NextMaster/blob/24f8acae72bfb1bb7969b86b002f3a2a9c3cdc06/src/components/ui/link.tsx#L105

@joshuajaco joshuajaco changed the title Navigating on mouse down is bad accssibility Navigating on mouse down is bad for accessibility Oct 21, 2024
@joshuajaco joshuajaco linked a pull request Oct 22, 2024 that will close this issue
@dvartic
Copy link

dvartic commented Oct 27, 2024

It's a tradeoff.

  1. Don't drag and drop links.
  2. Revert your action through other means.
  3. Mousedown on mobile gets triggered the same as click: when you lift your finger son there are no issues here.

People expecations should not dictate potential improvements.

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 a pull request may close this issue.

2 participants