WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Focus handling on Native App

for

From: Jonathan Avila
Date: Jul 26, 2017 11:30AM


On iOS you can move focus by posting a notification with a layout change and include the control to focus as the second parameter.

UIAccessibilityPostNotification(UIAccessibilityLayoutChangedNotification,
controlToFocus);


On Android you typically have to allow the control to be focusable by setting setFocusable, etc. and then attempt to request focus. For controls that don't take typical focus you will likely need to create an accessibility focus event and dispatch the event using sendAccessibilityEvent. It's been a while since I played with this so I can't recall the specifics without researching it.

Jonathan

Jonathan Avila
Chief Accessibility Officer
Level Access, inc. (formerly SSB BART Group, inc.)
<EMAIL REMOVED>
703.637.8957 (Office)
Visit us online: Website | Twitter | Facebook | LinkedIn | Blog
Looking to boost your accessibility knowledge? Check out our free webinars!

The information contained in this transmission may be attorney privileged and/or confidential information intended for the use of the individual or entity named above. If the reader of this message is not the intended recipient, you are hereby notified that any use, dissemination, distribution or copying of this communication is strictly prohibited.


-----Original Message-----
From: <EMAIL REMOVED> [mailto: <EMAIL REMOVED> ]
Sent: Tuesday, July 25, 2017 4:35 PM
To: Jonathan Avila; <EMAIL REMOVED>
Subject: RE: Focus handling on Native App

Both iOS & Android.

Thanks!

-----Original Message-----
From: Jonathan Avila [mailto: <EMAIL REMOVED> ]
Sent: Tuesday, July 25, 2017 4:35 PM
To: Badhan Subramanian, Poornima; WebAIM Discussion List
Subject: RE: Focus handling on Native App

> Can anyone advise the coding best practice for native app focus handling?

Is this iOS or Android?

Jonathan

Jonathan Avila
Chief Accessibility Officer
Level Access, inc. (formerly SSB BART Group, inc.)
(703) 637-8957
<EMAIL REMOVED>
Visit us online: Website | Twitter | Facebook | LinkedIn | Blog Looking to boost your accessibility knowledge? Check out our free webinars!

The information contained in this transmission may be attorney privileged and/or confidential information intended for the use of the individual or entity named above. If the reader of this message is not the intended recipient, you are hereby notified that any use, dissemination, distribution or copying of this communication is strictly prohibited.

-----Original Message-----
From: WebAIM-Forum [mailto: <EMAIL REMOVED> ] On Behalf Of Poornima via WebAIM-Forum
Sent: Tuesday, July 25, 2017 4:08 PM
To: <EMAIL REMOVED>
Subject: [WebAIM] Focus handling on Native App

Native app experts - Can anyone advise the coding best practice for native app focus handling?

Say clicking on a link opens the action sheet/bottom sheet on the native app, how the focus move be coded for screen readers?

Like in web applications, there are ways to handle the focus using tabindex, javascript, etc.

Thanks,
Poornima.