[PR #12735] [MERGED] [Conhost] Notify UIA when letter deleted via backspace #29213

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/12735
Author: @carlos-zamora
Created: 3/21/2022
Status: Merged
Merged: 3/23/2022
Merged by: @undefined

Base: mainHead: dev/cazamor/a11y/bugfix-backspace


📝 Commits (3)

  • d61eb5c [Conhost] Notify UIA when letter deleted via backspace
  • 32d0467 update comment
  • 59b7e0b only notify UIA

📊 Changes

1 file changed (+9 additions, -0 deletions)

View changed files

📝 src/host/_stream.cpp (+9 -0)

📄 Description

Summary of the Pull Request

Fixes a bug in ConHost where Narrator wouldn't read the deleted letter after the user pressed backspace.

References

MSFT:31748387

Detailed Description of the Pull Request / Additional comments

WriteCharsLegacy() already calls NotifyAccessibilityEventing() when text is inserted into the buffer (see code). However, when backspace is pressed, the entire if-condition is skipped over, resulting in the accessibility event not being fired. WriteCharsLegacy() has a separate branch that is dedicated to handling backspace, so I added a call to the relevant logic to notify UIA at the end of that.

Validation Steps Performed

Backspace deletes a character and Narrator reads it
Backspace still works with NVDA and JAWS (unchanged behavior)
if the input buffer had wrapped text, the above scenario works as expected
scenario works for CMD, PowerShell Core, and WSL


🔄 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/12735 **Author:** [@carlos-zamora](https://github.com/carlos-zamora) **Created:** 3/21/2022 **Status:** ✅ Merged **Merged:** 3/23/2022 **Merged by:** [@undefined](undefined) **Base:** `main` ← **Head:** `dev/cazamor/a11y/bugfix-backspace` --- ### 📝 Commits (3) - [`d61eb5c`](https://github.com/microsoft/terminal/commit/d61eb5c7b28ff9e1c366339cf3c76237ce037390) [Conhost] Notify UIA when letter deleted via backspace - [`32d0467`](https://github.com/microsoft/terminal/commit/32d0467f492587c5e51f00c6f435df91f35acfaf) update comment - [`59b7e0b`](https://github.com/microsoft/terminal/commit/59b7e0bf70e900d9bbb943bc6ebaa090f9b04fef) _only_ notify UIA ### 📊 Changes **1 file changed** (+9 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `src/host/_stream.cpp` (+9 -0) </details> ### 📄 Description ## Summary of the Pull Request Fixes a bug in ConHost where Narrator wouldn't read the deleted letter after the user pressed backspace. ## References MSFT:31748387 ## Detailed Description of the Pull Request / Additional comments `WriteCharsLegacy()` already calls `NotifyAccessibilityEventing()` when text is inserted into the buffer ([see code](https://github.com/microsoft/terminal/blob/855e1360c0ff810decf862f1d90e15b5f49e7bbd/src/host/_stream.cpp#L559-L563)). However, when backspace is pressed, the entire if-condition is skipped over, resulting in the accessibility event not being fired. `WriteCharsLegacy()` has a separate branch that is dedicated to handling backspace, so I added a call to the relevant logic to notify UIA at the end of that. ## Validation Steps Performed ✅ <kbd>Backspace</kbd> deletes a character and Narrator reads it ✅ <kbd>Backspace</kbd> still works with NVDA and JAWS (unchanged behavior) ✅ if the input buffer had wrapped text, the above scenario works as expected ✅ scenario works for CMD, PowerShell Core, and WSL --- <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:33:32 +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#29213