adobe / react-spectrum

A collection of libraries and tools that help you build adaptive, accessible, and robust user experiences.
https://react-spectrum.adobe.com
Apache License 2.0
12.21k stars 1.07k forks source link

LiveAnnouncer's announce is not working on the first trigger for NVDA and JAWS #5191

Open uyanga-gb opened 9 months ago

uyanga-gb commented 9 months ago

Provide a general summary of the issue here

When using the announce method of LiveAnnouncer in @react-aria for the very first time, the message is not being announced as expected. However, subsequent triggers seem to work as expected. This issue is specific to NVDA and JAWS; it functions correctly with VoiceOver.

πŸ€” Expected Behavior?

The announce method should work consistently across all triggers, starting from the first one.

😯 Current Behavior

The message is not announced during the first trigger of the announce method, but it works on subsequent triggers.

πŸ’ Possible Solution

πŸ”¦ Context

No response

πŸ–₯️ Steps to Reproduce

Please check the sandbox https://codesandbox.io/s/silly-hill-99v7q7?file=/src/App.js

Version

3.25.1

What browsers are you seeing the problem on?

Microsoft Edge

If other, please specify.

No response

What operating system are you using?

Windows

🧒 Your Company/Team

Adobe/Alert One

πŸ•· Tracking Issue

No response

yihuiliao commented 9 months ago

Reproduced using AssistivLabs. Also found in FireFox with NVDA and Chrome with Jaws (though this is not extensive, just the ones I tested).