Re: [vibration] Update implementation report (#33)

@reillyeon, here you go. Please feel to use as the basis. 

## Implementation Report for the W3C's Vibration API

**Date:** June 8, 2024

### Test suite

The tests were conducted on 8 June 2024 using the test cases from [https://wpt.live/vibration/](https://wpt.live/vibration/). The testing devices included a Pixel 7 running Android 14 for Chrome for Android and Firefox for Android, and an iPhone 15 running iOS 17.4.1 for Safari.

#### Manual Tests
| Test                             | Chrome for Android (125.0.6422, Blink) | Firefox for Android (126.0.1, Gecko) | Safari on iOS 17.4.1 (WebKit) |
|----------------------------------|-----------------------------------------|--------------------------------------|------------------------------|
| cancel-when-hidden-manual.html   | Pass                                    | Fail                                 | Fail                         |
| cancel-with-0-manual.html        | Pass                                    | Fail                                 | Fail                         |
| cancel-with-array-0-manual.html  | Pass                                    | Fail                                 | Fail                         |
| cancel-with-empty-array-manual.html | Pass                                 | Fail                                 | Fail                         |
| cancel-with-new-manual.html      | Pass                                    | Fail                                 | Fail                         |
| pattern-array-extra-manual.html  | Pass                                    | Fail                                 | Fail                         |
| pattern-array-manual.html        | Pass                                    | Fail                                 | Fail                         |
| pattern-array-with-0-manual.html | Pass                                    | Fail                                 | Fail                         |
| simple-array-manual.html         | Pass                                    | Fail                                 | Fail                         |
| simple-scalar-manual.html        | Pass                                    | Fail                                 | Fail                         |
| **Pass/Fail Ratio**              | **10/10**                               | **0/10**                             | **0/10**                     |

#### Automated Tests
| Test                | Chrome for Android (125.0.6422, Blink) | Firefox for Android (126.0.1, Gecko) | Safari on iOS 17.4.1 (WebKit) |
|---------------------|-----------------------------------------|--------------------------------------|------------------------------|
| api-is-present.html | Pass                                    | Pass                                 | Fail                         |
| idlharness.window.js| Pass                                    | Pass                                 | Fail                         |
| invalid-values.html | Pass                                    | Pass                                 | Fail                         |
| silent-ignore.html  | Pass                                    | Pass                                 | Fail                         |
| **Pass/Fail Ratio** | **4/4**                                 | **4/4**                              | **0/4**                     |

### W3C Process questions relating to implementation experience

Please see [implementation experience](https://www.w3.org/2023/Process-20231103/#implementation-experience).

#### Is each feature of the current specification implemented, and how is this demonstrated?
- Basic API features are implemented in Chrome for Android (Blink) and Firefox for Android (Gecko), as shown by the automated tests. All manual tests failed in Firefox for Android (Gecko) and Safari on iOS (WebKit), showing incomplete implementation in Firefox for Android and no implementation in Safari on iOS.

#### Are there independent interoperable implementations of the current specification?
- No, interoperability is not achieved. Manual tests fail on Firefox for Android (Gecko) and Safari on iOS (WebKit), and pass solely on Chrome for Android (Blink).

#### Are there implementations created by people other than the authors of the specification?
- Yes, implementations exist by independent developers. For Chromium (Blink), see [NavigatorVibration.cpp](https://chromium.googlesource.com/chromium/src/+/11eca67f18be0dfbfcb1703a21abb454e5f85b05/third_party/WebKit/Source/modules/vibration/NavigatorVibration.cpp). For Gecko, see [Navigator.cpp](https://github.com/mozilla/gecko-dev/blob/master/dom/base/Navigator.cpp), specifically [Navigator::Vibrate](https://github.com/mozilla/gecko-dev/blob/8c8585c629ae50fd85a1f003724e339649b346c1/dom/base/Navigator.cpp#L816).

#### Are implementations publicly deployed?
- Yes, Chrome for Android (Blink) and Firefox for Android (Gecko) are publicly deployed. Safari on iOS (WebKit) does not implement the API.

#### Is there implementation experience at all levels of the specification’s ecosystem (authoring, consuming, publishing…)?
- Chrome's [use counter](https://chromestatus.com/metrics/feature/timeline/popularity/850) for navigator.vibrate() shows usage between 0.06% and 0.08% from 2022-2024, primarily for feature detection. The provided list of 148 URLs from Chrome's use counter mostly includes online pharmacy sites, adult websites, link farms, and low-quality sites. Sites showing real use of the API are difficult to find, indicating low value. Feature detection is frequent in code repositories (see [GitHub code search](https://github.com/search?q=navigator.vibrate+language%3AJavaScript&type=code&l=JavaScript)). The API was removed from WebKit on May 11, 2017 (see [changeset 216696](https://trac.webkit.org/changeset/216696/webkit)) over concerns of user annoyance and API misuse. In Gecko, the API does nothing in Firefox for Android due to a missing permission, with concerns about user annoyance and misuse cited as reasons for disfavor (see [GitHub issue](https://github.com/mozilla/standards-positions/issues/907)).

#### Are there reports of difficulties or problems with implementation?
- Yes, there are significant issues. All manual tests fail on Firefox for Android (Gecko) and Safari on iOS (WebKit). Safari on iOS also fails all automated tests, indicating no implementation and support for the Vibration API on iOS.


-- 
GitHub Notification of comment by marcoscaceres
Please view or discuss this issue at https://github.com/w3c/vibration/issues/33#issuecomment-2155824699 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Saturday, 8 June 2024 05:52:26 UTC