- From: Robert Flack via GitHub <noreply@w3.org>
- Date: Tue, 21 Apr 2026 14:04:30 +0000
- To: public-css-archive@w3.org
If haptics are meant to be responsive to inputs, I think that we should consider an API shape that is more strongly coupled to an input. E.g.
```css
.scroller {
scroll-snap-haptic: tick;
}
button {
click-haptic: ...;
}
```
For the imperative model, perhaps a good way to make sure that haptics are input-associated is that they be events on the event object, e.g.
```js
button.addEventListener(click, (evt) => {
evt.playHaptics(effect, intensity);
});
```
This would help avoid situations where the user happens to be using a haptic capable input device when the page calls `navigator.playHaptics` and getting feedback.
--
GitHub Notification of comment by flackr
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/13728#issuecomment-4289157493 using your GitHub account
--
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Tuesday, 21 April 2026 14:04:31 UTC