About Android accessibility intercom. Is there a key audience for intercom?
I'm developing an Android photo app for the visually impaired
Of course, my application runs in the talkback context. In the "talk back" context, when the button is in the focus state, the system reads the text of the button
What I want to do is play the audio file when the button is in focus, not the text label of the button. However, I can't find any listener that detects the focus state of the button. Is there any way?
resolvent:
Disclaimer: everything that happens on WCAG 2.0 – 3.2.1 can be a major accessibility violation. I encourage you to reconsider your design / conduct a lot of user research to ensure that what you end up doing is not just creating a frustrating user experience. Not only that, but also remember that talkback is not the only assistive technology, which shocked me, For users using switch access, this mechanism may be frustrating, while for braillback users, it may be completely interrupted
Having said that, this is how you will achieve this behavior:
You want to see the callbacks available in view. Accessibilitydelegate
I believe you should look for code that looks like this:
void onPopulateAccessibilityEvent(View host, AccessibilityEvent event) {
if (event.getEventType() == AccessibilityEvent.TYPE_VIEW_ACCESSIBILITY_FOCUSED) {
//do stuff here
}
}
Attach this to the view that is gaining focus or, depending on the callback you use, to a layout that contains a series of controls
Now, I say "similar" because there are many different accessibility delegate callbacks, triggered before and after events, so that you can adjust the methods of events, such as filling events in the view hierarchy. The selection depends on when you exactly want to happen and the nature of things that may need to adjust the triggered accessibilityevent