We resolved to add two pseudo classes for the interest invokers API:
: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 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?
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:
It was raised (see 1 and 2 for example) that the
:interest-targetname is a bit confusing. When you "show interest" in something, the "target" of your interest is that element. But also, when you sayinterestfor=foo, you could say that#foois 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...:interest-invoked:of-interest:interest-triggered:interest-indicatedAre there better suggestions?