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.