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 VoiceOver for single-line TextInput #1271

Merged

Conversation

christophpurrer
Copy link

Please select one of the following

  • I am removing an existing difference between facebook/react-native and microsoft/react-native-macos 👍
  • I am cherry-picking a change from Facebook's react-native into microsoft/react-native-macos 👍
  • I am making a fix / change for the macOS implementation of react-native
  • I am making a change required for Microsoft usage of react-native

Summary

This adds the appropriate override for AppKit (setAccessibilityElement:) so that the NSTextField will not get set to be accessible, since its cell instead is already accessible and performs the correct VoiceOver behaviors.

VoiceOver now reads as you type in a single-line TextInput

Changelog

[macOS] [Fixed] - Fix VoiceOver for single-line TextInput

Test Plan

Focus field

Didn't announce the search field
Search...
instead
You are currently on a text field
was shown

BEFORE

before.mov

AFTER

after.mov

Enter searchTerm

Didn't announce the search term

BEFORE

before2.mov

AFTER

after2.mov

This adds the appropriate override for AppKit (`setAccessibilityElement:`) so that the `NSTextField` will not get set to be accessible, since its cell instead is already accessible and performs the correct VoiceOver behaviors.

VoiceOver now reads as you type in a single-line `TextInput`
@christophpurrer christophpurrer requested a review from a team as a code owner July 22, 2022 01:06
@christophpurrer christophpurrer force-pushed the fixVoiceOverSingleLineText branch from 53d6365 to 4b5f4ba Compare July 22, 2022 01:07
@harrieshin harrieshin merged commit f6b4c1e into microsoft:main Jul 22, 2022
@christophpurrer christophpurrer deleted the fixVoiceOverSingleLineText branch July 22, 2022 15:51
chiuam pushed a commit to chiuam/react-native-macos that referenced this pull request Jul 25, 2022
This adds the appropriate override for AppKit (`setAccessibilityElement:`) so that the `NSTextField` will not get set to be accessible, since its cell instead is already accessible and performs the correct VoiceOver behaviors.

VoiceOver now reads as you type in a single-line `TextInput`

Co-authored-by: Scott Kyle <[email protected]>
chiuam pushed a commit to chiuam/react-native-macos that referenced this pull request Jul 25, 2022
This adds the appropriate override for AppKit (`setAccessibilityElement:`) so that the `NSTextField` will not get set to be accessible, since its cell instead is already accessible and performs the correct VoiceOver behaviors.

VoiceOver now reads as you type in a single-line `TextInput`

Co-authored-by: Scott Kyle <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants