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

Touch events behave inconsistently with A11y #45

Open
milesflavel opened this issue Jan 5, 2024 · 1 comment · May be fixed by #46 or #47
Open

Touch events behave inconsistently with A11y #45

milesflavel opened this issue Jan 5, 2024 · 1 comment · May be fixed by #46 or #47

Comments

@milesflavel
Copy link
Collaborator

Note: This might be multiple issues, but they all appear to be related to touch events

Using <A11y> and the useA11y() hook, it appears that touch events aren't firing at all* when selecting the mesh (possible that overMesh never gets set true), and a11yState.hovered gets stuck in a true state when selecting the hidden element (overHtml).
(*touching then dragging the mesh causes a11yState.hovered to briefly set true, then immediately set false)

I'm happy to investigate this myself but I'm not having any luck getting the project to build locally ☹️

@milesflavel
Copy link
Collaborator Author

I resolved local build issues and have been able to do some further investigating:

  • Touch events are not bound at all for the hidden html elements (easy fix)
  • hovered/focussed/pressed state is all grouped into a single object (likely not related but suggested against by React team https://legacy.reactjs.org/docs/hooks-faq.html#should-i-use-one-or-many-state-variables)
  • a11yState.hovered briefly going true then false looks to be a desktop Chromium issue (touch emulation not firing until the touch point moves slightly, then touch being cancelled by the browser scrolling)
  • Encountered a bug where calculatePosition was returning NaN for the first projection, causing hidden elements to permanently be stuck at [0, 0]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant