html icon indicating copy to clipboard operation
html copied to clipboard

Naming of the `interesttarget` attribute

Open mfreed7 opened this issue 10 months ago • 3 comments

What is the issue with the HTML Standard?

This is a split-off from https://github.com/whatwg/html/issues/10309 (see also https://github.com/openui/open-ui/issues/1136), to specifically resolve on the name of the attribute. The current proposal uses interesttarget=target, but that is kind of a carryover from popovertarget. It seems that the new commandfor attribute might be the better pattern to follow? If so, perhaps a better name for this attribute would be interestfor=target? That's a bit semantically weird, since the "interest" is actually in the thing that has the attribute, not the target element, so "interest for" isn't strictly correct. Then again, if commandfor means "this element issues a command for the target", then interestfor could mean "this element registers/signals interest for the target". So maybe it's fine.

Other choices might be interesttriggerfor=target or interesttriggers=target. I don't much like those, as compared to interestfor, but they're a bit more descriptive.

I'd like to resolve on the name sooner rather than later, to avoid painful renames in the future. The name of the attribute might also have carryover affects on some of the CSS properties, depending on how that bikeshedding goes.

mfreed7 avatar May 15 '25 17:05 mfreed7

Any comments here? I'm inclined to just rename the property to interestfor=IDREF to match commandfor.

The CSSWG just resolved to call the CSS properties interest-delay-* so I think interestfor as an attribute aligns nicely.

@annevk @nt1m @smaug---- @emilio @keithamus any objections?

mfreed7 avatar Jun 04 '25 17:06 mfreed7

interestfor SGTM

zcorpan avatar Jun 05 '25 14:06 zcorpan

Notes from the June 5 WHATNOT meeting:

“Interestfor”++. No one from Apple here, would love Webkit feedback.

mfreed7 avatar Jun 05 '25 16:06 mfreed7

Based on only positive opinions expressed, I've gone ahead and renamed the attribute in the explainer and spec PR.

mfreed7 avatar Jun 30 '25 15:06 mfreed7