nvaccess / nvda

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

Ignore punctuation level when moving by word or greater, and the new caret location starts on punctuation #8057

Open Qchristensen opened 6 years ago

Qchristensen commented 6 years ago

This is particularly noticeable in Word, as control+left or right arrow moves to the start of each word, but also to punctuation. For instance, in the sentence:

The quick, brown fox!

(with a comma after quick and an exclamation mark after fox), from the start, pressing control+right arrow moves to the start of each word, but also to the comma and exclamation mark. Whether these are read depends on the punctuation level. Some other programs like Notepad ignore the punctuation and just jump to the start of the next or previous word so it isn't as noticeable.

With punctuation set to "some", for instance, nothing is read when control+right arrow lands on the comma or the exclamation mark.

I propose that when navigating by word (or line or any other method), if the only text to read is punctuation, NVDA should ignore the punctuation level as it does when moving by character. Currently, it is possible to move the caret in Word particularly, but get no feedback from NVDA in this situation. Reading as if punctuation level was set to all when landing on non-alphanumeric characters would ensure the user is provided with feedback when navigating.

zahra21 commented 6 years ago

hi quentin. i set punctuation to none and nvda announces punctuations in notepad plus plus and libreoffice when i navigate word by word. its not specific for word and i wanted to report it before, but i did not thought that it maybe is a bug in nvda speech.

Qchristensen commented 6 years ago

Interesting, the behaviour does seem to vary slightly between programs then.

Another inconsistency I found was in my sentence, if you misplaced the comma and had quick space comma brown, it behaves differently in Word as well:

the hungry, quick ,brown fox.

In word as you control+right arrow through reads: hungry (nothing) quick comma brown fox dot

NotePad++ treats each of those commas and the full stop as individual words and reads them out. Windows Notepad ignores all the punctuation, just reading the words themselves. At the end it does move to the full stop, but reads the word "fox" again.

Adriani90 commented 4 years ago

This is better now after #11167 has been merged. But Notepad is still not working here. It seems the editor treats only a space bar as word separator. For notepad a coma or a fullstop is not a word separator. For example, if you write "hello,how" in notepad, the whole expression is read although there are actually three word in there. "hello", "fullstop" and "how". @Qchristensen I think this should be reported to Microsoft, or NVDA could build its own asumption on what a word should be in this application.

XLTechie commented 4 years ago

But should that be a word break?

There is no valid grammar use that I know of, for using a comma without a following space, except in the US-English thousands separator. (1,000,000.00)

"hello,how" is just one word, from one point of view, because the valid two word phrase would be "hello, how".

For "hello.how", that is also not a valid two word phrase. It may be a domain name, but I'm not sure what that would mean for processing.

On Thu, 25 Jun 2020, Adriani90 wrote:

This is better now after #11167 has been merged. But Notepad is still not working here. It seems the editor treats only a space bar as word separator. For notepad a coma or a fullstop is not a word separator. For example, if you write "hello,how" in notepad, the whole expression is read although there are actually three word in there. "hello", "fullstop" and "how". @Qchristensen I think this should be reported to Microsoft, or NVDA could build its own asumption on what a word should be in this application.

Adriani90 commented 4 years ago

For some languages this is relevant. Or for words with dashes, or something like that.

Von meinem iPhone gesendet

Am 25.06.2020 um 23:15 schrieb Luke Davis notifications@github.com:

 But should that be a word break?

There is no valid grammar use that I know of, for using a comma without a following space, except in the US-English thousands separator. (1,000,000.00)

"hello,how" is just one word, from one point of view, because the valid two word phrase would be "hello, how".

For "hello.how", that is also not a valid two word phrase. It may be a domain name, but I'm not sure what that would mean for processing.

On Thu, 25 Jun 2020, Adriani90 wrote:

This is better now after #11167 has been merged. But Notepad is still not working here. It seems the editor treats only a space bar as word separator. For notepad a coma or a fullstop is not a word separator. For example, if you write "hello,how" in notepad, the whole expression is read although there are actually three word in there. "hello", "fullstop" and "how". @Qchristensen I think this should be reported to Microsoft, or NVDA could build its own asumption on what a word should be in this application. — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

Adriani90 commented 1 year ago

I would limit this request only for word navigation (ctrl+shift+right and left arrow), because punctuation and symbol level is always changed by the user in order to make reading line by line or paragraph by paragraph more efficient. So changing the symbol or punctuation level should affect only navigation greater than word navigation.

Qchristensen commented 1 year ago

I'm happy to ignore the "hello,how" case as given that is not structurally correct without a space, it is unclear how it should be read. But ,in fact, in Windows 11 notepad:

hello, how

(with a space after the comma) is now treated as three words. This is different to how Windows 10 notepad was at least when I created this issue in 2018.

Word, and Chrome also treat that as three words, although Firefox treats it as two words. So the issue seems to be widespread. Short of getting the computer industry to agree on a common standard for word navigation, perhaps the "best" solution would be if we could add an option to NVDA's document navigation to override how moving by word works?