- From: Mason Freed via GitHub <noreply@w3.org>
- Date: Thu, 04 Sep 2025 16:31:49 +0000
- To: public-css-archive@w3.org
Thanks for the discussion just now. Two issues were raised: 1. If a developer adds a `click` (or similar) event handler on the originating element, the question was whether it should fire when the user taps/clicks on the `::interest-button` pseudo element. The concern is the use case where e.g. a `<button>` does one thing when you *click* it, and does another thing (e.g. shows a tooltip) when you *show interest* in it. If clicking the `::interest-button` pseudo now does both, the use case is broken. The only solution to this that I can see is to stop the propagation of pointer up/down type events at this pseudo element. It seems (?) like other events like `mouseover` or `mousemove` should continue to function, since those don't typically trigger actions. Are there other ideas? I do note that other built-in pseudo elements like this (e.g. the spin buttons on `<input type=number>` or the file picker button on `<input type=file>`) all continue to propagate all events to the originating element. 2. How does this work with an SVG-`<a>` element? I don't have good suggestions, since pseudo elements aren't supported there. Anyway SVG is likely to be a followup activity, since the [HTML spec PR](https://github.com/whatwg/html/pull/11006) only covers HTML. 2b. How about the `<area>` element? This one is definitely interesting. I guess you'd want the pseudo element on the `<img>` itself? Though that's weird with multiple `<area>`s. Or you'd want the positioning to be somehow magical, perhaps via anchor positioning. Perhaps `<area>` just doesn't support `::interest-button`? Thoughts and ideas appreciated on all questions here. -- GitHub Notification of comment by mfreed7 Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/12437#issuecomment-3254534918 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Thursday, 4 September 2025 16:31:50 UTC