phetsims / utterance-queue

Alerting library powered by aria-live
MIT License
0 stars 2 forks source link

Latest Mobile VO fails to read out responsive descriptions #117

Open Nancy-Salpepi opened 1 month ago

Nancy-Salpepi commented 1 month ago

Test device iPad 9th generation

Operating System iPadOS 17.5.1

Browser Safari

Problem description Seen while testing https://github.com/phetsims/qa/issues/1086 but also happens in published:

Mobile VO no longer reads out all the responses when an action is taken (a button is pressed or a slider is moved). @KatieWoe confirmed that she is also seeing the same thing with her iPad and iPadOS 17.5. It seems like Apple broke something in 17.5.

For example, in Greenhouse Effect, go to the Waves Screen and press Start Sunlight -- you will not hear "warming" or any temperature values. When using the concentration slider it only indicates the level of greenhouse gases. The same thing happens in the published version.

I also get no responses with Friction in published (and main)--it doesn't say that the book is grabbed or released or give any description about what is happening to the atoms as the books are rubbed together.

Published GFLB and RAP give some responses.

jessegreenberg commented 1 month ago

Bummer - OK thanks for reporting @Nancy-Salpepi.

Published GFLB and RAP give some responses.

Can you please clarify, does that mean on iPadOS 17.5 some responses are spoken successfully? Can you give an example of the ones you do hear and the ones you don't hear for those sims?

KatieWoe commented 1 month ago

For RaP, when moving the hands it will say, "close to target" or similar, but it won't read out "hand on tick 4" or things like that when it should.

jessegreenberg commented 1 month ago

OK, that is helpful thanks. It sounds like we are hearing the aria-valuetext but none of the aria-live alerts.

jessegreenberg commented 1 month ago

I just tried on iOS 15.0.2 and I heard alerts as expected in greenhouse-effect. Ill see if I an try a newer version.

jessegreenberg commented 1 month ago

I was also able to test on 16.5 and confirmed alerts sound correct.

jessegreenberg commented 1 month ago

@KatieWoe did the following test:

I am able to install iOS 17.5.1 on an iPad, I am doing that now to test.

jessegreenberg commented 1 month ago

After updating to 17.5.1 I am observing this problem.

jessegreenberg commented 1 month ago

If I remove this, the problem goes away. However, VoiceOver interrupts itself for every queued up aria-live=polite alert and we only hear the most recent information.

https://github.com/phetsims/utterance-queue/blob/a2b10eeee306478c4975d8935dd502d5572d9060/js/AriaLiveAnnouncer.ts#L234-L242

If we can fix this, it will be in utterance-queue so transfering the issue there.

jessegreenberg commented 1 month ago

aria-live='polite' does not queue at all in iOS VoiceOver 17.5.1, as seein in this example:

<h1>Testing</h1>
<p id='alerter' aria-live='polite'></p>
<p id='alerter2' aria-live='polite'></p>

<script>

  // alternate between two alert elements (similar to how UtteranceQueue works)
  const alerter = document.getElementById( 'alerter' );
  const alerter2 = document.getElementById( 'alerter2' );

  let counter = 1;
  window.setInterval( () => {
    if ( counter % 2 === 0 ) {
      alerter2.textContent = `This is a new alert that is quite long, will it be interrupted? ${counter}`;
    }
    else {
      alerter.textContent = `This is a new alert that is quite long, will it be interrupted? ${counter}`;
    }

    counter++;
  }, 1000 );
</script>
jessegreenberg commented 1 month ago

The above commit improves the output on iOS VoiceOver. But it has a negative impact on MacOS VoiceOver. It breaks the queuing of aria-live=polite alerts for both platforms.

Discussing with @Nancy-Salpepi and we think the best thing to do is to apply that change for iOS VoiceOver but NOT change MacOS VoiceOver.

Note this will improve iOS VoiceOver but we will still miss a lot of alerts as they get interrupted.

Done in https://github.com/phetsims/utterance-queue/commit/58282ac632d75dc842fe02978f677afd4259bcf7.

We should discuss is this change is good enough and if it requires a maintenance release.

EDIT: I noted in the planning slack channel that this issue, along with https://github.com/phetsims/scenery/issues/1631, will require some maintenance time. I will work there to coordinate discussion and maintenance.

kathy-phet commented 1 month ago

Bummer! :( But glad you found a bit of an improvement.

terracoda commented 1 month ago

I think we need to reach out to apple to check on its support for ARIA-Live.

jessegreenberg commented 1 month ago

I agree. The specification here (https://www.w3.org/TR/wai-aria-1.2/#aria-live) describes that polite alerts should queue. (Though to be fair, it leaves room for interpretation). https://github.com/phetsims/utterance-queue/issues/117#issuecomment-2127641838 demonstrates that they do not. That is sufficient for a bug report, which we can submit, but we have never received a response from Apple's Feedback Assistant.

terracoda commented 1 month ago

Ok, I sent an email with the question jesse suggested:

Our Question: Why doesn't VoiceOver queue alerts from aria-live=polite? The ARIA spec suggests they should queue (see https://www.w3.org/TR/wai-aria-1.2/#aria-live). Other screen reader vendors implement a queue for aria-live=polite alerts. VoiceOver users are missing important information in web applications because alerts do not queue.

terracoda commented 1 month ago

I heard back from Chris Fleizach.

They would very much appreciate a webkit bug report.

Filing a webkit bug will be very much appreciated Thank you