-
Notifications
You must be signed in to change notification settings - Fork 8k
Remove IsScreenReaderActive() check
#26118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove IsScreenReaderActive() check
#26118
Conversation
|
I'm unsure what labels are appropriate for this PR. |
0065a7c to
a816ace
Compare
|
Marking as ready to review because the three failures are unrelated, confirmed by seeing the same three tests fail in https://github.com/PowerShell/PowerShell/actions/runs/18079717180/job/51471840175 for #26109
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If there is a risk of regression why not implement this as an experimental feature so that users could turn off this until fix will be prepared?
| consoleRunspace = null; | ||
| psReadlineFailed = true; | ||
| } | ||
| consoleRunspace = null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder why don't we dispose the runspace?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a question I don't have an answer to.
We don't believe the risk is high enough to justify going through extra process beyond getting this into the preview and release candidates. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
/azp run PowerShell-CI-linux-packaging, PowerShell-Windows-Packaging-CI |
|
Azure Pipelines could not run because the pipeline triggers exclude this branch/path. |
With the upcoming inclusion of PSReadLine 2.4, screen readers are now properly supported.
ea3dad9 to
842f8b3
Compare
|
/azp run PowerShell-CI-linux-packaging, PowerShell-Windows-Packaging-CI |
|
Azure Pipelines could not run because the pipeline triggers exclude this branch/path. |
|
📣 Hey @@andyleejordan, how did we do? We would love to hear your feedback with the link below! 🗣️ 🔗 https://aka.ms/PSRepoFeedback |
PR Summary
With the upcoming inclusion of PSReadLine 2.4, screen readers are now properly supported so we can stop avoiding the loading of PSReadLine. Essentially reverses #10385.
PR Context
Given the new screen reader support from PowerShell/PSReadLine#4854 included in PSReadLine 2.4, and that we are planning to include that beta in the next PowerShell 7.6 preview (with a 2.4 GA to be included in 7.6 RC), we can remove this workaround that avoided loading PSReadLine when screen readers were detected.
The same SPI check is performed in PSReadLine to enable screen reader mode, so the default user experience should switch from no PSReadLine (and a fairly broken legacy REPL implementation) to PSReadLine 2.4 in screen reader mode with known, improved support. There is a small known edge case where a user-installed older version of PSReadLine may be unexpectedly loaded where it was previously not being loaded, but the workaround is to update or remove the user-install. The other known potential issue is that we are changing the default screen reader experience. We believe the move is an improvement, and it is currently in real-world use in VS Code. But if there is a bug that requires the previous behavior, the user can
Remove-Module PSReadLineto workaround it, and if we find we need to revert this change, it is very small.PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright header