Access API: VoiceOver

Added in version 9.0.5

VoiceOver is a native iOS gesture-based screen reader that lets visitors engage with your content even if they can't see the screen. When enabled, VoiceOver provides an audio description of everything happening on the screen, allowing visitors with visual impairments to navigate and engage with content.  

VoiceOver is an iOS system level setting and cannot currently be enabled and/or disabled programmatically by the app. 

We recommend setting up the iPad in Single App Mode with VoiceOver configured as the only Accessibility Shortcut (under iOS Settings > General > Accessibility > Accessibility Shortcut > VoiceOver only).  This allows visitors to enable and disable VoiceOver by triple-clicking the Home button without any other on-screen input required.

Screen interactions are significantly different when VoiceOver is enabled so we've added this API to allow you to determine whether the device is currently using VoiceOver and to notify you when that status changes, allowing you to provide additional instructions on how to use the device in VoiceOver mode or how to disable VoiceOver, or to switch over to different content.  

If using VoiceOver, you may want to delay the idle timeout period using our  Idle Timer API (as touch events are not passed back to the app by the iOS operating system when VoiceOver is enabled and so the idle timer can execute even if a visitor is interacting with the screen).

Functions

Callbacks

Requirements

  • Access JavaScript API
    • By Import - recommended, works both online & offline, requires inclusion of kiosk_functions.js prior to any of the following calls.
    • By Injection - only works offline, may not be available 'onload' event.
  • Device configured for VoiceOver
    • We recommend setting up the iPad in Single App Mode with VoiceOver configured as the only Accessibility Shortcut (under iOS Settings > General > Accessibility > Accessibility Shortcut > VoiceOver only).  This allows visitors to enable and disable VoiceOver by triple-clicking the Home button without any other on-screen input required.

Sample Code

This sample code relies on the JavaScript APIs built into Kiosk Pro and will not run successfully in other browsers or within our in-app help interface.  
To run sample code, set the app's homepage to http://www.kioskproapp.com/voiceover

Download Sample Code


kp_AccessibilityAPI_isVoiceOverRunning

This function can be used to check whether VoiceOver is currently enabled on the device.

Format
kp_AccessibilityAPI_isVoiceOverRunning(callback);
		
Parameters callback = callback name as a string.
Callback Format
callback(isRunning);
		
Callback Return Values
  • isRunning = integer variable indicating whether VoiceOver is currently enabled. Possible values are:
    • 0 = VoiceOver is not enabled
    • 1 = VoiceOver is enabled

kp_AccessibilityAPI_voiceOverRunningStatusDidChange

This callback is triggered automatically by the app when VoiceOver is enabled or disabled.

Format
kp_AccessibilityAPI_voiceOverRunningStatusDidChange(isRunning);
		
Return Values
  • isRunning = integer variable indicating whether VoiceOver is currently enabled. Possible values are:
    • 0 = VoiceOver is not enabled
    • 1 = VoiceOver is enabled

This callback can also be used to trigger other events based on VoiceOver availability. This is done by defining this callback function in your code and placing another call within it. In the code sample, we use this to trigger an update of the page with the new status.

Still stuck? How can we help? How can we help?