I have an editText
that contains a drawableRight
property. This editText
is a search field, and the drawableRight
is an "x" icon for clearing the text from the search field. When using Talkback
(screen reader), I can't select the drawableRight to trigger my onTouch()
event as it thinks I'm trying to tap on the editText as a whole.
I've tried to use .sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_FOCUSED)
on my editText drawable
, but accessibility functions can only be used on elements that inherit from View
.
When I try to access the drawable like this editText.getCompoundDrawables()[4]
it doesn't give me any accessibility options, as it does not inherit from View.
I need to find a way to let people with disabilities be able to tap on the "x" drawable from my edit text to clear the search bar text.