Narrator does not read selected text in WPF TextBox
- Dominant language
- C#
- Stars
- 7.7k
- Forks
- 1.3k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 61
Description
### Description
When text is selected in WPF TextBox, Narrator does not pronounce/read it. It does not read the text even if the `CapsLock+Shift+Down` key combination is used. The same functionality works correctly in WinForms.
### Reproduction Steps
1. Open the solution from the attached archive in Visual Studio ([narratorTest.zip](https://github.com/user-attachments/files/19860771/narratorTest.zip)).
2. Run the `WpfApp2` project.
3. Start Narrator.
4. Select different parts of the text in the TextBox element shown in the application's window.
5. Use the `CapsLock+Shift+Down` key combination.
(The [screencast_with_audio.mp4](https://github.com/user-attachments/assets/e3c471c2-9a32-46c0-ba9a-06da2e3a60a1) illustrates these steps and the problematic behavior.)
### Expected behavior
* When selection is changed, Narrator pronounces "\[SELECTED_TEXT_PART\] text is selected".
* When the `CapsLock+Shift+Down` key combination is used, Narrator reads the text from the selection.
### Actual behavior
Narrator keeps silent and does not read anything when selection is changed or when the `Caps+Shift+Down` key combination is used.
The `Caps+Shjift+Down+Down` key combination still works - narrator reads letters from the selection.
The [screencast_with_audio.mp4](https://github.com/user-attachments/assets/e3c471c2-9a32-46c0-ba9a-06da2e3a60a1) illustrates the problematic behavior.
### Important:
If you use the same steps in the WinFormsApp1 project included into the same solution, you can see that Narrator works as expected.
### Regression?
_No response_
### Known Workarounds
_No response_
### Impact
The behavior prevents implementing full support for accessibility in WPF applications and does not allow people to hear what they selected if they cannot see it.
### Configuration
.NET 9, Windows 11.
### Other information
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.