Opinion poll!
You have a <button>, it makes a <foo> open. What would be the best declarative attribute for the button to control the foo?
Opinion poll!
You have a <button>, it makes a <foo> open. What would be the best declarative attribute for the button to control the foo?
@keithamus ok that makes sense :)
I don't much like the one with 'click' in it, as that's not the only way to activate a button.
They all seem so long, haha. Honestly otherwise however it's named I'd just be so happy to code stuff up like that. So neat. So simple!
@sarajw full disclosure we've been working on the idea for a while: https://open-ui.org/components/invokers.explainer
This is a last minute look at the API naming!
@keithamus and can't we have the attribute be called `action` even if one already exists in <form>s?
So maybe like:
```
<button action="open" controls="my-dialog-id">Show options</button>
```
I guess for a dialog we might also have a "showModal" action available... 🤔
@Lukew @keithamus interesting! Fair play, naming is hard and I'm an outsider just speaking my mind :)
I'm stoked for this though. Feels like how buttons *should* work. But if inline JavaScript was a security issue, how is this safer? Just a lot less flexible and more hardwired?