<button type="action"> for performing a specified action on a specified element #10010
Labels
addition/proposal
New features or enhancements
needs implementer interest
Moving the issue forward requires implementers to express interest
What problem are you trying to solve?
Methods on HTML elements like the dialog element's show() and showModal() methods cannot currently be invoked without using JavaScript. Additionally, assistive technology have no way of understanding what action a button with type "button" and underlying JavaScript will perform.
What solutions exist today?
Using inline JavaScript with the onclick attribute like: onclick="myElement.myMethod()" close to achieves the same. However if inline JavaScript is disabled, it would not work. Additionally, assistive technology would not be able to understand what method is about to be called and on what element.
How would you solve it?
This can be solved by creating a new button type called "action". This type would also take an "action" attribute and a "for" attribute to specify what the action is and what element it is for. This would for example look like this:
Other use cases could be:
Anything else?
No response
The text was updated successfully, but these errors were encountered: