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

VO stops indicating leg position once VO statement, "You are currently on a slider...." #440

Closed Nancy-Salpepi closed 3 years ago

Nancy-Salpepi commented 3 years ago

Test device MacBook Air (M1 chip)

Operating System 11.4

Browser safari latest

Problem description https://github.com/phetsims/qa/issues/676

With VO activated, I was using the arrow keys to move the leg back and forth. Randomly, VO then states that I'm currently on a slider etc. After this statement, when I continue to move the leg back and forth with the arrow keys, VO only states the number of electrons and no longer mentions foot position.

Steps to reproduce

  1. Open the sim and tab into it
  2. Start voice over
  3. Tab over to the leg and move back and forth using the arrow keys

Visuals Issue doesn't happen until ~50 seconds into the video but the entire video allows you to see the before and after.

https://drive.google.com/file/d/1t1FTtdqE37NANoQkzKU6INZ06wTZ9AxB/view?usp=sharing

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: touch Flags: pixelRatioScaling User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.1 Safari/605.1.15 Language: en-us Window: 1111x683 Pixel Ratio: 2/1 WebGL: WebGL 1.0 GLSL: WebGL GLSL ES 1.0 (1.0) Vendor: WebKit (WebKit WebGL) Vertex: attribs: 16 varying: 31 uniform: 1024 Texture: size: 16384 imageUnits: 16 (vertex: 16, combined: 32) Max viewport: 8192x8192 OES_texture_float: true Dependencies JSON: {}

jessegreenberg commented 3 years ago

Thanks @Nancy-Salpepi - It looks in the video like aria-valuetext stops working for the leg after a while. I heard VO say "You are currently on a slider...." for the arm and then the the aria-valuetext worked OK. So it is either random or only happens for the leg.

Ill try to produce the problem on my Mac.

jessegreenberg commented 3 years ago

I am seeing something similar with my Mac with macOS 11.4. In my case, I stop getting any charge alerts or aria-valuetext when there are charges on the body. I sometimes get "Safari busy" in this case. If I move the hand/leg without any charges or right after a reset I consistently get all content. So I think there is a performance problem.

jessegreenberg commented 3 years ago

I also notice the fps drops way down for me when there are a large number of charges.

jessegreenberg commented 3 years ago

The fps is better on a built version in master, so that is a good sign.

jessegreenberg commented 3 years ago

This isn't really happening in the published version.

Nancy-Salpepi commented 3 years ago

Yeah I noticed that it wasn't happening on the published version too. Sorry I didn't mention.

jessegreenberg commented 3 years ago

No worries! I actually just encountered something like this in the published version too, hearing "Safari busy" and then not much else until charges are removed from the body. When this happened for you did you hear "Safari Busy" ever @Nancy-Salpepi?

Nancy-Salpepi commented 3 years ago

No. I never got "safari busy."

Nancy-Salpepi commented 3 years ago

I can try it out if you would like.

jessegreenberg commented 3 years ago

No, thats OK, just curious if it was a performance issue. I just did another test where I removed all ElectronNodes from the view, and I never heard "Safari Busy", and I always heard all content as I would expect. HOWEVER, even in this case if I press and hold an arrow key I stop hearing all information about the leg position. So I think there are two issues in this thread.

1) On older macs, the performance requirement for the ElectronNodes is such that when there are a lot of them VoiceOver may stop working. 2) Regardless of performance, if you press and hold an arrow key, aria-valuetext may stop working.

To see if point 2 is problem with our sim or with VoiceOver I am going to try to test with a vanilla HTML slider.

jessegreenberg commented 3 years ago

I created a basic HTML example and I am not seeing any issues yet. Here is what I tried, testing

<input type="range" id="test-slider">
<label for="test-slider">My Slider</label>
<p id="alert" aria-live="polite">
</p>
const slider = document.getElementById( "test-slider" );
const alertElement = document.getElementById( 'alert' );
let footAlert = 'Foot on rug.';
let charge = 0;
slider.addEventListener( 'keydown', change => {
  footAlert = footAlert + '\u200A';
  slider.setAttribute( 'aria-valuetext', footAlert);
  charge++;
  alertElement.textContent = `Electrons on body ${charge}`
} );
jessegreenberg commented 3 years ago

Testing the sim again, it is a bit inconsistent, and doesn't always happen. TAbbing to the arm, then back to the leg seems to fix the issue and I start hearing leg position information again. @Nancy-Salpepi is that true for you as well?

Nancy-Salpepi commented 3 years ago

Yes. That is the case for me as well. When I leave the leg and then go back to it, it works again.

jessegreenberg commented 3 years ago

OK thanks @Nancy-Salpepi.

@terracoda wondered if this could be caused by changes to the leg aria-valuetext where we are reporting the same content "foot on rug", rather than a unique string every position.

@terracoda also suggested to see if this happens in Firefox to identify where the issue is (VoiceOver vs Safari).

@jessegreenberg will test to see if a unique string each time will fix this. @terracoda will try it out on Firefox to see if it is better there.

Otherwise, since it isn't clear how to improve this issue we are OK publishing with this behavior.

jessegreenberg commented 3 years ago

I added an incrementing value to the end of aria-valuetext, making each string unique. I was still able to see this issue. I also tried to remove the "hairspace" workaround that we have to force the AT to repeat aria-valuetext, replacing it with a different character. I still saw this issue in the sim.

I also quickly tested in Firefox and the behavior was quite strange. I sometimes hear "0" instead of aria-valuetext.

jessegreenberg commented 3 years ago

So I think that is all the time we will spend on this issue, though @terracoda will do some testing on Firefox as well. I am going to add this issue to the https://github.com/phetsims/qa/blob/master/documentation/accessibility-bugs.md.

jessegreenberg commented 3 years ago

Document updated above. Thanks for pointing this out @Nancy-Salpepi, sorry it doesn't seem like we can find a fix. Leaving assigned to @terracoda to review my experience on Firefox and try that out for herself. Then I think this can be closed.

terracoda commented 3 years ago

On my machine (macOS 11.4, MacBook Pro Apple M1. 16GB) using Safari and VO, I made this happen once by really pounding on the leg. I pounded less on the Arm Swing, and it didn't happen there.

The issue was easily resolved with a Tab away and return to the Leg Swing.

I also tested on Firefox just to see how FF is doing with compatibility with VO. Using FF 90.0, VO did not read out any of the aria-valuetext at all, eventhough the descriptions were indicated in the Accessibility Tree.

Screen Shot 2021-08-03 at 3 46 51 PM

Screen Shot 2021-08-03 at 4 06 40 PM

Instead of reading out the current position descriptions in the aria-valuetext VO just read out "0" on focus and then "0" one more time, and then context responses only after that.

Otherwise the experience with FF was quite nice. Too bad it's not yet reading out aria-valuetext.

I decided to test on Chrome, too. I couldn't get it to happen on Chrome. The experience on Chrome was excellent.

Considering the Leg Swing has 2 significant positions, "foot off rug" and "foot on rug", and the issue is easily resolved in Safari. This issue should not block publication.

jessegreenberg commented 3 years ago

Thanks @terracoda - that is exactly what I found too in Firefox. Closing this issue.