File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
lib/java/com/google/android/material/slider Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change 8080import android .view .ViewTreeObserver ;
8181import android .view .accessibility .AccessibilityEvent ;
8282import android .view .accessibility .AccessibilityManager ;
83+ import android .view .accessibility .AccessibilityNodeInfo ;
8384import android .widget .SeekBar ;
8485import androidx .annotation .ColorInt ;
8586import androidx .annotation .ColorRes ;
@@ -3484,6 +3485,14 @@ private boolean isThisAndAncestorsVisible() {
34843485 return (VERSION .SDK_INT >= VERSION_CODES .N ) ? thisAndAncestorsVisible : isShown ();
34853486 }
34863487
3488+ @ Override
3489+ public void onInitializeAccessibilityNodeInfo (AccessibilityNodeInfo info ) {
3490+ super .onInitializeAccessibilityNodeInfo (info );
3491+ // Setting content description to null prevents duplicate announcements by making only our
3492+ // virtual view accessible, not the parent container.
3493+ info .setContentDescription (null );
3494+ }
3495+
34873496 @ Override
34883497 public void onVisibilityAggregated (boolean isVisible ) {
34893498 super .onVisibilityAggregated (isVisible );
You can’t perform that action at this time.
0 commit comments