WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Managing focus on Android

for

From: Joe Humbert (A11y)
Date: Jun 10, 2021 8:59PM


Hi Chris,

Not sure if you mean with or without Talkback enabled.

Without TalkBack: requestFocus()
https://developer.android.com/reference/android/view/View#using-views

With TalkBack: sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_FOCUSED)
https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent
https://stackoverflow.com/questions/28472985/android-set-talkback-accessibility-focus-to-a-specific-view
https://stackoverflow.com/questions/31569490/talk-back-accessibility-requesting-focus-on-a-textview

Thankx,
Joe Humbert, CPWA
Accessibility Champion
Android & iOS Accessibility Novice
Twitter: @joehumbert