WebAIM - Web Accessibility In Mind

E-mail List Archives

Thread: Focus handling on Native App

for

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

From: Poornima
Date: Tue, Jul 25 2017 2:08PM
Subject: Focus handling on Native App
No previous message | Next message →

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.

From: Jonathan Avila
Date: Tue, Jul 25 2017 2:34PM
Subject: Re: Focus handling on Native App
← Previous message | Next message →

> 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 ADDRESS 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.

From: Poornima
Date: Tue, Jul 25 2017 2:35PM
Subject: Re: Focus handling on Native App
← Previous message | Next message →

Both iOS & Android.

Thanks!

From: Jonathan Avila
Date: Wed, Jul 26 2017 11:30AM
Subject: Re: Focus handling on Native App
← Previous message | No next message

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 ADDRESS 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.