microsoft / fluentui-react-native

A react-native component library that implements the Fluent Design System.
https://developer.microsoft.com/fluentui
MIT License
1.25k stars 161 forks source link

FocusZone navigationOrderInRenderOrder #3689

Closed PPatBoyd closed 1 month ago

PPatBoyd commented 1 month ago

Platforms Impacted

Description of changes

Adds a navigationOrderInRenderOrder property for MacOS keyboard focus management. In some cases the auto-calculated key view loop may use the center point of focusable controls to determine the focus order. This property is available to make using the "render order" (the natural order of the accessible children as returned by NSView.accessibilityChildren) the order that should be used for navigation purposes. Note that to participate in the key view loop process the FocusZone itself must be:

This PR also corrects the FocusZone prop type to incorporate the naturally relevant ViewProps since FocusZone is inherently a View underneath, and this eases maintenance and developer ergonomics.

Verification

Manually tested.

Pull request checklist

This PR has considered (when applicable):