phetsims / john-travoltage

"John Travoltage" is an educational simulation in HTML5, by PhET Interactive Simulations.
http://phet.colorado.edu/en/simulation/john-travoltage
GNU General Public License v3.0
4 stars 8 forks source link

Should preferences dialog open with screen reader? #442

Closed KatieWoe closed 3 years ago

KatieWoe commented 3 years ago

Test device Dell Operating System Win 10 Browser Chrome Problem description For https://github.com/phetsims/qa/issues/676. Seen with Jaws. When using Chrome + Jaws + keyboard nav, I was unable to open the preferences dialog. I was able to open it with Firefox + NVDA and iPad +VO, so I'm not sure what the desired behavior is.

Visuals

https://user-images.githubusercontent.com/41024075/127717258-b792923f-35c4-4752-83e0-be2fc80a8350.MOV

Troubleshooting information:

!!!!! DO NOT EDIT !!!!! Name: ‪John Travoltage‬ URL: https://phet-dev.colorado.edu/html/john-travoltage/1.6.0-rc.1/phet/john-travoltage_all_phet.html Version: 1.6.0-rc.1 2021-07-22 18:05:38 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/92.0.4515.107 Safari/537.36 Language: en-US Window: 1280x657 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: {}
jessegreenberg commented 3 years ago

Thanks @KatieWoe, yes it should. Ill investigate.

jessegreenberg commented 3 years ago

Confirmed with JAWS in Chrome. When activating, we get three events image

The pointer events are at (679,700) in the window, which matches the center of the button in my window on this load image

So, it is getting pressed twice.

jessegreenberg commented 3 years ago

What is happening in this case is that the JAWS event target is not under the PDOM. So this block is preventing scenery from dispatching the up/down pointer events

    if ( this.isTargetUnderPDOM( event.target ) ) {
      return;
    }

But no matter if we dispatch, the event we save the enent.timeStamp on the pointerUp, and so we block the click event too with

            if ( trail && !( _.some( trail.nodes, node => node.positionInPDOM ) && eventName === 'click' &&
                 event.timeStamp - this.upTimeStamp <= PDOM_CLICK_DELAY ) ) {
              this[ actionName ].execute( event );
            }
jessegreenberg commented 3 years ago

If I remove the isTargetUnderPDOM checks, it works OK in JAWS, the same workaround with PDOM_CLICK_DELAY works for that platform.

jessegreenberg commented 3 years ago

Alright, this needs to move to scenery.

jessegreenberg commented 3 years ago

This was fixed in https://github.com/phetsims/scenery/issues/1260 and changes were cherry-picked into the scenery branch for this release. Ready to verify.

KatieWoe commented 3 years ago

This seems fixed in rc.2. However, I wonder if https://github.com/phetsims/john-travoltage/issues/447 is related, since I found it while looking at this bug.

jessegreenberg commented 3 years ago

Thanks @KatieWoe, sounds like this was fixed and we determined in #447 that this issue was not related. Closing this one.