Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Conhost] Notify UIA when letter deleted via backspace (microsoft#12735)
## 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
- Loading branch information