Re: [csswg-drafts] Add hover/focus/long-press triggering delays to CSS (#9236)

Hello, I'd like to ping this issue as the result of a good discussion we just had in OpenUI related to the delays discussed on this issue:

https://github.com/openui/open-ui/issues/963#issuecomment-1856462744

There are a number of things discussed there, including the concept of a safe-area triangle. But related to this issue, a few interesting things were discussed. First, it does seem that folks like the idea of allowing CSS to control these delays, independently for the "show" and "hide" actions. In addition, we had a good discussion about specifying the delays themselves. As background, there are several issues with these delays:

- There likely need to be different delays between mouse, keyboard, and "other" input modalities. E.g. hovering with a mouse might need a longer delay than focusing an element with the keyboard. Things like eye tracking might need a separate way of thinking about delays entirely.
- There likely need to be different delays between hovering and de-hovering an element. You might want a longer de-hover delay, for example, so it's easy to get to the element before it goes away.
- It seems that most often, the choice of a particular delay should lie with the **user** rather than the **developer** since some folks prefer fast moving interfaces and others prefer more time to get around the screen.
- Having said the above, the developer also has a preference, since some interfaces are more naturally fast-moving (think of a game console or other fast-action UI) and others are less so (e.g. tooltips on Wikipedia).

Given the above constraints, the new idea is to specify the delays not as actual time values, but as **"slow"** or **"fast"**, etc. So:

```css
button[interesttarget] {
  interest-delay: [none|slow|normal|fast] [none|slow|normal|fast];
  /* interest-delay: interest-delay loseinterest-delay */
}
```

It would then be up to the UA to determine how to resolve "slow" into an actual delay value in seconds. The UA could also offer a user preference like "Minimal delays please" which would then reduce the delay value for all settings, or "I want more time" to increase them.

Thoughts? Suggestions?

-- 
GitHub Notification of comment by mfreed7
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9236#issuecomment-1856504943 using your GitHub account


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

Received on Thursday, 14 December 2023 20:03:50 UTC