[Webkit-unassigned] [Bug 238189] New: AX: SpeechSynthesisUtterances queued immediately after speechSynthesis.cancel do not receive speech events

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Mar 21 23:12:03 PDT 2022


https://bugs.webkit.org/show_bug.cgi?id=238189

            Bug ID: 238189
           Summary: AX: SpeechSynthesisUtterances queued immediately after
                    speechSynthesis.cancel do not receive speech events
           Product: WebKit
           Version: Safari 15
          Hardware: Mac (Apple Silicon)
                OS: macOS 12
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Accessibility
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: martinq at benetech.org
                CC: andresg_22 at apple.com,
                    webkit-bug-importer at group.apple.com

Created attachment 455338

  --> https://bugs.webkit.org/attachment.cgi?id=455338&action=review

HTML and JS demonstrating the bug

Summary:
When queueing a new utterance immediately after speechSynthesis.cancel(), the new utterance's onstart, onend, and onboundary event handlers do not trigger.

Overview:
Some applications require interrupting speech in progress and starting over with new utterances. Safari on macOS and Safari on iOS do not reliably trigger onstart, onend, and onboundary events on utterances that are queued up immediately following a speechSynthesis.cancel().

Steps to reproduce:

* Open the attached HTML file
* Click the Start Speaking button to begin speech
* While utterance is still in progress, click Interrupt button

Actual results, Safari 15.3 on a 14" MBP running macOS 12.2.1
* After clicking the Start Speaking button, the first sentence of the Gettysburg Address is spoken
* The speechDisplay DIV element is updated with the text "Started speaking."
* After clicking the Interrupt button, the in-progress sentence stops
* The speechDisplay DIV element is updated with the text "Error while speaking."
* The interruption text ("Well, that was rude...") is spoken.
* The speechDisplay DIV element is updated with the text "Error while interrupting."

Actual results, iOS 15.4 on iPhone SE (2020)
* After clicking the Start Speaking button, the first sentence of the Gettysburg Address is spoken
* The speechDisplay DIV element is updated with the text "Started speaking."
* After clicking the Interrupt button, the in-progress sentence stops
* The speechDisplay DIV element is updated with the text "Error while speaking."
* The interruption text ("Well, that was rude...") is spoken.
* The speechDisplay DIV element is updated with the text "Finished with the interruption."

Expected results:
* After clicking the Start Speaking button, the first sentence of the Gettysburg Address is spoken
* The speechDisplay DIV element is updated with the text "Started speaking."
* After clicking the Interrupt button, the in-progress sentence stops
* The speechDisplay DIV element is updated with the text "Error while speaking."
* The interruption text ("Well, that was rude...") is spoken.
* The speechDisplay DIV element is updated with the text "Interrupted!"
* The speech synthesizer finished speaking the interruption text.
* The speechDisplay DIV element is updated with the text "Finished with the interruption."

We still expect the onerror to be fired for the first utterance, as that is the usual WebKit behavior for canceling an utterance. But we would also expect the onstart handler for the second utterance to be triggered. And when the second utterance runs to completion, its onend handler should also trigger.

Additional Information:

Results when performing the same steps on the same 14" MBP with macOS 12.2.1 using Chrome, Edge, or Firefox:
* After clicking the Start Speaking button, the first sentence of the Gettysburg Address is spoken
* The speechDisplay DIV element is updated with the text "Started speaking."
* After clicking the Interrupt button, the in-progress sentence stops
* The speechDisplay DIV element is updated with the text "Finished speaking."
* The interruption text ("Well, that was rude...") is spoken.
* The speechDisplay DIV element is updated with the text "Interrupted!"
* The speech synthesizer finished speaking the interruption text.
* The speechDisplay DIV element is updated with the text "Finished with the interruption."

The main difference here is that when an utterance is canceled in other browser engines, the utterance receives an end event rather than an error.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220322/3f7fd88a/attachment.htm>


More information about the webkit-unassigned mailing list