phetsims / friction

"Friction" is an educational simulation in HTML5, by PhET Interactive Simulations.
http://phet.colorado.edu/en/simulation/friction
GNU General Public License v3.0
4 stars 6 forks source link

May be possible to enter keyboard nav without pressing Tab #280

Closed KatieWoe closed 2 years ago

KatieWoe commented 2 years ago

Test device Dell Operating System Win 11 Browser Chrome Problem description For https://github.com/phetsims/qa/issues/791. It is possible, under verry specific circumstances, to enter keyboard nav with just the shift key, rather than Tab or Shift + Tab. It does not happen in the published sim, but does on master with other sims. It may not be worth addressing, but I wanted to report it just in case. This bug occurs when you disable keyboard by using the mouse on the element the keyboard nav is focusing on. If you then press shift, keyboard nav focus will come back to the element. Steps to reproduce

  1. Use keyboard nav to navigate to the reset all button (works on other items as well
  2. Use mouse interaction to press reset all
  3. Press the shift key

Troubleshooting information:

!!!!! DO NOT EDIT !!!!! Name: ‪Friction‬ URL: https://phet-dev.colorado.edu/html/friction/1.6.0-dev.24/phet/friction_all_phet.html Version: 1.6.0-dev.24 2022-03-30 15:06:07 UTC Features missing: applicationcache, applicationcache, touch Flags: pixelRatioScaling User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.84 Safari/537.36 Language: en-US Window: 1280x649 Pixel Ratio: 1.5/1 WebGL: WebGL 1.0 (OpenGL ES 2.0 Chromium) GLSL: WebGL GLSL ES 1.0 (OpenGL ES GLSL ES 1.0 Chromium) Vendor: WebKit (WebKit WebGL) Vertex: attribs: 16 varying: 30 uniform: 4096 Texture: size: 16384 imageUnits: 16 (vertex: 16, combined: 32) Max viewport: 32767x32767 OES_texture_float: true Dependencies JSON: {}
zepumph commented 2 years ago

Yes this is expected. Because of how mobile device screen ready support works. We track an "invisible" focus as the mouse interacts with the sim. Then when keyboard is pressed the invisible highlights turn visible. @jessegreenberg, can you confirm that we wouldn't want to change this? I don't think we would.

zepumph commented 2 years ago

Oh! And during quarterly planning today I realized this is an example of https://github.com/phetsims/joist/issues/750, which is not scheduled for this quarter. @jessegreenberg if you agree please assign back to me.

jessegreenberg commented 2 years ago

Correct, this is expected. Usage of the keyboard makes the focus highlight visible and it will remain visible until there is more mouse/touch interaction. I could even imagine that after https://github.com/phetsims/joist/issues/750 is resolved this behavior remains.

I tried to add a note about this in the qa-book, hopefully thats helpful. Back to you @zepumph.

zepumph commented 2 years ago

@KatieWoe, I want to make sure this makes sense to you. Please feel free to close or ask clarification questions as needed.