Interaction without JavaScript: common UI elements with a CSS-only pattern
codepen.io
codepen.io
It's not a completely unreasonable thing to ask for.
Seems you can get close with the accesskey attribute
https://developer.mozilla.org/en-US/docs/Web/HTML/Global_att...
<input type="checkbox" accesskey="q">
It's not very standardized though, you need qualifiers and escape on its own doesn't seem to be available,
I don't know how it interacts with display:none .Ideally accesskey does not apply to display:none items so you could accesskey the same key for many modal close buttons and only have the visible one activate.
A nice perk is that in many browsers input tags don't lose their state when you hit ctrl+R.