phetsims / projectile-data-lab

"Projectile Data Lab" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
0 stars 0 forks source link

Keyboard nav may activate without pressing tab #296

Closed KatieWoe closed 2 months ago

KatieWoe commented 2 months ago

Test device Chromebook Operating System ChromeOS Browser Chrome Problem description For https://github.com/phetsims/qa/issues/1068 I have found situations where you can activate keyboard nav without pressing tab. The first is, if you press they arrow keys after having interacted with the field box with the mouse, the second is if you use the arrows after interacting opening the Bin Width/number dropdown with the mouse.

Visuals

thing2

Screenshot 2024-04-17 112654

samreid commented 2 months ago

In slack I wrote:

QA opened this issue during RC: https://github.com/phetsims/projectile-data-lab/issues/296 We are calling focus like this: https://github.com/phetsims/projectile-data-lab/blob/f6284ae547b92e59d1dbdb051152b65b49f62cad/js/common/view/SelectorNode.ts#L80-L94 and there are simliar calls in combo box and combo box list box. How should we address the problem?

@jessegreenberg said:

Hey there, that is expected. Focus highlights become visible when the user starts to use the keyboard. Focus is in the sim and the highlights are showing what currently has focus.

@KatieWoe replied:

It was noticed because I was zoomed in and trying to use the arrows to pan, but instead activated keyboard nav

samreid commented 2 months ago

@jessegreenberg said:

That makes sense. This is still the expected behavior at this time though. We need focus to be placed in the sim for accessibility, and using the arrow keys should resume from where focus is. This is related to https://github.com/phetsims/joist/issues/750, if that is done the mouse+keyboard interaction may feel more consistent.

samreid commented 2 months ago

@KatieWoe said:

But in that case, those two instances were the only times that seemed to work, not in other parts of the sim.

@jessegreenberg replied:

Yea, understood. It will only happen for specific components until https://github.com/phetsims/joist/issues/750 is done, which will synchronize mouse+keyboard input more holistically.

matthew-blackman commented 2 months ago

Closing based on the discussion above.

terracoda commented 2 months ago

Also, just adding this comment, so QA is aware... Alt Input is always "active", i.e., enabled. It is not ever disabled in a sim that has the feature.