← Back to release summary
Interest Invokers (the `interestfor` attribute)
- Category
- DOM
- Type
- New or changed feature
- Status
- Origin trial (Chrome 142)
- Intent stage
- None
Summary
This feature adds an `interestfor` attribute to <button> and <a> elements. This attribute adds "interest" behaviors to the element, such that when the user "shows interest" in the element, actions are triggered on the target element, such as showing a popover. The user agent will handle detecting when the user "shows interest" in the element, via methods such as hovering the element with a mouse, hitting special hotkeys on the keyboard, or long-pressing the element on touchscreens. When interest is shown or lost, an `InterestEvent` will be fired on the target, which have default actions in the case of popovers - showing and hiding the popover.
Motivation
The `popover=hint` feature (https://chromestatus.com/feature/5073251081912320, shipped in M133) provides "half" of the features needed to build declarative tooltips, hovercards, and menus. The missing piece is the invocation of those UX elements on hover, keyboard activation, or long-press. This feature fills that gap.
Standards & signals
- Specification: https://github.com/whatwg/html/pull/11006
- Firefox: Neutral — The comments are generally supportive, but without going so far as to mark the issue with "Support". The general tone is supportive of "option 3", which is the one being pursued, to add an item to the context menu on mobile interfaces.
- Safari: Negative — This position is not explicitly marked as negative, but the comments (including in the linked HTML issue) are negative: "We therefore remain opposed to this feature"
- Web developers: Strongly positive — See the linked comment, for a summary of developer opinions from multiple venues. Developers are highly positive on this feature, recognizing the fact that 94+% (https://docs.google.com/spreadsheets/d/11Bt_FCAqu1hd5llGRGpzgwlgHaqLmOC4SJEMRtNQY-g/edit?gid=0) of top-50 production sites use some form of hover-triggered UI.
- Tracking bug: https://issues.chromium.org/issues/326681249
Explainers: https://open-ui.org/components/interest-invokers.explainer
View on chromestatus.com