Skip to content

Commit

Permalink
Fix accessibility role/label
Browse files Browse the repository at this point in the history
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
  • Loading branch information
ayc1 authored and facebook-github-bot committed Oct 4, 2018
1 parent 8a2187b commit fa6035b
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,7 @@ public static void setDelegate(final View view) {
// 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() {
Expand Down

0 comments on commit fa6035b

Please sign in to comment.