Why does TalkBack announce "Back"?

468 Views Asked by At

I am working on Android accessibility, and the phone has TalkBack enabled. I have a screen with a toggle switch, and clicking on it will show a dialog.

Once the dialog is dismissed, the focus is supposed to go back to the toggle button and announce the content description for the button. But TalkBack is announcing, "Back. Toggle button is on."

I don't see the focus moving to the back navigation but somehow, it gets announced. And when the focus is in the navigation button, it always announces "Back button", but in the previous case, it's just "Back."

Things I already tried:

  1. Force-focus the the toggle using request focus, sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_ACCESSIBILITY_FOCUSED.
  2. Interrupt - AccessibilityManager.interrupt()

Nothing worked!

Any clue why this would happen?

Toggle switch is on

0

There are 0 best solutions below