-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
invokertargetandinvokeractionattributes 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
invokertargetwill - when clicked, touched, or enacted via keypress -
dispatch anInvokeEventon the element referenced byinvokertarget,
with some default behaviours.
In addition, adding an
interesttargetattribute to
<button>,<a>,<input>elements would allow disclosure of high
fidelity tooltips in a more accessible and declaritive way. Elements
withinteresttargetwill - when hovered, long pressed, or focussed -
dispatch anInterestEventon 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.