nvaccess / nvda

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

aria-label not announcing correctly for a button or link with only hidden content within it #17412

Open GavinOgstonTR opened 3 days ago

GavinOgstonTR commented 3 days ago

Using NVDA with Edge - If you have a button or link with a descriptive aria-label to name it and within that button or link element you have only an element that is hidden from screen readers using aria-hidden, just the first letter of the control’s aria-label is announced by NVDA when the element is tabbed to.

For example,

<button aria-label="More">
    <i aria-hidden="true> + <i>
</button>

The control above would be announced as “M button” using Edge and NVDA where as in chrome it would be announced as “More button”.

As additional information: This only occurs when NVDA is using the default MS UIA accessibility API. When it is forced to use the IAccessible2 API, it reads the button correctly.

Steps to reproduce:

Go to the following codepen test page: Codepen

Using Edge and NVDA review the example controls that demonstrate the issue. Tab to each control as the screen reader is running.

Actual behavior:

As you tab to each control that has only aria-hidden content within it, notice only the first letter of the control’s aria-label is announced.

Expected behavior:

The full content of the control’s aria-label is announced.

NVDA logs, crash dumps and other attachments:

n/a

System configuration

NVDA installed/portable/running from source:

NVDA installed

NVDA version:

2024.4 (2024.4.0.34423)

Windows version:

Version 10.0.22631 Build 22631

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

Version 130.0.2849.89 (Official build) stable app, extended channel (64-bit)

Other information about your system:

n/a

Other questions

Does the issue still occur after restarting your computer?

Yes

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

No

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

Yes

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

Yes

Adriani90 commented 3 days ago

Just a note, the UIA in Chromium is not the default behavior in NVDA. The default setting is "only when suitable" and when this value is set, NVDA works as expected. So this issue is only related when UIA for Chromium is set to "yes".