File tree 1 file changed +3
-0
lines changed
lib/java/com/google/android/material/chip
1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change 54
54
import android .view .ViewParent ;
55
55
import android .view .accessibility .AccessibilityEvent ;
56
56
import android .view .accessibility .AccessibilityNodeInfo ;
57
+ import android .widget .Button ;
57
58
import android .widget .CompoundButton ;
58
59
import androidx .annotation .AnimatorRes ;
59
60
import androidx .annotation .BoolRes ;
@@ -1010,6 +1011,8 @@ protected void onPopulateNodeForVirtualView(
1010
1011
node .setBoundsInParent (getCloseIconTouchBoundsInt ());
1011
1012
node .addAction (AccessibilityActionCompat .ACTION_CLICK );
1012
1013
node .setEnabled (isEnabled ());
1014
+ // Set the class name to Button so that the close icon is treated as a button by TalkBack.
1015
+ node .setClassName (Button .class .getName ());
1013
1016
} else {
1014
1017
node .setContentDescription ("" );
1015
1018
node .setBoundsInParent (EMPTY_BOUNDS );
You can’t perform that action at this time.
0 commit comments