Skip to content

Conversation

@chiaramooney
Copy link
Contributor

@chiaramooney chiaramooney commented Sep 7, 2021

Why
Current implementation of setAccessibilityFocus method resulted in no action. Request to backport from partner.

What
The RN setAccessibilityFocus API is intended to force the narrator focus to a specific element and then trigger narrator to announce that element.

How
Added source code to the sendAccessibilityEvent method inside PaperUIManager. New source code identifies the new element to focus on via its reactTag, focuses the element, and raises an automation event to alert narrator of the focus change. The RN setAccessibilityFocus API now calls the native method.

Testing
Tested by modifying a page in the playground app to call setAccessibilityFocus following the press of a button. The focus target was a second button. With narrator on, the first button was focused and pressed, triggering the API, and moving narrator focus to the second button. Its component type and accessibility label were then announced. I also ran the playground-win32 app to ensure that the functionality continues to work for XAML islands.

Backport #7268 to 0.64

Microsoft Reviewers: Open in CodeFlow

@NickGerleman
Copy link
Contributor

I do not think we should backport this change.

RN core has struggled with getting the last few releases out with good quality and frequency. This is changing, and we will be pushing out releases faster than before.

0.66 is coming out soon, so 0.64 is an "n-2" release. We will need to be a bit more guided in ensuring internal partners do not stay on releases that we will EOL.

Some folks are forced onto older releases for reasons such as dual-ussge of RN macOS, but I think most do not have as compelling of a reason.

@chiaramooney chiaramooney merged commit 1074033 into microsoft:0.64-stable Sep 9, 2021
@chiaramooney chiaramooney deleted the cm-backport-setAccessibilityFocus branch September 9, 2021 21:31
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.

4 participants