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

Suggest adding a isCoarse property? #40

Open
mattrq opened this issue Apr 26, 2022 · 0 comments
Open

Suggest adding a isCoarse property? #40

mattrq opened this issue Apr 26, 2022 · 0 comments

Comments

@mattrq
Copy link

mattrq commented Apr 26, 2022

Similar to issue Suggest adding a firesHoverEvents property

Suggests that a property isCoarse boolean is added to allow accurate handling of different pointer-based input devices.
There are a number of benefits that this allows for by allowing to changing the behaviour based on the support for hover for user interaction and better accessibility handling.

The current methods to detect hover support are not always accurate:

  1. Using CSS media queries: The cross-browser support and reliability of those are mixed. A negative query may indicate no support for the query or the current device doesn't support hover.
  2. The PointerEvent.pointerType can help by making assumptions for "mouse" (precise input) and "touch" (coarse input), however "pen" may or may not support hover depending on the type of pen in-use.
  3. Assuming that fireTouchEvents!==true means that the input is precise.

Example scenarios:

  • Different forms of pen inputs have very different capabilities.
  • Laptop with mouse and trackpad but coarse input due to accessibility.
@mattrq mattrq changed the title Suggest adding a firesCoarseEvents property? Suggest adding a isCoarse property? Apr 27, 2022
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

No branches or pull requests

1 participant