Skip to content

Commit 34caec9

Browse files
committed
Views with node providers are important for accessibility in auto mode.
1. If a view's important for accessibility attribute is set to auto the framework is responsible to determine if it really is. Views with accessibility node providers should be important for accessibilty since they are roots of virtual view trees and such trees are always important. bug:6843043 Change-Id: I4b352c59fdefdf9ad220714a43ecb9e01d1c1c1f
1 parent 84f85dc commit 34caec9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

core/java/android/view/View.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6387,7 +6387,8 @@ public boolean isImportantForAccessibility() {
63876387
case IMPORTANT_FOR_ACCESSIBILITY_NO:
63886388
return false;
63896389
case IMPORTANT_FOR_ACCESSIBILITY_AUTO:
6390-
return isActionableForAccessibility() || hasListenersForAccessibility();
6390+
return isActionableForAccessibility() || hasListenersForAccessibility()
6391+
|| getAccessibilityNodeProvider() != null;
63916392
default:
63926393
throw new IllegalArgumentException("Unknow important for accessibility mode: "
63936394
+ mode);

0 commit comments

Comments
 (0)