nvaccess / nvda

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

NVDA doesn't pause for line breaks in edit fields, but does for HTML paragraphs #12963

Open TheQuinbox opened 3 years ago

TheQuinbox commented 3 years ago

Is your feature request related to a problem? Please describe.

Currently, NVDA doesn't pause for line breaks in edit fields, but does for HTML paragraphs when using say all.

Describe the solution you'd like

NVDA should pause for new lines in text fields. FOr example, if I had

Chapter 1

test

NVDA should read it when using say all like it was an HTML document, with

<p>Chapter 1</p>
<p>Test.</p>

Describe alternatives you've considered

Keep it the way it is. This isn't ideal though; it makes NVDA a horrible ebook reader, for one.

Additional context

Adriani90 commented 1 year ago

@TheQuinbox I cannot reproduce your problem with NVDA 2023.1 and eSpeak. Which synthesizer are you using?

dennischenfeng commented 1 year ago

+1 on this issue. I've had the same issue as OP for all NVDA versions so far (including 2023.1 and currently 2023.2). And the issue occurs using the eSpeak synthesizer in addition to the Windows OneCore voices, and I imagine for other synthesizers as well. FYI I'm using Windows 11, with most recent update.

I can't tell in what way it's not reproducible by @Adriani90 and perhaps others, so here's more expansion on the problem, at the risk of sounding excruciatingly and redundantly detailed (in case there's something we're missing).

  1. When I go to OP's original post, to the text where there is "Chapter 1", followed by a blank line, followed by "test", and I start NVDA's "say all" command (NVDA+down), the speech that I hear is "Chapter 1 test", as if there was no pause between the two lines.
  2. I would expect that it should instead sound like there was a pause at the line break, as if there was a period at the end of the first line to end the sentence with a pause. It should sound like: Chapter 1. test.

This issue hits me whenever I use edit boxes (like in writing this very comment), just like OP stated. Also like drafting emails in GMail and reading code in VS Code and reading EPubs in QRead.

cc @Adriani90

dennischenfeng commented 1 year ago

This is an ugly workaround that I found to get the job done, with some tolerable side effects.

  1. Go the symbol pronunciation menu by opening NVDA menu, then preferences, then punctuation/symbol pronunciation menu.
  2. press shift+tab to move focus to the filter input field.
  3. search for a symbol with label "line feed". Or whichever is the character which you want to be pronounced with a pause during say-all. For me, that's usually the "line feed" one, but sometimes is "carriage return".
  4. Find the desired symbol in the symbols list, then tab down to edit it
  5. change the replacement to "...". That is, type three dots into the input field.
  6. Tab to the "level" field, and change it to "none".
  7. And tab again to ensure "send actual symbol to synthesizer field" is set to "never".

This modification just replaces the "line feed" symbol to an ellipses "...", which becomes a short pause in the synthesizer. One side effect though is that if you navigate by character, you'll hear "dot dot dot" instead of "line feed", which is a little dumb. Otherwise, it seems to solve the problem for me, with SayAll.

Warning: in order to filter search the symbol pronunciation menu moving forward, you will need to search for "..." and it will no longer be called "line feed". You can play with other replacements that include other symbols that cause a speech pause, like semicolon, colon, period, comma.

If anyone finds a better workaround, I'm all ears. cc @TheQuinbox

foxbunny commented 1 year ago

I find that physically inserting an invisible comma, period, or semicolon in the document is the most natural workaround at this time. It looks kinda ugly in the code, but it is what it is.