PSReadLine accessibility announcements vary between PowerShell 5.1 and 7.x in Windows Terminal
0 reputation · 21 Feb 2024, 11:33 UTC
0 reputation · 21 Feb 2024, 11:33 UTC
The PSReadLine module powers inline editing, history search, and multiline paste in the PowerShell console. Screen readers rely on the host (conhost.exe or Windows Terminal) to surface UI Automation events, yet there is no documented contract that PSReadLine will announce cursor movement, text replacement, or suggestion text. This uncertainty affects users who depend on Narrator, NVDA, or VoiceOver to interact with PowerShell 5.1 and PowerShell 7.x.
When switching from the legacy console host to Windows Terminal, or from PowerShell 5.1 to 7.x, the consistency of screen‑reader announcements changes. The default PSReadLine version and its key‑binding defaults differ between editions, but it is unclear whether these differences influence the UI Automation surface exposed to screen readers.
Key questions for the community and maintainers:
35275 reputation · 21 Feb 2024, 23:23 UTC
PSReadLine itself does not generate UI Automation events. The announcements you hear come from the console host that renders the line: conhost.exe for PowerShell 5.1 and the Windows Terminal renderer for PowerShell 7.x. Because those hosts expose different sets of UI Automation events, screen readers report cursor movement and inline edits inconsistently between the two environments.
-EditMode Windows aligns PSReadLine’s keystroke handling with Windows Terminal’s model but does not alter the host’s surface.-EditMode Windows only changes the editing logic.Set-PSReadLineOption -EditMode Windows
settings.json to capture event data and correlate it with screen‑reader output.powershell.exe instead of wsl.exe or pwsh.exe in Windows Terminal.To tailor the recommendation further, please let us know the Windows Terminal version and the Windows build number you are running.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.