WWDC Quick Look 💓 By SwiftGGTeam
Create accessible Single App Mode experiences

Create accessible Single App Mode experiences

Watch original video

Highlight

Drew Haas of Apple’s Accessibility Team explains all the modes on iOS/iPadOS that restrict devices to a single app, and how to ensure accessibility features are still available in those modes.


Core Content

Drew Haas from Apple’s Accessibility Team explains all the modes on iOS/iPadOS that restrict devices to a single app, and how to ensure accessibility features are still available in these modes.

The content is divided into three parts: Guided Access (user-initiated auxiliary function locking, suitable for users with cognitive disabilities and children); three programmatic Single App Modes (Single App Mode, Autonomous Single App Mode, Persistent System Banner Mode, suitable for self-service terminals, examinations, and medical scenarios); and barrier-free API usage in Single App Mode.

Guided Access is a built-in accessibility feature in iOS that users can access by triple-clicking the power key or side button. Apps can add custom restrictions to Guided Access, such as locking specific UI elements, disabling hardware buttons, limiting touch input, and more.

The Automatic Assessment Configuration framework allows educational applications to automatically configure system settings in exam scenarios, such as turning off spell checking, disabling auto-complete, locking dictionaries, etc.


Detailed Content

Cognitive Accessibility Design for Guided Access

(00:00) Guided Access is an accessibility feature built into iOS specifically designed for users with cognitive disabilities. Users can enter Guided Access by triple-clicking the side button of the device or the power button. After the app enters the locked state, users cannot accidentally exit to the home screen or switch to other apps.

For users with cognitive disabilities, children with autism, or scenarios that require focused learning, Guided Access provides a safe application environment. Application developers canUIAccessibilityInterface adds more fine-grained control to Guided Access.

Key points:

  • Guided Access is a system-level accessibility feature that does not require MDM involvement.
  • Users can quickly enter and exit by triple-clicking the side button.
  • Suitable for use scenarios of personal devices, such as education and cognitive impairment assistance.
  • Apps can specify which areas are not interactive in Guided Access mode.

Add custom restrictions for Guided Access

(03:20) The application can passUIAccessibilityGuided Access related APIs to add custom restrictions. The most common approach is to mark UI elements where users can easily get lost.

// Mark the account settings button as disabled during Guided Access
let settingsButton = UIButton()
settingsButton.isAccessibilityElement = true
settingsButton.accessibilityTraits = [.button, .notEnabled]

Key points:

  • accessibilityTraitsInclude.notEnabled, VoiceOver will prompt that the element is unavailable.
  • Guided Access will respect these trait settings and lock the corresponding UI elements.
  • Suitable for dangerous operations such as locking account settings, payment information, logging out, etc.

Guided Access event monitoring

(05:40) Applications can monitor Guided Access state changes, such as simplifying the interface when entering Guided Access and restoring full functionality when exiting.

NotificationCenter.default.addObserver(
    self,
    selector: #selector(guidedAccessStatusChanged),
    name: UIAccessibility.guidedAccessStatusDidChangeNotification,
    object: nil
)

@objc func guidedAccessStatusChanged() {
    if UIAccessibility.isGuidedAccessEnabled {
        // Enter Guided Access mode and simplify the interface
        simplifyInterface()
    } else {
        // Exit Guided Access mode and restore full functionality
        restoreFullInterface()
    }
}

Key points:

  • UIAccessibility.isGuidedAccessEnabledQuery whether you are currently in Guided Access mode. -guidedAccessStatusDidChangeNotificationMonitor status changes.
  • The app can hide advanced features when entering and restore them when exiting.

Programmatic Request Guided Access Session

(07:15) Applications can actively request to enter Guided Access mode, which is suitable for exams, self-service kiosks and other scenarios. The user will see a system confirmation dialog box.

UIAccessibility.requestGuidedAccessSession(true) { success in
    if success {
        print("Guided Access enabled")
    } else {
        print("User denied the request or the device is unsupported")
    }
}

Key points:

  • requestGuidedAccessSession(true)Request access to Guided Access. -requestGuidedAccessSession(false)Request to exit.
  • completion handler tells whether the request was successful.
  • Users can still log out manually (by triple-clicking the side button and entering their password).

Single App Mode vs Guided Access

(09:30) Single App Mode is an MDM-managed lockdown mode controlled by the device management server. Guided Access is an auxiliary function initiated by users and does not require MDM participation.

Guided Access:
  - Initiated by the user
  - Personal device scenarios
  - Enabled through the accessibility menu or triple-click
  - Custom in-app restrictions

Single App Mode:
  - Remotely controlled by MDM
  - Enterprise and education device scenarios
  - Enabled through configuration profiles
  - System-level lockdown that cannot be exited easily

Key points:

  • Guided Access is suitable for personal devices, kid mode, and cognitive impairment assistance.
  • Single App Mode is suitable for enterprise equipment, self-service terminals, and educational examinations.
  • Guided Access users can exit at any time, Single App Mode requires MDM to be unlocked.
  • Both modes should ensure accessibility features are available.

Autonomous Single App Mode

(12:00) Autonomous Single App Mode allows apps to automatically request Single App Mode under certain conditions, such as an exam app detecting the start of an exam. This requires that the device is in Supervised mode and MDM has granted the appropriate permissions.

Device prerequisites:
  - Supervised device
  - MDM has configured the AutonomousSingleAppMode permission
  - The app is on the allowlist

Trigger flow:
  The app detects that the exam has started
    ↓
  Request Autonomous Single App Mode
    ↓
  The system automatically locks the device to the current app
    ↓
  The app requests exit after the exam ends

Key points:

  • AutonomousSingleAppModeIt’s an MDM configuration permission, not the app API.
  • Application passedUIAccessibility.requestGuidedAccessSessionask.
  • The system automatically grants Single App Mode when the prerequisites are met.
  • Suitable for unattended scenarios such as automated examinations and medical equipment.

Persistent System Banner Mode

(14:45) Persistent System Banner Mode is a milder locking mode. A persistent banner is displayed to inform the user that the device is managed, but the user is still allowed to log out.

Persistent System Banner Mode:
  - Show a system banner notification
  - Allow the user to exit manually
  - Suitable for information display scenarios
  - Does not block normal device use

Key points:

  • Gentler than Single App Mode and won’t completely lock the device.
  • Suitable for displaying information, temporary activities, and demonstration scenes.
  • Users can exit at any time without affecting the normal use of the device.
  • Requires device to be in supervisory mode.

Automatic Assessment Configuration

(17:20) The Automatic Assessment Configuration (AAC) framework allows educational apps to automatically configure system settings during exams and turn off features that may aid cheating.

import AutomaticAssessmentConfiguration

let configuration = AEAssessmentConfiguration()
configuration.spellCheck = .disabled
configuration.dictionaryLookup = .disabled
configuration.autoComplete = .disabled

let session = AEAssessmentSession(configuration: configuration)
session.begin { error in
    if let error = error {
        print("Configuration failed: \(error)")
    } else {
        print("Exam mode started")
    }
}

Key points:

  • AEAssessmentConfigurationConfigure system settings for exams.
  • Possibility to disable spell check, dictionary lookup, autocomplete, predictive text. -AEAssessmentSessionManage the life cycle of exam sessions.
  • The system automatically restores the original settings after the exam.

System configuration options for AAC

(19:10) The AAC framework provides multiple system configuration options to cover common exam cheating methods.

configuration.spellCheck = .disabled           // Disable spell checking
configuration.dictionaryLookup = .disabled     // Disable dictionary lookup
configuration.autoComplete = .disabled          // Disable autocomplete
configuration.predictiveText = .disabled        // Disable predictive text
configuration.grammarCheck = .disabled          // Disable grammar checking
configuration.correction = .disabled            // Disable autocorrection
configuration.keyboards = .restricted            // Restrict keyboard types

Key points:

  • eachconfigurationA property corresponds to a system setting.
  • After the exam, the system automatically restores the user’s original settings.
  • The configuration only takes effect within the current application and does not affect other applications.
  • Suitable for online exams, certification tests, and educational assessment scenarios.

Accessibility features in Single App Mode

(21:30) Whether using Guided Access or Single App Mode, make sure accessibility features are still available. Features such as VoiceOver, Switch Control, Zoom, etc. should not be disabled due to locked mode.

Accessibility features to preserve in locked mode:
  - VoiceOver (screen reader)
  - Switch Control
  - Zoom (magnifier)
  - Large Text
  - Reduce Motion
  - AssistiveTouch

Key points:

  • Lockdown mode should not disable accessibility features required by the user.
  • Apps should test accessibility in locked mode.
  • Users may rely on VoiceOver to navigate app interfaces.
  • Switch control users need to be able to operate all key functions.

Test accessibility in locked mode

(23:45) Apple recommends testing accessibility in Locked Mode on an actual device. Enable VoiceOver, Switch Control, Zoom, and more, then enter Guided Access or Single App Mode to verify that the app is still available.

Test checklist:
  - Enable VoiceOver and verify that all interactive elements have labels
  - Enable Switch Control and verify that the focus order is reasonable
  - Enable Zoom and verify that the interface layout is not broken
  - Enable Large Text and verify that text does not overflow or get truncated
  - Enable Reduce Motion and verify that key animations still provide feedback

Key points:

  • Tested on actual device, emulator may not be completely consistent.
  • Each accessibility feature should be tested individually.
  • Verify that the app’s core functionality is still accessible in locked mode.
  • Test the recovery process after exiting lock mode.

Core Takeaways

1. Design interface simplification strategy for Guided Access

  • What to do: When the user enters Guided Access, automatically hide complex functions and settings entrances, retaining only core functions.
  • Why it’s worth it: Users with cognitive impairments and children can more easily complete tasks in a simplified interface without getting lost or making mistakes.
  • How ​​to start: MonitoringguidedAccessStatusDidChangeNotification, hide the advanced button when entering and restore it when exiting.

2. Integrate Automatic Assessment Configuration in the exam application

  • What to do: Educational apps automatically disable system functions such as spell check, dictionary search, and auto-complete when the exam starts.
  • Why it’s worth doing: Prevent students from cheating by using system functions while ensuring the fairness and consistency of the exam environment.
  • How ​​to get started: CreateAEAssessmentConfiguration, disable related options, useAEAssessmentSessionStart an exam session.

3. Implement Autonomous Single App Mode for self-service terminal equipment

  • What: The self-service app automatically requests to enter Autonomous Single App Mode when it detects idle or certain conditions.
  • Why it’s worth doing: Unattended devices need to automatically lock to the current application to prevent users from accidentally exiting to the home screen or accessing other applications.
  • How ​​to start: Make sure the device is in supervised mode and MDM has been grantedAutonomousSingleAppModePermission, called in applicationrequestGuidedAccessSession。

4. Mark UI elements that are easy to get lost as Guided Access disabled items

  • What to do: Add dangerous operations such as account settings, payment information, logging out, etc..notEnabledtrait.
  • Why it’s worth doing: Prevent cognitively impaired users or children from misoperation in Guided Access mode, resulting in data loss or security issues.
  • How ​​to start: Find all dangerous action buttons, inaccessibilityTraitsAdd in.notEnabled, tested in Guided Access mode.

5. Keep accessibility features available in locked mode

  • What to do: Make sure the app still supports accessibility features such as VoiceOver, Switch Control, and Zoom in Guided Access or Single App Mode.
  • Why it’s worth it: Lockdown mode users often have a greater need for accessibility features, and disabling these features creates a barrier to access.
  • How ​​to get started: Enable various accessibility features on your device, enter Lockdown mode, and verify that all key features of your app are still accessible.

Comments

GitHub Issues · utterances