From d8e19ddedffda4633df4d2bca0433da793d2f54c Mon Sep 17 00:00:00 2001 From: leticiars Date: Tue, 9 Nov 2021 14:07:34 -0500 Subject: [PATCH] [a11y][ExposedDropdownMenu] Fixed dropdown list not showing for non editable dropdown menus in switch access mode. For the editable type it remains as was: clicking on the edit text triggers the keyboard and clicking on the arrow icon shows the dropdown list. PiperOrigin-RevId: 408655618 --- .../android/material/textfield/DropdownMenuEndIconDelegate.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/java/com/google/android/material/textfield/DropdownMenuEndIconDelegate.java b/lib/java/com/google/android/material/textfield/DropdownMenuEndIconDelegate.java index 11f657d7a..19ede5a4d 100644 --- a/lib/java/com/google/android/material/textfield/DropdownMenuEndIconDelegate.java +++ b/lib/java/com/google/android/material/textfield/DropdownMenuEndIconDelegate.java @@ -131,7 +131,7 @@ class DropdownMenuEndIconDelegate extends EndIconDelegate { // If dropdown is non editable, layout click is what triggers showing/hiding the popup // list. Otherwise, arrow icon alone is what triggers it. if (event.getEventType() == TYPE_VIEW_CLICKED - && accessibilityManager.isTouchExplorationEnabled() + && accessibilityManager.isEnabled() && !isEditable(textInputLayout.getEditText())) { showHideDropdown(editText); }