FreedomScientific / standards-support

Contains documentation for Vispero software support of Web standards
https://freedomscientific.github.io/standards-support/
GNU General Public License v3.0
105 stars 11 forks source link

Aria Live Region has a lag and speaks a queue of messages when aria-live="assertive" #782

Open frastlin opened 7 months ago

frastlin commented 7 months ago

Summary

  1. Visit: https://stackblitz-starters-e22wcw.stackblitz.io/ If asked, click the button that says “run project”.
  2. Hit enter on the button and you will enter focus mode.
  3. Press up arrow 10 times as fast as you can (10 times a second).

Expected result

Jaws should instantly read the latest content to be sent to the live region.

Both NVDA and Narrator have the expected behavior. According to the Aria Live Regions specification: “Generally, a change to an assertive live region will interrupt any announcement a screen reader is currently making.”

Actual result

In Chrome there’s a 1500+ millisecond delay and Jaws will read out the entire queue of messages that were sent over all the previous updates. This example yields “1 times up arrow was pressed. 2 times up arrow was pressed. 3 times up arrow was pressed. 4 times up arrow was pressed. 5 times up arrow was pressed. 6 times up arrow was pressed…”

On Firefox, there is only a 100ms delay, but the last 2 messages still read out e.g., “9 times up arrow was pressed. 10 times up arrow was pressed.”

Example

https://stackblitz.com/edit/stackblitz-starters-e22wcw?description=A%20create-react-app%20project%20based%20on%20react%20and%20react-dom&file=src%2FApp.js&title=React%20Starter

Additional Information

JAWS version and build number

Jaws 2023.2212.23

Operating System and version

Windows 11 64 bit

Browser and version:

Firefox: 119.0.1 (64-bit) Chrome: Version 119.0.6045.159 (Official Build) (64-bit)

Context

If there is a work-around other than to have users switch to Narrator, please let me know! We are making a digital geographic map viewer and currently the Jaws experience is so bad we tell people to switch to Narrator or use our default voice. Many other games and applications also use Aria live regions to communicate information to the user, and these types of applications are becoming more and more common. It would be terrible for the Jaws community to need to switch to using Narrator to interact with these applications because Jaws does not follow the Aria specification.

JAWS-test commented 7 months ago

ARIA spec:

When regions are specified as assertive, assistive technologies will immediately notify the user, and could potentially clear the speech queue of previous updates.

This means that there is no obligation for the current message to discard the previous one.

aria-live=assertive is reserved for very important and urgent messages. Why should very important messages not be output?

aria-live=polite should be used for less important messages.

In general, when using aria-live, care should be taken to ensure that the updates do not occur too quickly one after the other so that the screen reader has enough time to output the live region. If, for example, an output occurs after a keystroke, a delay should be built in to check whether the text input has actually been completed in order to avoid constant updates during text input.

stevefaulkner commented 7 months ago

@JAWS-test thanks for clarifying @frastlin When quoting normative expectations of User Agent behaviors' its best to reference the spec itself. As @JAWS-test points out there is no normative requirement for User Agents such as JAWS to discard previous messages.

Normative requirements are those that use certain keywords such as SHOULD/SHOULD NOT

When live regions are marked as polite, assistive technologies SHOULD announce updates at the next graceful opportunity, such as at the end of speaking the current sentence or when the user pauses typing. When live regions are marked as assertive, assistive technologies SHOULD notify the user immediately. Because an interruption might disorient users or cause them to not complete their current task, authors SHOULD NOT use the assertive value unless the interruption is imperative.

source: https://w3c.github.io/aria/#aria-live

It should be noted that as far as I am aware there are no MUST level normative requirements defined to apply to assistive technology within the ARIA specs, only requirements on browsers.

frastlin commented 7 months ago

There is some ambiguity in the language, but my goal is to notify the user immediately without delay and without saying the past queue of messages. Considering that polite already does this, what would you recommend to obtain this behavior? All our Jaws users are asking for this behavior, and I don't know what to tell them other than to use another screen reader or our Web TTS option that both have this functionality.

frastlin commented 7 months ago

Hello, We keep having Jaws users ask for a way to interrupt messages and I hate telling them to stop using Jaws. We really want our application to be screen reader agnostic, but users want to power through the app super quickly, and the lag for Jaws to read all the messages is too painful for them. If users attempt to just hold down the left arrow key until they hear a sound indicating they are over an object and release the arrow key, Jaws will continue sending key presses to the application for a very long time. I normally need to tell users to refresh the app and stop using Jaws, which makes them lose their place in the map when this happens. You can experience for yourself the problem on our app at: https://www.audiom.net/ (press 3 to jump to the heading that says "Non-Visual Map"). I can also make a video of me using Jaws and showing the pain having all the messages read causes.

stevo399 commented 6 months ago

I am the QA tester for Audiom. I captured this screen recording with Audio using Jaws to attempt to walk around the playground map. As mentioned before, messages queue up as well as keyboard events, and this even caused Jaws to freeze up until I exited the browser. https://github.com/FreedomScientific/standards-support/assets/57786372/180742d7-9824-4771-b171-55636a5910d5

frastlin commented 6 months ago

Listening to this video, I'm wondering if the live region behavior is the big problem here, or if there is a huge lag for keypresses sent to a button element in the browser, or if there are two problems? The synthesizer from Jaws is not being used here in this video, but there is still a massive lag.