Skip to content
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

fix: detect screen readers by testing their existences #39988

Merged
merged 1 commit into from Sep 28, 2023

Conversation

zcbenz
Copy link
Member

@zcbenz zcbenz commented Sep 27, 2023

Description of Change

The official way to get screen reader status on Windows is to call SystemParametersInfo(SPI_GETSCREENREADER), which has false positives (for example when user is using touch screens) and will cause performance issues in some apps due to accessibility support getting turned on. (refs #7208)

This PR takes another approach by directly testing whether the screen readers are actually running. This approach has been used in VS Code and Teams for a long time and has passed accessibility check in Microsoft.

Checklist

Release Notes

Notes: Fix how screen readers are detected on Windows to reduce false positives.

@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label Sep 27, 2023
Copy link
Member

@deepak1556 deepak1556 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours label Sep 28, 2023
@jkleinsc jkleinsc merged commit 4cf6884 into main Sep 28, 2023
20 checks passed
@jkleinsc jkleinsc deleted the reliable-screen-reader-detection branch September 28, 2023 15:17
@release-clerk
Copy link

release-clerk bot commented Sep 28, 2023

Release Notes Persisted

Fix how screen readers are detected on Windows to reduce false positives.

@miniak
Copy link
Contributor

miniak commented Oct 2, 2023

/trop run backport-to 27-x-y

@trop
Copy link
Contributor

trop bot commented Oct 2, 2023

The backport process for this PR has been manually initiated - sending your PR to 27-x-y!

@trop
Copy link
Contributor

trop bot commented Oct 2, 2023

I have automatically backported this PR to "27-x-y", please check out #40065

@trop trop bot added in-flight/27-x-y merged/27-x-y PR was merged to the "27-x-y" branch. and removed in-flight/27-x-y labels Oct 2, 2023
MrHuangJser pushed a commit to MrHuangJser/electron that referenced this pull request Dec 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/accessibility merged/27-x-y PR was merged to the "27-x-y" branch. platform/windows semver/patch backwards-compatible bug fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants