Re: [csswg-drafts] Add an `::interest-button` pseudo element to interest invokers (#12437)

A few interesting things from the discussion this morning:
- There wasn't a ton of support for stopping event propagation entirely from the pseudo element.
- There was some support for stopping at least the default behaviors (e.g. click triggering a link navigation) being stopped for clicks on the pseudo element.
- @emilio suggested an imperative API (e.g. `invoker.showInterest()`) that could be used to polyfill this pseudo element. I like the idea, and I've raised an [OpenUI issue](https://github.com/openui/open-ui/issues/1303) to discuss.
- @flackr raised the question about how browsers handle nested interactives like a button inside a button. In my quick testing, all three engines don't do anything special - clicking the inner button causes events to bubble to both the inner and outer buttons. So I don't think there's a pattern to follow here.

Given the above, it seems like the most straightforward solution is to just make a click on the `::interest-button` pseudo propagate like normal, but act like it was `preventDefault()`ed. That would seem to eliminate the footgun of a tap on the pseudo element activating the underlying element, while being a relatively minimal change. Thoughts?

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


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

Received on Wednesday, 8 October 2025 21:35:11 UTC