phetsims / resistance-in-a-wire

"Resistance in a Wire" is an educational simulation in HTML5, by PhET Interactive Simulations.
http://phet.colorado.edu/en/simulation/resistance-in-a-wire
GNU General Public License v3.0
1 stars 4 forks source link

Jaws reading pause on resistivity slider #164

Closed KatieWoe closed 6 years ago

KatieWoe commented 6 years ago

Test device: Dell Laptop Operating System: Windows 10 Browser: Firefox 61.0.1 Problem description: If you are at the bottom of the resistivity slider and use the home key to move it to the top there is a slight pause before the values are read out. This occurs when using Jaws Steps to reproduce:

  1. Open Jaws
  2. Open simulation and begin using keyboard navigation
  3. Use keyboard to bring the resistivity slider to its minimum value and wait for Jaws to finish reading
  4. Use HOME key to bring the resistivity slider to its maximum value
  5. Jaws will read "home" then pause for several seconds before beginning to read the values

For phetsims/QA/issues/137

Troubleshooting information (do not edit):

Name: ‪Resistance in a Wire‬ URL: https://phet-dev.colorado.edu/html/resistance-in-a-wire/1.5.0-rc.7/phet/resistance-in-a-wire_all_phet.html Version: 1.5.0-rc.7 2018-06-28 23:34:38 UTC Flags: pixelRatioScaling User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0 Language: en-US Window: 1536x760 Pixel Ratio: 2.5/1 WebGL: WebGL 1.0 GLSL: WebGL GLSL ES 1.0 Vendor: Mozilla (Mozilla) 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: {"assert":{"sha":"928741cf","branch":"HEAD"},"axon":{"sha":"cc053b4d","branch":"HEAD"},"brand":{"sha":"89d28f63","branch":"HEAD"},"chipper":{"sha":"fe3cb370","branch":"HEAD"},"dot":{"sha":"0dd6ee8e","branch":"HEAD"},"joist":{"sha":"f047fb1b","branch":"HEAD"},"kite":{"sha":"b6071478","branch":"HEAD"},"phet-core":{"sha":"f35ff65e","branch":"HEAD"},"phet-io":{"sha":"d54be499","branch":"HEAD"},"phet-io-website":{"sha":"28284828","branch":"HEAD"},"phet-io-wrapper-classroom-activity":{"sha":"c84e3046","branch":"HEAD"},"phet-io-wrapper-lab-book":{"sha":"ebf7c7dc","branch":"HEAD"},"phet-io-wrappers":{"sha":"ce57c3e2","branch":"HEAD"},"phetcommon":{"sha":"a5a7478c","branch":"HEAD"},"query-string-machine":{"sha":"485e174e","branch":"HEAD"},"resistance-in-a-wire":{"sha":"0520d7c1","branch":"HEAD"},"scenery":{"sha":"33290b5e","branch":"HEAD"},"scenery-phet":{"sha":"42b0cff2","branch":"HEAD"},"sherpa":{"sha":"9c6ec322","branch":"HEAD"},"sun":{"sha":"6a7c923a","branch":"HEAD"},"tandem":{"sha":"7f499d9e","branch":"HEAD"}}
zepumph commented 6 years ago

@jessegreenberg I will need your assistance for this one too I'm afraid.

zepumph commented 6 years ago

there is a slight pause

@jessegreenberg @emily-phet please comment if you think this is a substantial enough bug to investigate further. @jessegreenberg can you reproduce? Have you noticed this before?

ghost commented 6 years ago

The pause is at least 3 seconds long. It's strange because normally the read out is immediate.

jessegreenberg commented 6 years ago

In addition to the delay, JAWS fails to read the aria-live alert associated with the slider. Strange that it doesn't happen with the other sliders.

jessegreenberg commented 6 years ago

Well, to be fair I am finding that JAWS often isn't reading the alerts from the sliders...

jessegreenberg commented 6 years ago

After refreshing the page, all alerts are coming through correctly.

jessegreenberg commented 6 years ago

If I comment out this bit of code which updates which dots are visible in the wire, the delay goes away, so this is performance related.

        // Set the number of visible dots based on the resistivity.
        var numDotsToShow = resistivityToNumberOfDots( resistivity );
        dotsNode.children.forEach( function( dot, index ) {
          dot.visible = index < numDotsToShow;
        } );

@emily-phet would you like to spend time looking into performance improvements for this?

jessegreenberg commented 6 years ago

Possibly related to https://github.com/phetsims/a11y-research/issues/102, which outlines some performance issues with Firefox Quantum and JAWS.

jessegreenberg commented 6 years ago

I tried using renderer: canvas on WireNode's dotsNode, it made the delay go away! But it broke visibility of the dots when we change size of the wire. capture

We will need to do some other things to get it working, but I want to make sure it is worth spending the time first.

jessegreenberg commented 6 years ago

Apparently renderer shouldn't impact clipArea, the above may indicate a larger rendering issue.

terracoda commented 6 years ago

@jessegreenberg, is there anyway to verify what is causing the delay (FF, JAWS, or visual renderer)?

The last message in phetsims/a11y-research#102 was that things were working better with the latest FF. I'm just wondering where the change has occurred.

jessegreenberg commented 6 years ago

@terracoda I am not sure. Without JAWS the sim runs very smoothly, so it is probably the combination of sim+AT using up resources. We could do some profiling with JAWS on to try to find where time is being spent. But if we can get this fix to work https://github.com/phetsims/resistance-in-a-wire/issues/164#issuecomment-404002454, it may not be worthwhile.

jessegreenberg commented 6 years ago

Discussed on 7/17/18 meeting -

We would like this to be fixed in scenery and hopefully we can use the renderer: canvas option in the future to improve performance, but this issue does not need to block publication of resistance-in-a-wire with accessibility.

jessegreenberg commented 6 years ago

Lets briefly try with WebGL and see if this is still a problem before publishing with this bug.

zepumph commented 6 years ago

I didn't know anything about the other rendering options, here is some doc I found, http://phetsims.github.io/scenery/doc/#node-renderer

jessegreenberg commented 6 years ago

This has been fixed with the above commit that targets Firefox. @zepumph can you make sure this gets into the release branch as part of #168?

jessegreenberg commented 6 years ago

https://github.com/phetsims/resistance-in-a-wire/commit/098297ee71a48db703e58459f3d7df9ea15f9179 was actually removed for #165 because the dots have been re-implemented with CanvasNode.

jessegreenberg commented 6 years ago

I verified that the bug was still fixed after #165, and it makes because canvas renderer was the fix here too.

zepumph commented 6 years ago

Has this issue been confirmed fixed in rc.8 @KatieWoe? If so please close.

KatieWoe commented 6 years ago

Right, sorry. Didn't notice it during rc.8. Closing

zepumph commented 6 years ago

Great thank you!