[PR #4373] [MERGED] Introduce UiaTextRangeBase::FindText() for Accessibility #25724

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/4373
Author: @carlos-zamora
Created: 1/28/2020
Status: Merged
Merged: 1/31/2020
Merged by: @undefined

Base: masterHead: dev/cazamor/acc/find-text


📝 Commits (10+)

  • 719676c utr refactor
  • e7555dc Refactor UiaTextRange:
  • 76a26e3 remove accidental file
  • d4c4e29 Add accessibilityMode to GetWordStart/End and Viewport functions.
  • 3017aaa Testing!!!!
  • f6b2ea2 wtvr
  • 9a40869 Let's try doing word nav this way
  • ea22c8f Add testing for Compare, CompareEndpoint, Expand, and MoveEndpointByRange
  • bcfc522 Turns out, the bug is in our wrapper class. Not supposed to return nullptr when attribute not found. Don't know why this is an issue now
  • 71d50cb - Code format

📊 Changes

11 files changed (+79 additions, -87 deletions)

View changed files

📝 src/cascadia/TerminalControl/UiaTextRange.cpp (+0 -9)
📝 src/cascadia/TerminalControl/UiaTextRange.hpp (+0 -4)
📝 src/cascadia/TerminalControl/XamlUiaTextRange.cpp (+11 -7)
📝 src/inc/HostAndPropsheetIncludes.h (+4 -0)
📝 src/interactivity/win32/screenInfoUiaProvider.hpp (+2 -1)
📝 src/interactivity/win32/uiaTextRange.cpp (+0 -53)
📝 src/interactivity/win32/uiaTextRange.hpp (+0 -4)
📝 src/types/ScreenInfoUiaProviderBase.h (+2 -1)
📝 src/types/UiaTextRangeBase.cpp (+54 -1)
📝 src/types/UiaTextRangeBase.hpp (+5 -6)
📝 src/types/WindowUiaProviderBase.hpp (+1 -1)

📄 Description

Moved FindText to UiaTextRangeBase. Now that Search is a shared component (thanks #3279), I can just reuse it basically as-is.

#3279 - Make Search a shared component
#4018 - UiaTextRange Refactor

I removed it from the two different kinds of UiaTextRange and put it in the base class.

I needed a very minor change to ensure we convert from an inclusive end (from Search) to an exclusive end (in UTR).

Worked with FindText was globally messed with in windows.h. So we had to do a few weird things there (thanks Michael).

No need for additional tests because it literally just sets up a Searcher and calls it.


🔄 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/4373 **Author:** [@carlos-zamora](https://github.com/carlos-zamora) **Created:** 1/28/2020 **Status:** ✅ Merged **Merged:** 1/31/2020 **Merged by:** [@undefined](undefined) **Base:** `master` ← **Head:** `dev/cazamor/acc/find-text` --- ### 📝 Commits (10+) - [`719676c`](https://github.com/microsoft/terminal/commit/719676c30dc79a770b1f407f23c0053ce075d516) utr refactor - [`e7555dc`](https://github.com/microsoft/terminal/commit/e7555dc1ece7dd57eb4bfd84960c377c0d649b5c) Refactor UiaTextRange: - [`76a26e3`](https://github.com/microsoft/terminal/commit/76a26e3f62f850270d585ee8c04f8682675b7d5d) remove accidental file - [`d4c4e29`](https://github.com/microsoft/terminal/commit/d4c4e29204f4fae95823cec7c471d2d3aa40c4ab) Add accessibilityMode to GetWordStart/End and Viewport functions. - [`3017aaa`](https://github.com/microsoft/terminal/commit/3017aaae9a8303dd531518f726d71e4d5831f005) Testing!!!! - [`f6b2ea2`](https://github.com/microsoft/terminal/commit/f6b2ea2b3fbc015a812e5784fa7f7f238a8e7bfc) wtvr - [`9a40869`](https://github.com/microsoft/terminal/commit/9a40869a4b7bfc27b872d6fe9f2d3a189e529220) Let's try doing word nav this way - [`ea22c8f`](https://github.com/microsoft/terminal/commit/ea22c8f360009889f893110c257d846615cbdbd3) Add testing for Compare, CompareEndpoint, Expand, and MoveEndpointByRange - [`bcfc522`](https://github.com/microsoft/terminal/commit/bcfc52245b91e67974d6ad3d91fe910a7347165e) Turns out, the bug is in our wrapper class. Not supposed to return nullptr when attribute not found. Don't know why this is an issue _now_ - [`71d50cb`](https://github.com/microsoft/terminal/commit/71d50cb936995725e6372dd94417153b7c80a75c) - Code format ### 📊 Changes **11 files changed** (+79 additions, -87 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/TerminalControl/UiaTextRange.cpp` (+0 -9) 📝 `src/cascadia/TerminalControl/UiaTextRange.hpp` (+0 -4) 📝 `src/cascadia/TerminalControl/XamlUiaTextRange.cpp` (+11 -7) 📝 `src/inc/HostAndPropsheetIncludes.h` (+4 -0) 📝 `src/interactivity/win32/screenInfoUiaProvider.hpp` (+2 -1) 📝 `src/interactivity/win32/uiaTextRange.cpp` (+0 -53) 📝 `src/interactivity/win32/uiaTextRange.hpp` (+0 -4) 📝 `src/types/ScreenInfoUiaProviderBase.h` (+2 -1) 📝 `src/types/UiaTextRangeBase.cpp` (+54 -1) 📝 `src/types/UiaTextRangeBase.hpp` (+5 -6) 📝 `src/types/WindowUiaProviderBase.hpp` (+1 -1) </details> ### 📄 Description Moved `FindText` to `UiaTextRangeBase`. Now that Search is a shared component (thanks #3279), I can just reuse it basically as-is. #3279 - Make Search a shared component #4018 - UiaTextRange Refactor I removed it from the two different kinds of UiaTextRange and put it in the base class. I needed a very minor change to ensure we convert from an inclusive end (from Search) to an exclusive end (in UTR). Worked with `FindText` was globally messed with in windows.h. So we had to do a few weird things there (thanks Michael). No need for additional tests because it _literally_ just sets up a Searcher and calls it. --- <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:23 +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#25724