Fix PSReadline for screen reader#298881
Merged
anthonykim1 merged 11 commits intomainfrom Mar 11, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Improves PowerShell terminal startup behavior for screen reader users by ensuring a compatible PSReadLine can be loaded/enabled in a11y mode, reducing startup noise, and shipping the bundled PSReadLine assets in production builds.
Changes:
- Update PowerShell shell integration to prefer importing the bundled PSReadLine (when present), fall back to the system PSReadLine, and enable
EnableScreenReaderModewhen supported. - Inject
-nologointo PowerShell launch args whenisScreenReaderOptimizedis enabled. - Include the
psreadline/**directory in desktop and server build resource include lists.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| src/vs/workbench/contrib/terminal/common/scripts/shellIntegration.ps1 | Adjust PSReadLine import logic in a11y mode and enable screen-reader mode when available. |
| src/vs/platform/terminal/node/terminalEnvironment.ts | Add -nologo when launching PowerShell with screen-reader-optimized mode. |
| build/gulpfile.vscode.ts | Ensure bundled psreadline/** assets are included in desktop build resources. |
| build/gulpfile.reh.ts | Ensure bundled psreadline/** assets are included in server/REH build resources. |
src/vs/workbench/contrib/terminal/common/scripts/shellIntegration.ps1
Outdated
Show resolved
Hide resolved
src/vs/workbench/contrib/terminal/common/scripts/shellIntegration.ps1
Outdated
Show resolved
Hide resolved
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of: #297146
Problem1:
Set-PSReadLineOption-EnableScreenReaderModesince pwsh 7.5+ loaded stripped down version of psreadline 2.3.6. which gave the"WARNING: PowerShell detected that you might be using a screen reader and has disabled PSReadLine as it may not work correctly with your screen reader. If you want to re-enable it, run 'Import-Module PSReadLine'."We need the bundled 2.3.4-beta3 that has theEnableScreenReaderMode` param.EnableScreenReaderModeis available starting PS ReadLine 2.4.3+ which is more screen reader friendly.Pre-PR, the code was prevented from setting
Set-PSReadLineOption EnableScreenReaderModeProblem 2: Bundled PSReadLine not shipped in production builds
Symptom: Import-Module threw a red error in production VS Code because the psreadline/ folder didn't exist — it was only present in dev builds??
Holding off on below until clarification --> #297146 (comment)
Problem 3: CopyRight banner
-nologowhen accessibility mode enabled.