[PR #2414] [MERGED] Accessibility: Refactor Providers #24924

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/2414
Author: @carlos-zamora
Created: 8/12/2019
Status: Merged
Merged: 8/21/2019
Merged by: @carlos-zamora

Base: masterHead: dev/cazamor/acc-providers


📝 Commits (5)

  • 1bf9a38 Refactor Accessibility providers
  • 9b857de WindowsTerminal's ScreenInfoUiaProvider --> TermControlUiaProvider
  • 1f771a2 Merge branch 'master' into dev/cazamor/acc-providers
  • 5738188 PR Feedback
  • f56e1dc PR change nit

📊 Changes

34 files changed (+1418 additions, -791 deletions)

View changed files

📝 src/cascadia/TerminalControl/TermControlAutomationPeer.cpp (+2 -2)
📝 src/cascadia/TerminalControl/TermControlAutomationPeer.h (+2 -2)
src/cascadia/TerminalControl/TermControlUiaProvider.cpp (+118 -0)
src/cascadia/TerminalControl/TermControlUiaProvider.hpp (+63 -0)
📝 src/cascadia/TerminalControl/TerminalControl.vcxproj (+4 -0)
📝 src/cascadia/TerminalControl/TerminalControl.vcxproj.filters (+5 -1)
src/cascadia/TerminalControl/UiaTextRange.cpp (+197 -0)
src/cascadia/TerminalControl/UiaTextRange.hpp (+83 -0)
📝 src/cascadia/TerminalControl/XamlUiaTextRange.cpp (+1 -1)
📝 src/cascadia/TerminalControl/XamlUiaTextRange.h (+1 -1)
📝 src/cascadia/TerminalCore/Terminal.hpp (+0 -14)
📝 src/cascadia/TerminalCore/terminalrenderdata.cpp (+0 -16)
📝 src/cascadia/WindowsTerminal/WindowUiaProvider.cpp (+13 -13)
📝 src/host/renderData.cpp (+1 -56)
📝 src/host/renderData.hpp (+0 -13)
📝 src/host/tracing.cpp (+2 -2)
📝 src/interactivity/win32/lib/win32.LIB.vcxproj (+4 -0)
📝 src/interactivity/win32/lib/win32.LIB.vcxproj.filters (+12 -0)
src/interactivity/win32/screenInfoUiaProvider.cpp (+132 -0)
src/interactivity/win32/screenInfoUiaProvider.hpp (+68 -0)

...and 14 more files

📄 Description

Summary of the Pull Request

Refactors the accessibility providers (ScreenInfoUiaProvider and UiaTextRange) into a better separated model between ConHost and Windows Terminal.

ScreenInfoUiaProviderBase and UiaTextRangeBase are introduced. ConHost and Windows Terminal implement their own versions of ScreenInfoUiaProvider and UiaTextRange that inherit from their respective base classes.

References

PR Checklist

Detailed Description of the Pull Request / Additional comments

  • Types now has ScreenInfoUiaProviderBase and UiaTextRangeBase to allow for shared code
  • UiaTextRange
    • Creates are used to properly create itself
      • this is needed because we need to use some virtual functions AFTER we are created to fully initialize ourselves. A bit annoying.
    • ChangeViewport, TranslatePointToScreen, and TranslatePointFromScreen are unique to CH vs WT (helper functions)
    • Clone and FindText are unique to CH vs WT (public interactions)
  • ScreenInfoUiaProvider
    • CreateUTRs are used to properly create UiaTextRanges
    • Navigate, get_BoundingRectangle, and get_FragmentRoot are unique to CH vs WT

Now that we know if we're calling FindText from WT or CH, we don't need it in IRenderData. So that got moved.

🚨NOTE: There will be some conflicts with #2296. Notably, the issue mentioned above. resolving that merge conflict will be pretty easy though.

Validation Steps Performed

Used inspect on ConHost and WT. Bounding rects still appear as expected in each model


🔄 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/2414 **Author:** [@carlos-zamora](https://github.com/carlos-zamora) **Created:** 8/12/2019 **Status:** ✅ Merged **Merged:** 8/21/2019 **Merged by:** [@carlos-zamora](https://github.com/carlos-zamora) **Base:** `master` ← **Head:** `dev/cazamor/acc-providers` --- ### 📝 Commits (5) - [`1bf9a38`](https://github.com/microsoft/terminal/commit/1bf9a38436f0b4a991c1a9400169752af4b323f4) Refactor Accessibility providers - [`9b857de`](https://github.com/microsoft/terminal/commit/9b857dec8aa4b240a6f155f6443aeb3ab53b0641) WindowsTerminal's ScreenInfoUiaProvider --> TermControlUiaProvider - [`1f771a2`](https://github.com/microsoft/terminal/commit/1f771a244f4cf52b24e320c32336b5e78d4632e3) Merge branch 'master' into dev/cazamor/acc-providers - [`5738188`](https://github.com/microsoft/terminal/commit/5738188170851c7de43c16e00a108840903f5d89) PR Feedback - [`f56e1dc`](https://github.com/microsoft/terminal/commit/f56e1dcda233485e2bd813f38101404ccdd05c1d) PR change nit ### 📊 Changes **34 files changed** (+1418 additions, -791 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/TerminalControl/TermControlAutomationPeer.cpp` (+2 -2) 📝 `src/cascadia/TerminalControl/TermControlAutomationPeer.h` (+2 -2) ➕ `src/cascadia/TerminalControl/TermControlUiaProvider.cpp` (+118 -0) ➕ `src/cascadia/TerminalControl/TermControlUiaProvider.hpp` (+63 -0) 📝 `src/cascadia/TerminalControl/TerminalControl.vcxproj` (+4 -0) 📝 `src/cascadia/TerminalControl/TerminalControl.vcxproj.filters` (+5 -1) ➕ `src/cascadia/TerminalControl/UiaTextRange.cpp` (+197 -0) ➕ `src/cascadia/TerminalControl/UiaTextRange.hpp` (+83 -0) 📝 `src/cascadia/TerminalControl/XamlUiaTextRange.cpp` (+1 -1) 📝 `src/cascadia/TerminalControl/XamlUiaTextRange.h` (+1 -1) 📝 `src/cascadia/TerminalCore/Terminal.hpp` (+0 -14) 📝 `src/cascadia/TerminalCore/terminalrenderdata.cpp` (+0 -16) 📝 `src/cascadia/WindowsTerminal/WindowUiaProvider.cpp` (+13 -13) 📝 `src/host/renderData.cpp` (+1 -56) 📝 `src/host/renderData.hpp` (+0 -13) 📝 `src/host/tracing.cpp` (+2 -2) 📝 `src/interactivity/win32/lib/win32.LIB.vcxproj` (+4 -0) 📝 `src/interactivity/win32/lib/win32.LIB.vcxproj.filters` (+12 -0) ➕ `src/interactivity/win32/screenInfoUiaProvider.cpp` (+132 -0) ➕ `src/interactivity/win32/screenInfoUiaProvider.hpp` (+68 -0) _...and 14 more files_ </details> ### 📄 Description ## Summary of the Pull Request Refactors the accessibility providers (`ScreenInfoUiaProvider` and `UiaTextRange`) into a better separated model between ConHost and Windows Terminal. `ScreenInfoUiaProviderBase` and `UiaTextRangeBase` are introduced. ConHost and Windows Terminal implement their own versions of `ScreenInfoUiaProvider` and `UiaTextRange` that inherit from their respective base classes. <!-- Other than the issue solved, is this relevant to any other issues/existing PRs? --> ## References <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist * [x] Closes #2120 * [x] CLA signed. * [x] ~Tests added/passed~ old tests still valid * [x] ~Requires documentation to be updated~ N/A * [x] I am a core contributor <!-- Provide a more detailed description of the PR, other things fixed or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments - `Types` now has `ScreenInfoUiaProviderBase` and `UiaTextRangeBase` to allow for shared code - `UiaTextRange` - `Create`s are used to properly create itself - this is needed because we need to use some virtual functions AFTER we are created to fully initialize ourselves. A bit annoying. - `ChangeViewport`, `TranslatePointToScreen`, and `TranslatePointFromScreen` are unique to CH vs WT (helper functions) - `Clone` and `FindText` are unique to CH vs WT (public interactions) - `ScreenInfoUiaProvider` - `CreateUTR`s are used to properly create `UiaTextRanges` - `Navigate`, `get_BoundingRectangle`, and `get_FragmentRoot` are unique to CH vs WT Now that we know if we're calling `FindText` from WT or CH, we don't need it in IRenderData. So that got moved. 🚨NOTE: There will be some conflicts with #2296. Notably, the issue mentioned above. resolving that merge conflict will be pretty easy though. ## Validation Steps Performed Used inspect on ConHost and WT. Bounding rects still appear as expected in each model --- <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:06:08 +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#24924