-
Notifications
You must be signed in to change notification settings - Fork 764
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Skip A11Y sanity check for keyboard navigation
Summary: As external keyboard cannot be detected by the current API: https://www.internalfb.com/code/fbsource/[details]/fbandroid/libraries/components/litho-core/src/main/java/com/facebook/litho/AccessibilityUtils.kt?lines=32-35 It makes Litho will not create `AccessibilityDelegate` for each host whenever A11Y is not enabled, which ends up that keyboard navigation doesn't work at all. Quote from Brett: > Otherwise, I think your best bet is to observe connections for keyboards and change the behavior accordingly. As far as I know this requires a change to the activity in the AndroidManifest, so wouldn’t be something that you could fix in Litho alone. Though most of the activities in the FB4a manifest appear to have the needed property already. I also ran QE to create host for each component which did see a lot of perf regressions as we expected(https://fburl.com/deltoid3/gfny45o5). It's probably hard for us to ship this. So for now, I would recommend just skip this sanity check for host, which only works for components that have A11Y enabled as well as focus event handlers. (Otherwise, there's no point to enable keyboard navigation for this component from my understanding.) Reviewed By: adityasharat Differential Revision: D69053388 fbshipit-source-id: cfe24bab0948e7f2ef8c1c7544122c956a53c87b
- Loading branch information
1 parent
f2eadd9
commit f42ec59
Showing
4 changed files
with
8 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters