Skip to content

Vibration API #718

Closed
Closed

Description

@shalanah

Description

Haptics are vital to games + professional feel of buttons, switches, and other user input for mobile/tablet web.

Since Vibration API's inception on Android (launched in Firefox, 12 years ago), I haven't heard of a single real user complaint. Reasonable guardrails on Vibration API are welcome.

iOS 18.0 WebKit has added non-standard haptics to switch checkbox elements (and only to switch inputs?) displaying a need for haptics and how incongruous it is to exclude haptics from touch devices on the web.

Specification

https://www.w3.org/TR/vibration/

Additional Signals

https://stackoverflow.com/questions/56926591/navigator-vibrate-break-the-code-on-ios-browsers

Activity

  1. BenjaminAster commented on Sep 18, 2024

    @BenjaminAster

    Note that WebKit actively opposes this API, so it's very unlikely that this will get accepted for Interop.

  2. shalanah commented on Sep 18, 2024

    @shalanah
    Author

    @BenjaminAster They've added haptics to switch elements for iOS Safari 18.0 so maybe they're ready to reconsider.

  3. evanjacover commented on Oct 7, 2024

    @evanjacover

    At Jackbox Games we use vibration on supported browsers to enhance the playability of our games. Players interact with the games via the website jackbox.tv. Vibration is used to let players know it's their turn, Provide notification-like event feedback and other quality-of-life improvements to gameplay. (For more context on how our games use a website as a controller for console/PC games, see here: https://www.jackboxgames.com/how-to-play)

  4. AshleyScirra commented on Oct 7, 2024

    @AshleyScirra

    This would be useful for games made in Construct so we support this.

  5. nondebug commented on Oct 8, 2024

    @nondebug

    Additional interop-related frustration signals:

  6. marcoscaceres commented on Oct 8, 2024

    @marcoscaceres

    WebKit remain firmly against this API. The API is too limited and won't give developers the haptics they need (i.e., this not an iterop issue). The web needs better haptics support, but Vibration API is not the solution. This will require some new solution, which will require incubation and standardization.

    For gamepad haptics, please use the gamepad API.

  7. marcoscaceres commented on Oct 8, 2024

    @marcoscaceres

    iOS 18.0 WebKit has added non-standard haptics to switch checkbox elements

    Note that it's not correct to say these are "non-standard", as they may be following OS/platform convention for the switch/input types. Also, there's nothing in HTML (AFAIK) that defines how inputs should "feel" vs how they look - and even for how they look, that's also left up to the platform.

  8. shalanah commented on Oct 8, 2024

    @shalanah
    Author

    There is no web standard for adding switch attribute to an input apart from WebKit announcing it.

    I don't think the absence of "haptics" or "sound" (or some other unnamed dimension) in a standard means that those are fair game by the platform. Especially if there is no way to clear or modify the additional dimension like we have for appearance.

  9. wpt-interop commented on Feb 13, 2025

    @wpt-interop
    Collaborator

    Thank you for proposing Vibration API for inclusion in Interop 2025.

    We wanted to let you know that this proposal was not selected to be part of Interop this year.

    On behalf of the entire Interop team, thank you for submitting this proposal for consideration. We got many more proposals than we could include in this year's project, necessitating some difficult choices. Please note this should not be taken as a comment on the technology as a whole, or our willingness to consider it for Interop in the future. We appreciate the work you put into your proposal, and would welcome your participation in future rounds of Interop.

    For an overview of our process, see proposal selection. Thank you again for contributing to Interop 2025.

    Posted on behalf of the Interop team.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    focus-area-proposal

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions