← 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

Explainers: https://open-ui.org/components/interest-invokers.explainer

View on chromestatus.com