phetsims / ratio-and-proportion

"Ratio and Proportion" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
1 stars 4 forks source link

NVDA says "Slider, invalid entry" when ratio is locked #535

Closed KatieWoe closed 1 year ago

KatieWoe commented 1 year ago

Test device Dell Operating System Win 11 Browser Firefox + NVDA Problem description For https://github.com/phetsims/qa/issues/852 When NVDA reads out the slider for the hand, it may say that the slider is invalid. I've only seen this so far when the ratio is locked on the second screen.

Troubleshooting information:

!!!!! DO NOT EDIT !!!!! Name: ‪Ratio and Proportion‬ URL: https://phet-dev.colorado.edu/html/ratio-and-proportion/1.2.0-rc.1/phet/ratio-and-proportion_all_phet.html Version: 1.2.0-rc.1 2022-11-11 22:40:36 UTC Features missing: touch Flags: pixelRatioScaling User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:107.0) Gecko/20100101 Firefox/107.0 Language: en-US Window: 1280x667 Pixel Ratio: 1.5/1 WebGL: WebGL 1.0 GLSL: WebGL GLSL ES 1.0 Vendor: Mozilla (ANGLE (Intel, Intel(R) HD Graphics Direct3D11 vs_5_0 ps_5_0)) 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 1 year ago

I have not yet been able to reproduce this. At first I thought it may be another case of a Property leaking into a PDOM attribute value, but I manually passed a Property and it didn't care at all.

@KatieWoe can you please try to reproduce in the debug version, or on master. I would like to see if there are any assertions when it happens. If there are not, and it continues to be hard to reproduce, then I believe it may just be an NVDA quirk, and a challenge to make more progress on. Thanks!

KatieWoe commented 1 year ago

It happens both on master and in the debug version, and I did not see any errors. Let me know if you want to pair on this.

KatieWoe commented 1 year ago

Here's a video of the bug:

https://user-images.githubusercontent.com/41024075/204354431-89a44da1-b002-4b8d-8a36-a22af135e6c5.MOV

zepumph commented 1 year ago

Thanks. That is great. I can easily reproduce in firefox and I cannot get this in chrome.

I wondered if it was because of the hair spaces we put after repeating aria-valuetext in AccessibleValueHandler, but removing those did nothing.

I also found https://stackoverflow.com/questions/20386266/how-to-prevent-jaws-from-saying-invalid-entry-on-required-fields which made it seem like it was because of required form fields, but that doesn't apply to us and our code has no required attributes.

zepumph commented 1 year ago

Aha! looks like this is the culprit

https://github.com/phetsims/ratio-and-proportion/blob/ac42c8e6a6fdb701863d0be0f635e7399260c484/js/common/model/RAPRatio.ts#L33-L36

Firefox+NVDA didn't like that the slider step didn't evenly go into the min and max. I could adjust this by decreasing the threshold constant by EPSILON so that the range matches the step.

zepumph commented 1 year ago

Done and ready for confirmation in next version. ( I only cherry picked https://github.com/phetsims/ratio-and-proportion/commit/8641054fcb219d0ecddc36258c74ca7e5ce6ca25)

KatieWoe commented 1 year ago

Looks fixed in rc.2