<s-press-button> does not support commandFor

Hello,

The currently does not support commandFor. I feel this should be added as well, it can be useful to open a modal.

Thanks.

1 Like

Hm, that’s a pretty confusing UX though, I would think: you press the button to open the modal, but use the Escape key to close the modal. The button is still pressed? Or is it unpressed?

It’s a pretty confusing pattern, I’m not sure on this one.

I’m using that in the context of a rich text editor toolbar (such as the one found in Shopify admin), I’m using pressed button but I need to open a modal. Think for instance of the link action in a toolbar. Opening it would open a modal to allow merchant to enter a link. If the merchant adds a link, I want to keep the button in a pressed state.

Right - I think I understand the use-case, but I’m saying that wiring it up correctly, keeping the pressed state in sync, and doing it all with accessibility in mind, does not provide a great UX.