[PR #10516] [CLOSED] [A11y] Treat last character as 'end of buffer' #28087

Open
opened 2026-01-31 09:26:14 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/10516
Author: @carlos-zamora
Created: 6/26/2021
Status: Closed

Base: dev/cazamor/a11y-7000/text-attributesHead: dev/cazamor/a11y-7000/document-end


📝 Commits (3)

  • b764ee4 Expose Text Attributes to UI Automation
  • a99fa3c fix/add tests; remove invalid attributes
  • 52ca191 [A11y] Treat last character as 'end of buffer'

📊 Changes

19 files changed (+1290 additions, -153 deletions)

View changed files

📝 src/buffer/out/textBuffer.cpp (+105 -57)
📝 src/buffer/out/textBuffer.hpp (+10 -9)
📝 src/buffer/out/textBufferCellIterator.cpp (+44 -8)
📝 src/buffer/out/textBufferCellIterator.hpp (+5 -1)
📝 src/cascadia/TerminalControl/ControlCore.cpp (+2 -0)
📝 src/cascadia/TerminalControl/XamlUiaTextRange.cpp (+52 -4)
📝 src/cascadia/TerminalCore/Terminal.hpp (+3 -1)
📝 src/cascadia/TerminalCore/terminalrenderdata.cpp (+10 -0)
📝 src/host/renderData.hpp (+1 -2)
📝 src/host/ut_host/TextBufferIteratorTests.cpp (+125 -13)
📝 src/interactivity/win32/ut_interactivity_win32/UiaTextRangeTests.cpp (+272 -0)
📝 src/renderer/inc/IRenderData.hpp (+0 -2)
📝 src/types/IBaseData.h (+1 -0)
📝 src/types/UiaTextRangeBase.cpp (+487 -48)
📝 src/types/UiaTextRangeBase.hpp (+7 -1)
📝 src/types/UiaTracing.cpp (+145 -5)
📝 src/types/UiaTracing.h (+15 -2)
📝 src/types/inc/viewport.hpp (+1 -0)
📝 src/types/viewport.cpp (+5 -0)

📄 Description

Summary of the Pull Request

Updates our UiaTextRange to treat the last legible character as the end of the buffer. Doing so significantly improves performance of word navigation because screen readers no longer have to take into account the whitespace following the end of the prompt.

This also fixes #7960. This bug was caused by the UiaTextRange occasionally having its _blockRange member set to true. As a result, the screen reader would read the block range of text from "start" to "end" as if it was a block selection created by Alt+Mouse.

References

#7000 - Epic
Closes #6986
Closes #7960

Detailed Description of the Pull Request / Additional comments

Coming soon!

Validation Steps Performed

  • Tests added/passed
  • NVDA - manual testing
  • Accessibility Insights - manual testing
  • Narrator - manual testing

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/10516 **Author:** [@carlos-zamora](https://github.com/carlos-zamora) **Created:** 6/26/2021 **Status:** ❌ Closed **Base:** `dev/cazamor/a11y-7000/text-attributes` ← **Head:** `dev/cazamor/a11y-7000/document-end` --- ### 📝 Commits (3) - [`b764ee4`](https://github.com/microsoft/terminal/commit/b764ee48ff6087bb612d09d506007ffcda1d7bb6) Expose Text Attributes to UI Automation - [`a99fa3c`](https://github.com/microsoft/terminal/commit/a99fa3cd645ad667c56ed0f18c08bf49baf16c79) fix/add tests; remove invalid attributes - [`52ca191`](https://github.com/microsoft/terminal/commit/52ca1917f8fe9075c38da563d960c535c1f7f6a0) [A11y] Treat last character as 'end of buffer' ### 📊 Changes **19 files changed** (+1290 additions, -153 deletions) <details> <summary>View changed files</summary> 📝 `src/buffer/out/textBuffer.cpp` (+105 -57) 📝 `src/buffer/out/textBuffer.hpp` (+10 -9) 📝 `src/buffer/out/textBufferCellIterator.cpp` (+44 -8) 📝 `src/buffer/out/textBufferCellIterator.hpp` (+5 -1) 📝 `src/cascadia/TerminalControl/ControlCore.cpp` (+2 -0) 📝 `src/cascadia/TerminalControl/XamlUiaTextRange.cpp` (+52 -4) 📝 `src/cascadia/TerminalCore/Terminal.hpp` (+3 -1) 📝 `src/cascadia/TerminalCore/terminalrenderdata.cpp` (+10 -0) 📝 `src/host/renderData.hpp` (+1 -2) 📝 `src/host/ut_host/TextBufferIteratorTests.cpp` (+125 -13) 📝 `src/interactivity/win32/ut_interactivity_win32/UiaTextRangeTests.cpp` (+272 -0) 📝 `src/renderer/inc/IRenderData.hpp` (+0 -2) 📝 `src/types/IBaseData.h` (+1 -0) 📝 `src/types/UiaTextRangeBase.cpp` (+487 -48) 📝 `src/types/UiaTextRangeBase.hpp` (+7 -1) 📝 `src/types/UiaTracing.cpp` (+145 -5) 📝 `src/types/UiaTracing.h` (+15 -2) 📝 `src/types/inc/viewport.hpp` (+1 -0) 📝 `src/types/viewport.cpp` (+5 -0) </details> ### 📄 Description ## Summary of the Pull Request Updates our `UiaTextRange` to treat the last legible character as the end of the buffer. Doing so significantly improves performance of word navigation because screen readers no longer have to take into account the whitespace following the end of the prompt. This also fixes #7960. This bug was caused by the `UiaTextRange` occasionally having its `_blockRange` member set to `true`. As a result, the screen reader would read the block range of text from "start" to "end" as if it was a block selection created by Alt+Mouse. ## References #7000 - Epic Closes #6986 Closes #7960 ## Detailed Description of the Pull Request / Additional comments _Coming soon!_ ## Validation Steps Performed - [ ] Tests added/passed - [x] NVDA - manual testing - [x] Accessibility Insights - manual testing - [ ] Narrator - manual testing --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:26:14 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#28087