https://kotlinlang.org logo
#compose
Title
# compose
d

dazza5000

08/19/2022, 3:39 PM
what would be the equivalent of setting and accessibility delegate in compose?
Copy code
ViewCompat.setAccessibilityDelegate(login_text_view_as_button_with_role,
    object : AccessibilityDelegateCompat() {
        override fun onInitializeAccessibilityNodeInfo(v: View, info: AccessibilityNodeInfoCompat) {
            super.onInitializeAccessibilityNodeInfo(v, info)
            info.roleDescription = "Button"
        }
})
v

vgonda

08/19/2022, 5:03 PM
It depends on what you're trying to accomplish. For
Role
, you can often pass that in as a parameter to
clickable
and similar modifiers if you're already using them on this node
d

dazza5000

08/19/2022, 5:07 PM
I'm trying to induce a click event when an accessibility action happens
It is fairly easy on the view system, but haven't found much content on the compose system
v

vgonda

08/22/2022, 1:27 PM
What accessibility events are you trying to trigger based on that users not navigating using accessibility services don't have access to?
d

dazza5000

08/22/2022, 1:46 PM
I'm not certain I understand the question, but I think I figured out a solution to the problem I was having.
105 Views