nvaccess / nvda

NVDA, the free and open source Screen Reader for Microsoft Windows
Other
2.08k stars 625 forks source link

Firefox/Chrome/Edge: NVDA drops words and phrases in continuous reading, and repeats others #15338

Open amirsol81 opened 1 year ago

amirsol81 commented 1 year ago

In summary, when continuous reading (NVDA key+Down) is triggered on some websites, NVDA repeats some words and phrases, and drops many others, mostly from the end or beginning of paragraphs, resulting in the generation of unintelligible speech utterances. JAWS and Narrator don't display this glitch, and both Firefox and Chrome/Edge are affected by NVDA - with or without add-ons.

Steps to reproduce:

  1. Open the following page as a sample: https://www.arabnews.com/node/2353066/media
  2. Find the word "London" on the page and press NVDA key+Down to start continuous reading. Feel free to stop/resume continuous reading if you wish, but each time listen for at least 30 seconds or so.

    Actual behavior:

    Interestingly, each time we start continuous reading, NVDA repeats and drops different words/phrases from different positions. For instance, sometimes NVDA says and repeats "dopts modern standards," sometimes "the internet," etc. And, in the way, many words or phrases, mostly from the end or beginning of paragraphs, are omitted. Keep listening for 30 seconds or so, and you'll notice the repetitions and omissions easily.

    Expected behavior:

    Nothing is repeated, nothing is dropped, and text is read normally.

    NVDA logs, crash dumps and other attachments:

System configuration

NVDA installed/portable/running from source:

Installed

NVDA version:

2023.1, 2023.2 Beta 3, and Alpha 28949

Windows version:

Both 10 and 11

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

Firefox and Chrome/Edge 116

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.

Yes- as mentioned above

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?

Not tested

bingen13 commented 1 year ago

Interesting bug. I'd experienced it before with NVDA on a page that had some heavy Javascript. Two interesting things:

  1. The page behaves a bit erratically with a braille display. Focus seems to move.
  2. There's a workaround on Firefox: view, page style, no style fixes it.
Brian1Gaff commented 1 year ago

This seems to be operating system and browser agnostic,as it happens in Waterfox classic based on the earlier Mozilla platform. I tend to hear repetitions of parts of or whole words and phrases. I think that it has something to do with javascript. In some pages in the slower waterfox you can get momentary or longer apparent lock ups as well in nvda. Brian

-- @. Sent via blueyonder.(Virgin media) Please address personal E-mail to:- @., putting 'Brian Gaff' in the display name field.

Adriani90 commented 1 year ago

Is the setting automatically move system focus to focusable elements disabled in nvda‘s browse mode settings?

amirsol81 commented 1 year ago

@Adriani90 Yes, the "Automatically move system focus to focusable elements" check box is unchecked as enabling it generates other strange issues.

Adriani90 commented 1 year ago

Hmm in this case maybe @jcsteh or @michaelDCurran can help here, I think the system focus should not impact the virtual cursor at all, regardless of the javascript usage. This bug must be somewhere in the NVDA still trying to sync the system focus and the virtual cursor despite the disabled setting.

jcsteh commented 1 year ago

This is likely caused by the page updating during say all. If an earlier part of the page updates, the say all position probably ends up in the wrong spot. The browse mode caret compensates for this, but I suspect say all does not.

I would have suggested that maybe the page scrolling is causing it to update, since Javascript can run in response to scroll events. However, NVDA doesn't currently scroll during say all (even though it probably should), so this isn't the issue.

jcsteh commented 1 year ago

Distilled test case:

data:text/html,
<div id="before"></div>
<div id="lines"></div>
<script>
for (let i = 1; i <= 100; ++i) {
  const p = document.createElement("p");
  p.textContent = `Line ${i}`;
  lines.append(p);
}

function update() {
  before.textContent += "a";
  setTimeout(update, 100);
}

update();
</script>

An additional character is added to the top of the page every 100 ms. If you say all on that page, you should hear Line 1, Line 2, etc. However, this will get messed up within a few seconds with this test case.

jcsteh commented 1 year ago

We compensate for updates for the browse mode caret in VBufStorage_buffer_t::replaceSubtrees. Unfortunately, say all only retrieves the caret for the initial line. After that, it assumes the caret doesn't move during speech; see speech.sayAll._TextReader.nextLineImpl.

amirsol81 commented 11 months ago

Yet another website demonstrating this:

  1. Go to https://amateurphotographer.com/round-ups/iphone-15-pro-max-vs-samsung-galaxy-s23-ultra
  2. As you move to any heading and start continuous reading with NVDA key+Down, you should be able to duplicate it. However, I suggest moving to the following level-2 heading first: iPhone 15 Pro Max vs Samsung Galaxy S23 Ultra: General image quality @jcsteh @seanbudd @Qchristensen
Qchristensen commented 11 months ago

Yes I can replicate this on both the original page and iPhone page. It seems to be when it decides there is a new line, eg:

IO - speech.speech.speak (08:58:46.756) - MainThread (26252): Speaking [LangChangeCommand ('en'), 'There are also other “lenses” in ', CallbackCommand(name=say-all:lineReached), 'tween, including a 1.2x,....

(That line continues, but the original text should read "There are also other "lenses" in between, including a ....")

amirsol81 commented 6 months ago

Yet another example of this bug affecting continuous reading, this time on a popular Persian news website, inside its articles: https://www.radiofarda.com @jcsteh @michaelDCurran @Qchristensen any chance of taking care of this?

Cleversn commented 6 months ago

I experience it a lot, especially on sites containing heavy ads, like arstechnica and osnews.

amirsol81 commented 6 months ago

@Cleversn Even with an ad blocker like AdGuard it happens quite frequently.

mehgcap commented 6 months ago

Just to add: I sometimes encounter this on www.audible.com. I'm logged in, and use say all to read a book synopsis. Find a book, oepn the link to get to its detail page, press h to get to the summary, and press nvda-a (laptop layout) to read all. I run into the problem with repeated text much of the time, though not all the time. I have an ad blocker present, but I don't think audible.com has ads anyway. It does sometimes have carousels or other dynamic content for new book releases, which could cause interference the way some here suggested ads might.

amirsol81 commented 6 months ago

@mehgcap Also on www.wired.com even if you're logged in as a subscriber.