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

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

Original Pull Request: https://github.com/microsoft/terminal/pull/4510

State: closed
Merged: No


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.

**Original Pull Request:** https://github.com/microsoft/terminal/pull/4510 **State:** closed **Merged:** No --- ## 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.
claunia added the pull-request label 2026-01-31 09:11:50 +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#25797