nvda icon indicating copy to clipboard operation
nvda copied to clipboard

NVDA reads <ul> with 4 items as having 5 items

Open Epic-Third-Party-Bug-Reporting opened this issue 1 year ago • 4 comments

Steps to reproduce:

  1. Go to https://codepen.io/Epic-Third-Party-Bug-Reporting/pen/rNEBZyG
  2. In the iframe, arrow down to the list with four
  3. items and arrow through each item
  4. Observe that the list is said to have five items despite only having four

Actual behavior:

frame list with 5 items List Header 1 bullet Item 1 bullet Item 2 bullet Item 3 bullet Item 4 out of list

Expected behavior:

frame list with 4 items List Header 1 bullet Item 1 bullet Item 2 bullet Item 3 bullet Item 4 out of list

NVDA logs, crash dumps and other attachments:

System configuration

NVDA installed/portable/running from source:

Installed

NVDA version:

2023.1.0.27913

Windows version:

Edition: Windows 11 Enterprise Version: 23H2

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

Chrome Version 126.0.6478.183 (Official Build) (64-bit)

Other information about your system:

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

Hi, can you test with: NVDA 2024.2, Edge 126, and Firefox 128? That way we can figure out if this is a rendering issue or NVDA is getting confused about item count. Thanks.

josephsl avatar Jul 24 '24 16:07 josephsl

I think NVDA is considering all the list's child elements as list items, even those that are not <li> elements, this can be tested by creating a <p> inside a <ul> for example and NVDA will report the <p> on the count. Would the correct approach in this case be to introduce another attribute on the virtual buffer that only considers list item count?

thgcode avatar Jul 28 '24 23:07 thgcode

I agree a redesign of list item count needs to be investigated. E.g. for definition lists and description lists, NVDA counts definitions <dd> or descriptions of terms as separate list items which should not be the case.

@thgcode I think your approach would be the right direction, but not only for <li> elements, but also for <dt> elements.

Adriani90 avatar Oct 20 '24 19:10 Adriani90

cc: @SaschaCowley

Adriani90 avatar Oct 20 '24 19:10 Adriani90