nvaccess / nvda

NVDA, the free and open source Screen Reader for Microsoft Windows
https://www.nvaccess.org/
Other
2.12k stars 637 forks source link

NVDA does not announce contents of div with role="alert" containing a list #14990

Open grabowsd opened 1 year ago

grabowsd commented 1 year ago

Steps to reproduce:

https://jsfiddle.net/gdaria/9kcy7fo3/15/

This is similar issue to https://github.com/nvaccess/nvda/issues/8557 When a list <ul> and heading <h4> are wrapped in a div with role=alert the list and the heading will not be read by NVDA.

  <div id="errorList" class="hidden" role="alert">
    <h4>
      Error List
    </h4>
    <ul>
      <li>Error 1</li>
      <li>Error 2</li>
      <li>Error 3</li>
    </ul>
  </div>

When a list is removed from the div the heading will be announced or when role=alert is added to <ul> the list will be announced.

    <ul id="errorList" class="hidden" role="alert">
      <li>Error 1</li>
      <li>Error 2</li>
      <li>Error 3</li>
    </ul>

Actual behavior:

When button is clicked NVDA only says "Alert" and it doesn't read a heading or a list.

Expected behavior:

When button is clicked NVDA should announce full alert message (heading + list)

NVDA logs, crash dumps and other attachments:

System configuration

NVDA installed/portable/running from source:

NVDA version:

NVDA Version 2023..1.0.27913

Windows version:

Windows 10 Enterprise Version 10.0.19045 Build 19045

Name and version of other software in use when reproducing the issue:

Microsoft Edge: Version 113.0.1774.57 (Official build) (64-bit) Chrome Version 114.0.5735.110 (Official Build) (64-bit) 
Firefox 113.0.2 (64-bit)

Other information about your system:

Other questions

Does the issue still occur after restarting your computer?

Have you tried any other versions of NVDA? If so, please report their behaviors.

If NVDA add-ons are disabled, is your problem still occurring?

Does the issue still occur after you run the COM Registration Fixing Tool in NVDA's tools menu?

alexarnaud commented 1 year ago

Hello,

I confirm, I reproduced the issue with NVDA and not with JAWS.

Thanks a lot for reporting it.

Adriani90 commented 1 month ago

Comparing the two code snippets above, testing with NvDA 2024.4 Beta:

cc: @jcsteh since it affects Firefox mostly.

PtitBen commented 2 weeks ago

Hello,

This issue seems to have been triaged and has been given a priority level a little bit over a year ago. I was wondering if this is still on the books to be fixed?

We are experiencing the same issue where the heading (first child) of our alert copmonent is skipped by NVDA. Our only real option if this bug wasn't addressed for NVDA would be to slightly degrade the experience on other screen readers/clients to try to get the full content to be read by NVDA.

Thank you in advance for a potential update!

alexarnaud commented 1 week ago

Hello,

It remains this technic in the meantime: Make a screen reader talk with JavaScript and ARIA