- 
                Notifications
    
You must be signed in to change notification settings  - Fork 3.2k
 
Open
Labels
Description
Description: The thumbs of the RangeSlider are no longer accessible in the view tree used by UiAutomator2
Expected behavior: The thumbs should appear in the view tree available to UiAutomator2 so that automated tests can continue to manipulate sliders.
Source code:
I narrowed it down to the changes in ab52e6a
  @Override
  public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) {
    super.onInitializeAccessibilityNodeInfo(info);
    // Setting visible to user to false prevents duplicate announcements by making only our virtual
    // view accessible, not the parent container.
    info.setVisibleToUser(false);
  }Android API version: N/A
Material Library version: 1.13.0
Device: Pixel 8 Pro
Workaround:
We can create our own RangeSlider and override onInitializeAccessibilityNodeInfo to info.setVisibleToUser(true).
fsomini