terminal/src/interactivity/win32
Carlos Zamora d08afc4e88
[A11y] Treat last character as 'end of buffer' (#11122)
## Summary of the Pull Request
Updates our `UiaTextRange` to no longer treat the end of the buffer as the "document end". Instead, we consider the "document end" to be the line beneath the cursor or last legible character (whichever is further down). In the event where the last legible character is on the last line of the buffer, we use the "end exclusive" position (left-most point on a line one past the end of the buffer). 

When movement of any kind occurs, we clamp each endpoint to the document end. Since the document end is an actual spot in the buffer (most of the time), this should improve stability because we shouldn't be pointing out-of-bounds anymore.

The biggest benefit is that this significantly improves the performance of word navigation because screen readers no longer have to take into account the whitespace following the end of the prompt.

Word navigation tests were added to the `TestTableWriter` (see #10886). 24 of the 85 tests were failing, however, they don't seem to interact with the document end, so I've marked them as skip and will fix them in a follow-up. This PR is large enough as-is, so I'm hoping I can take time in the follow-up to clean some things on the side (aka `preventBoundary` and `allowBottomExclusive` being used interchangeably).

## References
#7000 - Epic
Closes #6986 
Closes #10925

## Validation Steps Performed
- [X] Tests pass
- [X] @codeofdusk has been personally testing this build (and others)
2021-09-16 20:44:29 +00:00
..
lib InteractivityWin32: Add a dependency on Dx (#5851) 2020-05-11 15:09:14 -07:00
ut_interactivity_win32 [A11y] Treat last character as 'end of buffer' (#11122) 2021-09-16 20:44:29 +00:00
AccessibilityNotifier.cpp Change backslashes in include statements to forward slashes (#8205) 2020-11-25 21:02:10 +00:00
AccessibilityNotifier.hpp Change backslashes in include statements to forward slashes (#8205) 2020-11-25 21:02:10 +00:00
Clipboard.cpp PICK: Move CharToKeyEvents into InteractivityBase (GH-9106) 2021-02-10 17:13:00 -08:00
clipboard.hpp Change backslashes in include statements to forward slashes (#8205) 2020-11-25 21:02:10 +00:00
coninteractivitywin32.rcv Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00
ConsoleControl.cpp Change backslashes in include statements to forward slashes (#8205) 2020-11-25 21:02:10 +00:00
ConsoleControl.hpp Persist inbox conhost; delegate control activities to it via a pipe (#10415) 2021-06-16 19:23:37 +00:00
ConsoleInputThread.cpp Add names to threads to make debugging a slight bit easier (#9801) 2021-04-14 10:56:52 +00:00
ConsoleInputThread.hpp Change backslashes in include statements to forward slashes (#8205) 2020-11-25 21:02:10 +00:00
consoleKeyInfo.cpp Change NULL to nullptr since they are pointers (#4960) 2020-03-20 20:35:12 +00:00
consoleKeyInfo.hpp Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00
CustomWindowMessages.h add clang-format conf to the project, format the c++ code (#1141) 2019-06-11 13:27:09 -07:00
dirs Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00
find.cpp Change backslashes in include statements to forward slashes (#8205) 2020-11-25 21:02:10 +00:00
find.h Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00
icon.cpp Change backslashes in include statements to forward slashes (#8205) 2020-11-25 21:02:10 +00:00
icon.hpp add clang-format conf to the project, format the c++ code (#1141) 2019-06-11 13:27:09 -07:00
InputServices.cpp add clang-format conf to the project, format the c++ code (#1141) 2019-06-11 13:27:09 -07:00
InputServices.hpp Change backslashes in include statements to forward slashes (#8205) 2020-11-25 21:02:10 +00:00
menu.cpp Change backslashes in include statements to forward slashes (#8205) 2020-11-25 21:02:10 +00:00
menu.hpp add clang-format conf to the project, format the c++ code (#1141) 2019-06-11 13:27:09 -07:00
precomp.cpp Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00
precomp.h Change backslashes in include statements to forward slashes (#8205) 2020-11-25 21:02:10 +00:00
res.rc Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00
resource.h add clang-format conf to the project, format the c++ code (#1141) 2019-06-11 13:27:09 -07:00
screenInfoUiaProvider.cpp Tie up some A11y loose threads (#6417) 2020-06-10 15:15:26 +00:00
screenInfoUiaProvider.hpp Change backslashes in include statements to forward slashes (#8205) 2020-11-25 21:02:10 +00:00
sources.inc Merged PR 6176782: [Git2Git] Get rid of dead build macros/#defines FE_IME, W32_SB, etc. 2021-06-21 10:50:52 -07:00
SystemConfigurationProvider.cpp Initialize stack variables. check return code from shell lnk loading (#8712) 2021-01-06 12:03:45 +00:00
SystemConfigurationProvider.hpp Change backslashes in include statements to forward slashes (#8205) 2020-11-25 21:02:10 +00:00
uiaTextRange.cpp Change backslashes in include statements to forward slashes (#8205) 2020-11-25 21:02:10 +00:00
uiaTextRange.hpp Change backslashes in include statements to forward slashes (#8205) 2020-11-25 21:02:10 +00:00
window.cpp Fix conhost UseDx mode (#10770) 2021-07-23 20:19:07 +02:00
window.hpp Fix restore window position when exiting fullscreen (#9737) 2021-04-13 16:33:00 +00:00
windowdpiapi.cpp Merged PR 5421982: Reflect OS build changes 2020-11-19 23:21:37 +00:00
windowdpiapi.hpp Change backslashes in include statements to forward slashes (#8205) 2020-11-25 21:02:10 +00:00
WindowIme.cpp Change backslashes in include statements to forward slashes (#8205) 2020-11-25 21:02:10 +00:00
windowime.hpp Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00
windowio.cpp Fix the xterm and SGR mouse encodings for CTRL, ALT, SHIFT (#8379) 2020-11-30 03:45:53 +00:00
windowio.hpp Change backslashes in include statements to forward slashes (#8205) 2020-11-25 21:02:10 +00:00
WindowMetrics.cpp Change backslashes in include statements to forward slashes (#8205) 2020-11-25 21:02:10 +00:00
WindowMetrics.hpp Change backslashes in include statements to forward slashes (#8205) 2020-11-25 21:02:10 +00:00
windowproc.cpp Fix building with v143 toolchain (#10727) 2021-07-20 19:00:49 +02:00
windowUiaProvider.cpp Tie up some A11y loose threads (#6417) 2020-06-10 15:15:26 +00:00
windowUiaProvider.hpp Replace std::map with std::unordered_map (#6640) 2020-06-23 20:49:07 +00:00