11 ms·
It’s possible to have both; just make your js component issue a synthetic click on a hidden native input, and read the value when changed. I do this all the tim
by pault 9y ago
It’s possible to have both; just make your js component issue a synthetic click on a hidden native input, and read the value when changed. I do this all the time.
- Piskvorrr 9y agoAnd oh the fun you'll have when you try to use a keyboard! (Nope nope nope, everyone clicks, you with the keyboard don't matter, and you with the screenreader just go away already)
- pault 9y agoThe idea is that you are using the native field to listen for user events, so the ux shouldn’t change. You have to proxy click events since the element isn’t visible, but key presses work as usual.