Skip to content

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

@uyanga-gb

Description

@uyanga-gb

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

  • There's a potential race condition between the Assistive Technology and the creation of the live area.
  • A suggested solution is to create the live region during the load time of the LiveAnnouncer module instead of waiting until the first invocation of announce.

🔦 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    🩺 To Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions