mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-03-30 17:33:21 +08:00
Fix accessibility role/label
Summary: D10138128 had some shamefully wrong boolean logic to determine whether we should customize the accessibility delegate. Previously, we did it if BOTH the accessibility label AND role were present. We should actually do it if EITHER are present. Reviewed By: mdvacca Differential Revision: D10182135 fbshipit-source-id: 209a8ab43f5869762843fe878cfd59a7b9b5ab1a
This commit is contained in:
committed by
Facebook Github Bot
parent
8a2187b8f9
commit
fa6035bda6
@@ -72,8 +72,7 @@ public class AccessibilityDelegateUtil {
|
||||
// if a view already has an accessibility delegate, replacing it could cause problems,
|
||||
// so leave it alone.
|
||||
if (!ViewCompat.hasAccessibilityDelegate(view) &&
|
||||
accessibilityHint != null &&
|
||||
accessibilityRole != null) {
|
||||
(accessibilityHint != null || accessibilityRole != null)) {
|
||||
ViewCompat.setAccessibilityDelegate(
|
||||
view,
|
||||
new AccessibilityDelegateCompat() {
|
||||
|
||||
Reference in New Issue
Block a user