Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

onTap does not recognize longer taps #8326

Copy link
Copy link
Open
@phlogios

Description

@phlogios
Issue body actions

Is your feature request related to a problem? Please describe.

The onTap event is only triggered by short taps where the finger is released quickly. If you hold down the finger for too long, the onTap event gets cancelled. In terms of accessibility (weak fingers, loss of tactile sensitivity, bad eyesight) and external consistency (compare to standard tap events on Android and iOS built-in apps), this is undesirable. Imagine a user that has weakened fingers due to for example multiple sclerosis, who adopts a usage pattern where buttons are tapped for seconds at a time to ensure that the button was hit.
There is a longPress event but that does not trigger on release like onTap so it does not solve the problem.

Describe the solution you'd like

The onTap event should not be cancelled by default for longer presses.

Describe alternatives you've considered

A workaround for that worked for us is to use the touch event instead of onTap, and check if the action type was "up".
This is what it looks like in vue in the context of a RadListView:

<Ripple
        @touch="onItemSelected($event, index)"
        ...


private onItemSelected(event, index): void {
        if (event.action === "up") {
                //Do the thing
        }
}

Additional context

Relevant WCAG guideline: https://www.w3.org/TR/WCAG21/#pointer-cancellation

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.