Skip to content

Commit fa6035b

Browse files
ayc1facebook-github-bot
authored andcommitted
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
1 parent 8a2187b commit fa6035b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

ReactAndroid/src/main/java/com/facebook/react/uimanager/AccessibilityDelegateUtil.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,7 @@ public static void setDelegate(final View view) {
7272
// if a view already has an accessibility delegate, replacing it could cause problems,
7373
// so leave it alone.
7474
if (!ViewCompat.hasAccessibilityDelegate(view) &&
75-
accessibilityHint != null &&
76-
accessibilityRole != null) {
75+
(accessibilityHint != null || accessibilityRole != null)) {
7776
ViewCompat.setAccessibilityDelegate(
7877
view,
7978
new AccessibilityDelegateCompat() {

0 commit comments

Comments
 (0)