File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed
lib/java/com/google/android/material/chip Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change 5454import android .view .ViewParent ;
5555import android .view .accessibility .AccessibilityEvent ;
5656import android .view .accessibility .AccessibilityNodeInfo ;
57+ import android .widget .Button ;
5758import android .widget .CompoundButton ;
5859import androidx .annotation .AnimatorRes ;
5960import androidx .annotation .BoolRes ;
@@ -1010,6 +1011,8 @@ protected void onPopulateNodeForVirtualView(
10101011 node .setBoundsInParent (getCloseIconTouchBoundsInt ());
10111012 node .addAction (AccessibilityActionCompat .ACTION_CLICK );
10121013 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 ());
10131016 } else {
10141017 node .setContentDescription ("" );
10151018 node .setBoundsInParent (EMPTY_BOUNDS );
You can’t perform that action at this time.
0 commit comments