- From: Mason Freed via GitHub <noreply@w3.org>
- Date: Wed, 23 Jul 2025 16:34:46 +0000
- To: public-css-archive@w3.org
mfreed7 has just created a new issue for https://github.com/w3c/csswg-drafts: == Suggest a better name for the `:interest-target` pseudo class == We [resolved](https://github.com/w3c/csswg-drafts/issues/12154#issuecomment-3109288299) to add two pseudo classes for the [interest invokers API](https://open-ui.org/components/interest-invokers.explainer): - `:interest-invoker` - matches an element with the `interestfor` attribute that currently "has interest". - `:interest-target` - matches an element that is the target of an element with `interestfor`, while that invoker element "has interest". To help the discussion, here's an example code snippet: ``` <a href=# interestfor=target id=invoker>Invoker</a> <div popover id=target>Popover</div> ``` It was raised (see [1](https://github.com/w3c/csswg-drafts/issues/12154#issuecomment-3028501403) and [2](https://github.com/w3c/csswg-drafts/issues/12154#issuecomment-3028591124) for example) that the `:interest-target` name is a bit confusing. When you "show interest" in something, the "target" of your **interest** is that element. But also, when you say `interestfor=foo`, you could say that `#foo` is the target of the invoker. So it's ambiguous to use "target". If there's a better set of words that make this clear, that would be very helpful. I did the modern thing and plugged this into an LLM and here's what it suggested. Perhaps one of these works better? The first one (`:interest-invoked`) isn't bad... | Suggested Name | Pros | Cons | | -------- | ------- | ------- | | `:interest-invoked` | Strong symmetry with :interest-invoker. Unambiguous. | Less declarative, more procedural. | `:of-interest` | Very high readability, uses natural language. Conceptually pure. | Asymmetrical pairing with :interest-invoker. | `:interest-triggered` | Clearly communicates cause-and-effect. Uses familiar UI term. | "Trigger" might imply a more discrete action. | `:interest-indicated` | Accurately describes the link made by the interestfor attribute. | More technical, less immediately obvious. **Are there better suggestions?** Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/12515 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 23 July 2025 16:34:47 UTC