Description
Following on from #3567 and #9456 where we tried to specify a way to open dialogs without JavaScript, @nt1m and @smaug---- raised concerns that the attribute was not extensible.
I've taken the feedback, and instead I'm proposing a new set of attributes that allow for opening dialogs and popovers, and also allow for extensibility for other interactions. I'll quote the summary:
Adding
invokertarget
andinvokeraction
attributes to<button>
and
<input type="button">
/<input type="reset">
elements would allow
authors to assign behaviour to buttons in a more accessible and
declarative way, while reducing bugs and simplifying the amount of
JavaScript pages are required to ship for interactivity. Buttons with
invokertarget
will - when clicked, touched, or enacted via keypress -
dispatch anInvokeEvent
on the element referenced byinvokertarget
,
with some default behaviours.
In addition, adding an
interesttarget
attribute to
<button>
,<a>
,<input>
elements would allow disclosure of high
fidelity tooltips in a more accessible and declaritive way. Elements
withinteresttarget
will - when hovered, long pressed, or focussed -
dispatch anInterestEvent
on the element referenced byinteresttarget
,
with some default behaviours.
I'm soliciting feedback on this, and if we think this is more tenable than #9456 I'm happy to go forward with specs/implementations.