[PR #11042] [MERGED] [1.10] Ensure auto peer is created regardless of term init #28364

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/11042
Author: @carlos-zamora
Created: 8/26/2021
Status: Merged
Merged: 8/26/2021
Merged by: @DHowett

Base: release-1.10Head: dev/cazamor/release-1.10/a11y-initialization-bugfix


📝 Commits (1)

  • 98a8d46 [1.10] Ensure automation peer is created regardless of terminal initialization

📊 Changes

3 files changed (+34 additions, -32 deletions)

View changed files

📝 src/cascadia/TerminalControl/ControlCore.cpp (+28 -26)
📝 src/cascadia/TerminalControl/TermControl.cpp (+1 -1)
📝 src/types/UiaTextRangeBase.cpp (+5 -5)

📄 Description

Summary of the Pull Request

This patch accomplishes what #10971 does, but for the release-1.10 branch. Some things couldn't be carried over because the TermControl split wasn't the complete (or in the same state as it is currently on main).

The bug was that Narrator would still read the content of the old tab/pane although a new tab/pane was introduced. This is caused by the automation peer not being created when XAML requests it. Normally, we would prevent the automation peer from being created if the terminal was not fully initialized.

This change allows the automation peer to be created regardless of the terminal being fully initialized by...

  • ControlCore: initialize the _renderer in the ctor so that we can attach the UIA Engine before ControlCore::Initialize() is called (dependent on SwapChainPanel loading)

As a bonus, this also fixes a locking issue where logging would attempt to get the text range's text and lock twice. The locking fix is very similar to #10937.

Differences from #10971

This was prior to #10874. Thankfully, we don't need to worry about the padding because that bug was introduced as a part of #10051.

Other references

MSFT 33353327

Validation Steps Performed

  • New pane from key binding is announced by Narrator
  • New tab from key binding is announced by Narrator
  • Bounding rects are placed on the screen accurately (even when the padding changes)

🔄 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/11042 **Author:** [@carlos-zamora](https://github.com/carlos-zamora) **Created:** 8/26/2021 **Status:** ✅ Merged **Merged:** 8/26/2021 **Merged by:** [@DHowett](https://github.com/DHowett) **Base:** `release-1.10` ← **Head:** `dev/cazamor/release-1.10/a11y-initialization-bugfix` --- ### 📝 Commits (1) - [`98a8d46`](https://github.com/microsoft/terminal/commit/98a8d46824711365be379abebcf063790af3113d) [1.10] Ensure automation peer is created regardless of terminal initialization ### 📊 Changes **3 files changed** (+34 additions, -32 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/TerminalControl/ControlCore.cpp` (+28 -26) 📝 `src/cascadia/TerminalControl/TermControl.cpp` (+1 -1) 📝 `src/types/UiaTextRangeBase.cpp` (+5 -5) </details> ### 📄 Description ## Summary of the Pull Request This patch accomplishes what #10971 does, but for the release-1.10 branch. Some things couldn't be carried over because the TermControl split wasn't the complete (or in the same state as it is currently on main). The bug was that Narrator would still read the content of the old tab/pane although a new tab/pane was introduced. This is caused by the automation peer not being created when XAML requests it. Normally, we would prevent the automation peer from being created if the terminal was not fully initialized. This change allows the automation peer to be created regardless of the terminal being fully initialized by... - `ControlCore`: initialize the `_renderer` in the ctor so that we can attach the UIA Engine before `ControlCore::Initialize()` is called (dependent on `SwapChainPanel` loading) As a bonus, this also fixes a locking issue where logging would attempt to get the text range's text and lock twice. The locking fix is very similar to #10937. ## Differences from #10971 This was prior to #10874. _Thankfully_, we don't need to worry about the padding because that bug was introduced as a part of #10051. ## Other references [MSFT 33353327](https://microsoft.visualstudio.com/OS/_workitems/edit/33353327) ## Validation Steps Performed - New pane from key binding is announced by Narrator - New tab from key binding is announced by Narrator - Bounding rects are placed on the screen accurately (even when the padding changes) --- <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:28:02 +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#28364