[PR #4510] [CLOSED] Add UIA Provider Support for Block Selection #25792

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/4510
Author: @carlos-zamora
Created: 2/8/2020
Status: Closed

Base: dev/cazamor/acc/sig/selectionHead: dev/cazamor/acc/box-selection


📝 Commits (4)

  • e3b58b5 Add IsLineSelection() to IUiaData
  • 42791cb Remove GetSelectionRange(). Move logic to base class
  • bf1b8da Add construction for UiaTextRange of a block selection
  • 43a87ad Buildable + Tested state

📊 Changes

17 files changed (+104 additions, -106 deletions)

View changed files

📝 src/cascadia/TerminalControl/TermControlUiaProvider.cpp (+9 -31)
📝 src/cascadia/TerminalControl/TermControlUiaProvider.hpp (+5 -9)
📝 src/cascadia/TerminalControl/UiaTextRange.cpp (+2 -1)
📝 src/cascadia/TerminalControl/UiaTextRange.hpp (+1 -0)
📝 src/cascadia/TerminalCore/Terminal.hpp (+1 -0)
📝 src/cascadia/TerminalCore/TerminalSelection.cpp (+9 -0)
📝 src/host/renderData.cpp (+11 -0)
📝 src/host/renderData.hpp (+1 -0)
📝 src/interactivity/win32/screenInfoUiaProvider.cpp (+9 -31)
📝 src/interactivity/win32/screenInfoUiaProvider.hpp (+5 -9)
📝 src/interactivity/win32/uiaTextRange.cpp (+12 -1)
📝 src/interactivity/win32/uiaTextRange.hpp (+8 -0)
📝 src/types/IUiaData.h (+1 -0)
📝 src/types/ScreenInfoUiaProviderBase.cpp (+13 -11)
📝 src/types/ScreenInfoUiaProviderBase.h (+5 -9)
📝 src/types/UiaTextRangeBase.cpp (+6 -4)
📝 src/types/UiaTextRangeBase.hpp (+6 -0)

📄 Description

Summary of the Pull Request

If a block selection was created, we would interpret the selection as a regular span of text. This modifies the UiaTextRange to appropriately define such a selection.

PR Checklist

Detailed Description of the Pull Request / Additional comments

I added a IsLineSelection function to UiaData to provide access to that knowledge to the Uia Providers.

ScreenInfoUiaProviderBase

  • removed unnecessary parameters referencing the "parent" of a UiaTextRange (it was always this).]
  • removed GetSelectionRange. No longer necessary as everything is abstracted away
  • abstracted logic of GetSelectionRange to the base class

UiaTextRangeBase

  • added a bool flag to keep track of whether we should treat the text range as a block selection
  • updated GetText, GetBoundingRect, and constructor appropriately

Validation Steps Performed

Did a GetSelection call using accessibility insights during a box selection. Extracted text and bounding rects are correct.


🔄 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/4510 **Author:** [@carlos-zamora](https://github.com/carlos-zamora) **Created:** 2/8/2020 **Status:** ❌ Closed **Base:** `dev/cazamor/acc/sig/selection` ← **Head:** `dev/cazamor/acc/box-selection` --- ### 📝 Commits (4) - [`e3b58b5`](https://github.com/microsoft/terminal/commit/e3b58b54fa9ca8559b54c0543b2cad34bf3febe5) Add IsLineSelection() to IUiaData - [`42791cb`](https://github.com/microsoft/terminal/commit/42791cbea51b1e662124d65f7cc852ac805e29bb) Remove GetSelectionRange(). Move logic to base class - [`bf1b8da`](https://github.com/microsoft/terminal/commit/bf1b8daea92b661e84e9f0c1578bbc9a4640000e) Add construction for UiaTextRange of a block selection - [`43a87ad`](https://github.com/microsoft/terminal/commit/43a87adfb5c13a1f42de8e5690df9a4aeac63f17) Buildable + Tested state ### 📊 Changes **17 files changed** (+104 additions, -106 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/TerminalControl/TermControlUiaProvider.cpp` (+9 -31) 📝 `src/cascadia/TerminalControl/TermControlUiaProvider.hpp` (+5 -9) 📝 `src/cascadia/TerminalControl/UiaTextRange.cpp` (+2 -1) 📝 `src/cascadia/TerminalControl/UiaTextRange.hpp` (+1 -0) 📝 `src/cascadia/TerminalCore/Terminal.hpp` (+1 -0) 📝 `src/cascadia/TerminalCore/TerminalSelection.cpp` (+9 -0) 📝 `src/host/renderData.cpp` (+11 -0) 📝 `src/host/renderData.hpp` (+1 -0) 📝 `src/interactivity/win32/screenInfoUiaProvider.cpp` (+9 -31) 📝 `src/interactivity/win32/screenInfoUiaProvider.hpp` (+5 -9) 📝 `src/interactivity/win32/uiaTextRange.cpp` (+12 -1) 📝 `src/interactivity/win32/uiaTextRange.hpp` (+8 -0) 📝 `src/types/IUiaData.h` (+1 -0) 📝 `src/types/ScreenInfoUiaProviderBase.cpp` (+13 -11) 📝 `src/types/ScreenInfoUiaProviderBase.h` (+5 -9) 📝 `src/types/UiaTextRangeBase.cpp` (+6 -4) 📝 `src/types/UiaTextRangeBase.hpp` (+6 -0) </details> ### 📄 Description ## Summary of the Pull Request If a block selection was created, we would interpret the selection as a regular span of text. This modifies the UiaTextRange to appropriately define such a selection. ## PR Checklist * [x] Closes #4509 * [x] CLA signed. ## Detailed Description of the Pull Request / Additional comments I added a `IsLineSelection` function to UiaData to provide access to that knowledge to the Uia Providers. ### ScreenInfoUiaProviderBase - removed unnecessary parameters referencing the "parent" of a UiaTextRange (it was always `this`).] - removed GetSelectionRange. No longer necessary as everything is abstracted away - abstracted logic of GetSelectionRange to the base class ### UiaTextRangeBase - added a bool flag to keep track of whether we should treat the text range as a block selection - updated GetText, GetBoundingRect, and constructor appropriately ## Validation Steps Performed Did a `GetSelection` call using accessibility insights during a box selection. Extracted text and bounding rects are correct. --- <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:11:49 +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#25792