API: Check VoiceOver Status

Check if the device is currently running in the VoiceOver accessibility mode. 

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/iPadOS 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 the Pause or Trigger 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.

Requirements

Kiosk Pro Plus and Enterprise

  • Integration of our JavaScript API into your webpage
    • Sample code to run within the app and download for integration into your own project is available here.
    • Best practices for working with the JavaScript API are available here.
  • App Settings
    • Content > JavaScript API > Access JavaScript API = By Import
  • Device Configured for VoiceOver


Triggers via API Functions

Check VoiceOver Status

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

Format
kp_AccessibilityAPI_isVoiceOverRunning(callback);
		
Parameters callback - [string] the name of the callback to be triggered after the function has been executed
Callback Format
callback(isRunning);
		
Callback Return Values
  • isRunning - [boolean integer] indicating whether VoiceOver is currently enabled. Possible values are:
    • 0 = VoiceOver is not enabled
    • 1 = VoiceOver is enabled


Notifications via API Callbacks

On VoiceOver Status Change

This callback is triggered automatically by the app when VoiceOver is enabled or disabled. This can 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.

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


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 kioskgroup.com/voiceover-api
  • To download a .zip of sample code, click here.

Change Log

  • Added in version 9.0.5

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