web-components icon indicating copy to clipboard operation
web-components copied to clipboard

[a11y-base] Move long touch gesture from context-menu to the base package

Open web-padawan opened this issue 2 years ago • 0 comments

Describe your motivation

Because of historical reasons, vaadin-context-menu registers a Polymer gesture handler to deal with iOS:

https://github.com/vaadin/web-components/blob/bc227bd848d1ff35a4d719ee64740587c91bd0ce/packages/context-menu/src/vaadin-contextmenu-event.js#L60-L73

We might want to re-use this logic with other components e.g. vaadin-tooltip on mobile or something else.

Describe the solution you'd like

  1. Move vaadin-contextmenu-event.js file to @vaadin/a11y-base package,
  2. Try to improve test coverage, even though we don't test on iOS Simulator,
  3. Check out React Aria's useLongPress hook implementation for more ideas.

web-padawan avatar Mar 17 '23 09:03 web-padawan