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

-----Original Message-----
From: WebAIM-Forum < = EMAIL ADDRESS REMOVED = > On Behalf Of Chris O'Brien
Sent: Thursday, June 10, 2021 4:28 PM
To: = EMAIL ADDRESS REMOVED =
Subject: [WebAIM] Managing focus on Android

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: 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

-----Original Message-----
From: WebAIM-Forum < = EMAIL ADDRESS REMOVED = > On Behalf Of Joe Humbert (A11y)
Sent: Thursday, June 10, 2021 10:59 PM
To: 'WebAIM Discussion List' < = EMAIL ADDRESS REMOVED = >
Subject: Re: [WebAIM] Managing focus on Android

This email originated outside of OLG. Do not open attachments or click links unless you recognize the sender and know the content is safe.

Hi Chris,

Not sure if you mean with or without Talkback enabled.

Without TalkBack: requestFocus()
https://can01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdeveloper.android.com%2Freference%2Fandroid%2Fview%2FView%23using-views&amp;data%7C01%7Cchrobrien%40olg.ca%7C2a78e93f9c2d4d5ef23108d92c84e83d%7Cf271d9b4e54c46e182bd25d50afa3779%7C0%7C0%7C637589772374194551%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=D%2FA6jpBc50nS4SPlVjeUdzOvJvqrBhnS%2F0PCQpwsDXY%3D&amp;reserved=0

With TalkBack: sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_FOCUSED)
https://can01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdeveloper.android.com%2Freference%2Fandroid%2Fview%2Faccessibility%2FAccessibilityEvent&amp;data%7C01%7Cchrobrien%40olg.ca%7C2a78e93f9c2d4d5ef23108d92c84e83d%7Cf271d9b4e54c46e182bd25d50afa3779%7C0%7C0%7C637589772374194551%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=X1ZB8Y2QakDLSfP3CdmMpQnhClSy0uvUHHyPE3S9dsY%3D&amp;reserved=0
https://can01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F28472985%2Fandroid-set-talkback-accessibility-focus-to-a-specific-view&amp;data%7C01%7Cchrobrien%40olg.ca%7C2a78e93f9c2d4d5ef23108d92c84e83d%7Cf271d9b4e54c46e182bd25d50afa3779%7C0%7C0%7C637589772374194551%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=5LD1xMNl5ZQVS4z4JLQEcwwBHQRBRoENxMBBXyhv4sk%3D&amp;reserved=0
https://can01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F31569490%2Ftalk-back-accessibility-requesting-focus-on-a-textview&amp;data%7C01%7Cchrobrien%40olg.ca%7C2a78e93f9c2d4d5ef23108d92c84e83d%7Cf271d9b4e54c46e182bd25d50afa3779%7C0%7C0%7C637589772374194551%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdataœmSlyXawms9djvmkebmLcMQLRx3JlRw6NrOSFMtTrg%3D&amp;reserved=0

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

-----Original Message-----
From: WebAIM-Forum < = EMAIL ADDRESS REMOVED = > On Behalf Of Chris O'Brien
Sent: Thursday, June 10, 2021 4:28 PM
To: = EMAIL ADDRESS REMOVED =
Subject: [WebAIM] Managing focus on Android

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