WebAIM - Web Accessibility In Mind

E-mail List Archives

Thread: Managing focus on Android

for

Number of posts in this thread: 3 (In chronological order)

From: Chris O'Brien
Date: Thu, Jun 10 2021 2:28PM
Subject: Managing focus on Android
No previous message | Next message →

Question for those with native app expertise:

Let's say I have a button that instantiates a layer and focus is passed into it. When that layer is closed, my assumption is that I should be able to pass focus back to the button trigger.

If the assumption is true, what technique would I leverage to manage focus?


Chris O'Brien
Director of Accessibility
Legal and Litigation



OLG Internal

From: Joe Humbert (A11y)
Date: Thu, Jun 10 2021 8:59PM
Subject: Re: Managing focus on Android
← Previous message | Next message →

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

From: Chris O'Brien
Date: Fri, Jun 11 2021 6:29AM
Subject: Re: Managing focus on Android
← Previous message | No next message

Hi Joe,

Thanks - yes, I meant with Talkbalk. Apologies for leaving that bit out.

I appreciate your feedback.

Chris O'Brien
Director of Accessibility
Legal and Litigation


OLG Internal