-
Notifications
You must be signed in to change notification settings - Fork 757
Closed
Description
We resolved to add two pseudo classes for the interest invokers API:
:interest-invoker- matches an element with theinterestforattribute that currently "has interest".:interest-target- matches an element that is the target of an element withinterestfor, 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 and 2 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?