UIA: more intelligent word boundaries #15324

Open
opened 2026-01-31 04:35:10 +00:00 by claunia · 2 comments
Owner

Originally created by @codeofdusk on GitHub (Sep 23, 2021).

Windows Terminal version (or Windows build number)

OpenConsole commit 5deb332

Other Software

NVDA 2021.3

Steps to reproduce

Move by word in a UIA console containing the following text:

Loading file c:\test.json

Expected Behavior

In Microsoft Word, NVDA splits the word boundaries as follows:

['Loading ', 'file ', 'c', ':\\', 'test', '.', 'json']

Actual Behavior

In conhost, NVDA splits the words as follows:

['Loading ', 'file ', 'c:\\test.json                                                                                               \r\n                                                                                                                        ']
Originally created by @codeofdusk on GitHub (Sep 23, 2021). ### Windows Terminal version (or Windows build number) OpenConsole commit 5deb332 ### Other Software NVDA 2021.3 ### Steps to reproduce Move by word in a UIA console containing the following text: Loading file c:\test.json ### Expected Behavior In Microsoft Word, NVDA splits the word boundaries as follows: ``` python ['Loading ', 'file ', 'c', ':\\', 'test', '.', 'json'] ``` ### Actual Behavior In conhost, NVDA splits the words as follows: ``` python ['Loading ', 'file ', 'c:\\test.json \r\n '] ```
claunia added the Product-ConhostIssue-BugArea-Accessibility labels 2026-01-31 04:35:10 +00:00
Author
Owner

@codeofdusk commented on GitHub (Sep 23, 2021):

NVDA's legacy console support (and the version I implemented for pre #4018 builds) uses the Uniscribe API to determinbe word boundaries. This sort of approach, if possible in conhost, would have two benefits:

Otherwise, the word navigation in this commit is flawless (very fast and otherwise accurate). Great work @carlos-zamora!

@codeofdusk commented on GitHub (Sep 23, 2021): NVDA's legacy console support (and the version I implemented for pre #4018 builds) [uses the Uniscribe API](https://github.com/nvaccess/nvda/blob/master/nvdaHelper/local/textUtils.cpp#L24) to determinbe word boundaries. This sort of approach, if possible in conhost, would have two benefits: * The boundaries are closer to those found in Microsoft Word and other applications and are therefore more aligned with user expectations. * Some languages [do not separate words with spaces](https://linguistics.stackexchange.com/questions/6131/is-there-a-long-list-of-languages-whose-writing-systems-dont-use-spaces) or [do so inconsistently](https://docs.microsoft.com/en-gb/globalization/input/line-and-word-breaking). Is this of concern in conhost? Otherwise, the word navigation in this commit is flawless (very fast and otherwise accurate). Great work @carlos-zamora!
Author
Owner

@zadjii-msft commented on GitHub (Sep 27, 2021):

IIRC we're using the wordDelimiters for splitting words, which are configurable by the user, even in conhost (though, much harder to set for conhost). I could be wrong about that though.

The "actual behavior" here though does sound wrong 😨

@zadjii-msft commented on GitHub (Sep 27, 2021): IIRC we're using the `wordDelimiters` for splitting words, which are configurable by the user, even in conhost (though, much harder to set for conhost). I could be wrong about that though. The "actual behavior" here though does sound wrong 😨
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#15324