phetsims / build-a-nucleus

"Build a Nucleus" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
0 stars 5 forks source link

Fire on hold works for nuclide buttons with alt input #196

Open Nancy-Salpepi opened 12 months ago

Nancy-Salpepi commented 12 months ago

Test device MacBook Air M1 chip

Operating System 13.5.1

Browser Safari 16.6

Problem description For https://github.com/phetsims/qa/issues/977, looking at https://github.com/phetsims/build-a-nucleus/issues/114 and https://github.com/phetsims/build-a-nucleus/issues/31 the fire on hold option has been disabled for the mouse. I am able to fire on hold with alt input. Is that OK or was that supposed to be disabled as well? It seems to be working quite nicely, but wanted to make sure it was intended.

Visuals

https://github.com/phetsims/build-a-nucleus/assets/87318828/4ffc3623-80d7-4ef2-a59b-121c714cb6a9

zepumph commented 12 months ago

Yes we should try to make this consistent. I think in the past we have run into trouble using enter + fire on down, because that's the browser spamming us with click events, but it shouldn't be too hard to turn this off. Let me see.

zepumph commented 12 months ago

Yeah, this is logic coming from the browser into our sun buttons. We rely on the "click" event instead of keyup/down for accessibility support, and so we are kinda stuck. The enter button will just give endless click events when held down. As far as I know this cannot be worked around for push buttons, but let's check in with @jessegreenberg. Can you help us out?

To reproduce, go to BAN, tab to an arrow button, and hold enter. We decided in previous issues that you shouldn't be able to spam "clicks" with a mouse (see above linked issues).

jessegreenberg commented 11 months ago

Thats right, there is no support for this unfortunately with alternative input. As you said, screen readers just don't have this kind of functionality for native buttons and so we decided not to do something custom. We should look into getting this kind of functionality though.

zepumph commented 11 months ago

Thanks @jessegreenberg. I'm going to mark this issue as deferred and not blocking, but I'll keep it open as a pointer to that more central work that would be nice to get working.