KEMBAR78
iOS Accessibility For Developers (And Testers) | PDF | Ios | Accessibility
0% found this document useful (0 votes)
25 views86 pages

iOS Accessibility For Developers (And Testers)

Readyvsbsbbsbdjdjdjjdjdjdjjd dbdbbd. And s sbdbbbsbshshd shhbdbs

Uploaded by

Murugan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views86 pages

iOS Accessibility For Developers (And Testers)

Readyvsbsbbsbdjdjdjjdjdjdjjd dbdbbd. And s sbdbbbsbshshd shhbdbs

Uploaded by

Murugan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 86

SWIFTUI

EDITION
IOS
ACCESSIBILITY
FOR
DEVELOPERS
(AND TESTERS)
BY LYUBOMIR MARINOV
IOS
ACCESSIBILITY
FOR DEVELOPERS
(AND TESTERS)
BY LYUBOMIR MARINOV
TO MY MOTHER, WHO HAS TWO IPHONES, AN IPAD
AND ZERO IDEA WHAT ACCESSIBILITY IS.
DISCLAIMER
This book is based on research and information gathered about iOS accessibility
between 2022 and 2024. The information provided is for general informational purposes
only and is presented "as is" without any guarantees regarding its applicability to every
speci c situation. The author disclaims all warranties, express or implied, including
warranties of performance, merchantability, and tness for a particular purpose.

While every effort has been made to ensure the accuracy and completeness of the
information, the author shall not be liable for any errors, omissions, or any losses,
injuries, or damages arising from the use of this information. Readers should consider
their speci c needs and circumstances and may seek additional professional advice as
necessary.
fi
fi
fi
PROLOGUE
If you’ve opened up this book, you’re probably here for one of three reasons: you want
to create apps that everyone can use, you’ve been guilted into it by someone who can, or
you simply got asked by me to review it.

Whatever your reason, I’m glad you’re here.

Let’s face it, accessibility isn’t always the hottest topic at developer conferences or the
sexiest feature on your app’s promo page. But here’s a secret: it should be. Making your
app accessible isn’t just the right thing to do; it’s the smart thing to do.

Think of this book as your trusty guide on a mission to make the digital world a better
place. Together, we’ll navigate the mysterious realms of VoiceOver, tackle the nuances
of Dynamic Type, and conquer the challenges of color contrast. Along the way, you’ll
gain insights from the Accessibility Inspector and tips for effective Voice Control.
1.
INTRODUCTION TO IOS ACCESSIBILITY

Overview of Accessibility on iOS

Accessibility features on iOS are designed to help users with various impairments,
including vision, hearing, mobility, and cognitive challenges. Apple's commitment to
accessibility ensures that everyone can use their devices effectively.

The goal of iOS accessibility is to provide equal access and opportunities to all users,
regardless of their physical or cognitive abilities. Apple's extensive range of accessibility
features makes their devices some of the most user-friendly and inclusive on the market.
From voice commands to screen readers, and from magni cation tools to customizable
touch gestures, iOS offers solutions that can dramatically improve the user experience
for individuals with disabilities.

Accessibility Settings Overview

You can nd all the accessibility settings under the "Accessibility" section in the iOS
Settings app. This chapter covers how to navigate these settings and customize the user
experience according to individual needs.

Navigating to Accessibility Settings

1. Open Settings: Tap on the Settings app on your iOS device.


2. Select Accessibility: Scroll down and select the Accessibility option.
3. Explore Categories: You'll nd various categories such as Vision, Physical and
Motor, Hearing, and General.

Each of these categories contains speci c features designed to address different


accessibility needs. For example, the Vision category includes VoiceOver, Magni er,
and Display & Text Size settings. The Physical and Motor category features options like
AssistiveTouch and Switch Control, while the Hearing category provides settings for
hearing aids and audio adjustments.
fi
fi
fi
fi
fi
Customizing the User Experience

Customizing accessibility settings can greatly enhance the usability of an iOS device.
For instance, users with vision impairments can adjust the display settings to use larger
text or higher contrast. Hearing-impaired users can pair their hearing aids with their
device for a better audio experience. Each feature within the accessibility settings is
designed to be easily adjustable to meet the individual needs of the user.

Basic Terms and Concepts

Before diving into the speci c features, it's important to understand some basic terms
and concepts related to iOS accessibility:

• VoiceOver: A screen reader that provides auditory descriptions of on-screen


elements.
• Magni er: A tool that turns the device into a digital magnifying glass.
• AssistiveTouch: A feature that allows users to perform complex gestures using
simple touch commands.
• Switch Control: Enables users to control their device using adaptive switches.
• Hearing Devices: Integration with compatible hearing aids for better sound
quality.
• Guided Access: Limits the device to a single app and controls which features are
available.

Understanding these terms will help users navigate the various accessibility options and
make informed decisions about which settings will best meet their needs.

The Importance of Accessibility

Accessibility isn't just a nice-to-have feature; it's essential for many users. According to
the World Health Organization, over 1 billion people worldwide have some form of
disability. For these individuals, accessibility features can be life-changing, enabling
them to communicate, work, and engage with the world around them.

Apple's approach to accessibility is holistic and user-centric. By integrating accessibility


features into the core of their operating system, they ensure that these tools are available
to everyone, right out of the box. This commitment not only enhances the usability of
their products but also sets a standard for the tech industry as a whole.
fi
fi
Legal Aspects of Accessibility Support

Providing accessibility features is not just a moral imperative; it is also a legal


requirement in many countries. Various laws and regulations mandate that digital
products and services be accessible to individuals with disabilities.

Americans with Disabilities Act (ADA) [more info]

In the United States, the Americans with Disabilities Act (ADA) requires public
accommodations to be accessible to people with disabilities. While the ADA does not
explicitly address digital accessibility, the Department of Justice has interpreted websites
and mobile apps as public accommodations that must comply with the ADA.

Section 508 of the Rehabilitation Act [more info]

Section 508 requires federal agencies to make their electronic and information
technology (EIT) accessible to people with disabilities. This includes websites, software,
and mobile applications. Private sector organizations that receive federal funding or
contracts must also comply with Section 508.

Web Content Accessibility Guidelines (WCAG) [more info]

The Web Content Accessibility Guidelines (WCAG) are a set of international standards
for web and digital accessibility. While not a law, WCAG is widely recognized and
adopted as a benchmark for accessibility. Many legal requirements, including those in
the EU and other regions, reference WCAG as the standard for compliance.

European Accessibility Act [more info]

The European Accessibility Act requires that a wide range of products and services,
including websites and mobile applications, be accessible to people with disabilities.
This act aligns with the principles of the UN Convention on the Rights of Persons with
Disabilities.

The United Kingdom’s Equality Act 2010 [more info]

The Equality Act 2010 in the UK mandates that service providers, including digital
services, make reasonable adjustments to ensure that people with disabilities can access
their services.

By adhering to these legal requirements, developers and organizations not only avoid
potential legal repercussions but also contribute to a more inclusive society.
Accessibility Settings in Detail

Vision

1. VoiceOver: Provides auditory feedback for visually impaired users. VoiceOver


describes exactly what’s happening on your screen and helps you navigate it
using gestures.
2. Zoom: A built-in screen magni er that works wherever you are in iOS.
3. Magni er: Turns your iPhone or iPad into a digital magnifying glass.
4. Display & Text Size: Offers a variety of options to make text easier to read.
These include Bold Text, Larger Text, Button Shapes, Increase Contrast, Reduce
Transparency, and more.
5. Motion: Helps reduce the motion of the user interface, which can be helpful for
those who experience motion sickness or vertigo.
6. Spoken Content: Includes options like Speak Selection, Speak Screen, and
Typing Feedback.

Physical and Motor

1. Touch: Includes AssistiveTouch, which helps users perform complex gestures


using simple touch commands.
2. Face ID & Attention: Adjusts the settings for how Face ID works and ensures
that users can unlock their devices without needing to perform complex gestures.
3. Switch Control: Enables users to interact with their device using one or multiple
switches.
4. Voice Control: Allows users to control their device entirely with their voice,
using a wide range of commands.
5. Home Button: Customizes the behavior of the Home button for easier access.
6. Apple Watch Mirroring: Allows users to control their Apple Watch from their
iPhone.

Hearing

1. Hearing Devices: Connects compatible hearing aids and sound processors to the
device for better sound quality.
2. Sound Recognition: Uses on-device intelligence to listen for certain sounds and
notify users when a speci c sound is detected.
3. RTT/TTY: Allows for real-time text or teletypewriter communication.
4. Audio/Visual: Includes options like Mono Audio, Balance, and LED Flash for
Alerts.
fi
fi
fi
General

1. Guided Access: Helps users stay focused on a task by limiting the device to a
single app and controlling which features are available.
2. Siri: Customizes how Siri interacts with accessibility settings, making it easier
for users to get help using voice commands.
3. Accessibility Shortcut: Provides quick access to your favorite accessibility
features by triple-clicking the side or Home button.

Practical Examples of Using Accessibility Features

Example 1: Enabling VoiceOver

1. Go to Settings: Open the Settings app on your iOS device.


2. Select Accessibility: Scroll down and tap on Accessibility.
3. Choose VoiceOver: Tap on VoiceOver under the Vision category.
4. Toggle VoiceOver On: Use the toggle switch to turn VoiceOver on.

Once VoiceOver is enabled, your device will start providing auditory feedback for on-
screen elements. You can use gestures like tapping, swiping, and double-tapping to
navigate through the interface.

Example 2: Customizing Display & Text Size

1. Go to Settings: Open the Settings app.


2. Select Accessibility: Tap on Accessibility.
3. Choose Display & Text Size: Tap on Display & Text Size under the Vision
category.
4. Adjust Settings: Customize settings like Bold Text, Larger Text, Increase
Contrast, and Reduce Transparency according to your preferences.

These adjustments can make it easier to read text and interact with on-screen elements,
especially for users with low vision.

Summary

iOS accessibility features are a vital part of Apple's ecosystem, designed to make their
devices usable for everyone. By offering a wide range of customizable settings, Apple
ensures that users with various impairments can enjoy a seamless and ef cient
experience. Whether you're using VoiceOver, AssistiveTouch, or hearing aids, these
fi
features can transform the way you interact with your device, making technology more
inclusive and accessible for all.
2.
VOICEOVER – AN OVERVIEW

VoiceOver is one of the most powerful accessibility features on iOS, designed to help
visually impaired users navigate their devices through auditory feedback and gestures.
This chapter provides a comprehensive overview of VoiceOver, including how to enable
and customize it, as well as tips and tricks for effective use.

What is VoiceOver?

VoiceOver is a screen reader that provides auditory descriptions of what’s happening on


your screen. It allows users to interact with their iOS devices using gestures and helps
them navigate through apps, read content, and perform various tasks. VoiceOver reads
out loud the elements on the screen, such as text, buttons, and icons, and provides
guidance on how to interact with them.

How VoiceOver Works

When VoiceOver is enabled, it changes the way you interact with your device. Instead of
directly tapping on an item to activate it, you use a variety of gestures to navigate and
select items. For example, you can swipe left or right to move between items on the
screen, and double-tap to activate the selected item. VoiceOver provides spoken
feedback for each action, ensuring that users know what they are interacting with.

Basic Gestures and Navigation

• Single Tap: VoiceOver will read aloud the item under your nger.
• Double Tap: Activates the selected item.
• Swipe Left/Right: Moves to the next or previous item.
• Three-Finger Swipe Up/Down: Scrolls through a page.
• Two-Finger Swipe Up: Reads the entire screen from the top.
• Two-Finger Tap: Pauses or resumes the current action.

Understanding these basic gestures is crucial for effectively using VoiceOver. Users can
also customize gestures according to their preferences, which we'll cover later in this
chapter.
fi
Enabling and Customizing VoiceOver

Enabling VoiceOver

1. Open Settings: Tap on the Settings app on your iOS device.


2. Select Accessibility: Scroll down and tap on Accessibility.
3. Choose VoiceOver: Tap on VoiceOver under the Vision category.
4. Toggle VoiceOver On: Use the toggle switch to turn VoiceOver on.

Once VoiceOver is enabled, your device will start providing auditory feedback for on-
screen elements. You can use gestures like tapping, swiping, and double-tapping to
navigate through the interface.

Customizing VoiceOver Settings

VoiceOver comes with a range of customization options to tailor the experience to


individual needs:

1. VoiceOver Practice: Provides a space to practice gestures without performing


actual actions.
2. Speaking Rate: Adjusts the speed at which VoiceOver reads out loud.
3. Voice: Selects the voice that VoiceOver uses for feedback.
4. Verbosity: Controls the level of detail VoiceOver provides.
5. Audio Ducking: Lowers the volume of other audio when VoiceOver is speaking.

These settings can be adjusted to ensure that VoiceOver meets the speci c needs and
preferences of the user. For example, adjusting the speaking rate can help users who
prefer faster or slower feedback, while choosing a different voice can make the
experience more pleasant and understandable.

Using VoiceOver with Different Apps

VoiceOver is designed to work seamlessly with all native iOS apps and many third-party
apps. Here are some examples of how VoiceOver can be used with different types of
apps:

Using VoiceOver with the Mail App

VoiceOver can help users read and manage their emails. When navigating through the
Mail app, VoiceOver reads out the sender, subject, and preview of each email. Users can
swipe to move between emails, double-tap to open an email, and use gestures to delete
or archive messages.
fi
Using VoiceOver with the Safari Browser

VoiceOver makes web browsing accessible by reading out loud the text on web pages
and describing links, buttons, and other elements. Users can swipe to navigate through
different parts of a webpage and use the rotor to quickly move between headings, links,
and form controls.

Using VoiceOver with the Messages App

VoiceOver reads out incoming messages and provides feedback for composing and
sending new messages. Users can navigate through conversations, read message threads,
and use dictation to compose replies.

Tips and Tricks for Using VoiceOver

Navigating Complex Interfaces

VoiceOver users often encounter complex interfaces with many interactive elements.
Here are some tips for effective navigation:

1. Use the Rotor: The rotor is a virtual dial that allows users to quickly navigate
through different elements on the screen, such as headings, links, and form
controls. To use the rotor, rotate two ngers on the screen as if turning a dial.
2. Explore by Touch: Move your nger around the screen to hear descriptions of
items under your nger. This can help in understanding the layout of an
interface.
3. Custom Gestures: Customize gestures to perform speci c actions quickly. For
example, you can assign a three- nger tap to open the App Switcher.

Reading Documents and Books

VoiceOver can be used to read documents and books in various formats:

1. PDFs and eBooks: VoiceOver can read aloud text from PDFs and eBooks. Use
the rotor to navigate between pages, chapters, and sections.
2. Speak Screen: Use the Speak Screen feature to read the entire screen content.
Swipe down with two ngers from the top of the screen to activate it.
3. Braille Display: Connect a braille display to read documents in braille.
VoiceOver is compatible with many braille displays and provides seamless
integration.
fi
fi
fi
fi
fi
fi
Enhancing Productivity with VoiceOver

VoiceOver can signi cantly enhance productivity for visually impaired users:

1. Dictation: Use dictation to compose emails, messages, and documents. Activate


dictation by double-tapping the microphone icon on the keyboard.
2. Shortcuts: Create custom shortcuts for frequently used actions. For example,
you can create a shortcut to quickly call a contact or open a speci c app.
3. Siri: Use Siri to perform tasks using voice commands. Siri can send messages,
make calls, set reminders, and more.

VoiceOver in Different Languages

VoiceOver supports multiple languages and dialects, making it accessible to users


worldwide. Users can select their preferred language and voice from the VoiceOver
settings. Additionally, VoiceOver can automatically switch between languages when
reading multilingual content.

Switching Languages

1. Go to Settings: Open the Settings app on your iOS device.


2. Select Accessibility: Tap on Accessibility.
3. Choose VoiceOver: Tap on VoiceOver under the Vision category.
4. Tap on Speech: Select Speech and choose your preferred language and voice.

VoiceOver will now provide feedback in the selected language. This feature is
particularly useful for users who interact with content in multiple languages.

VoiceOver for Developers

Developers play a crucial role in making apps accessible. By following accessibility


guidelines and using the right tools, developers can ensure that their apps work
seamlessly with VoiceOver.

Accessibility Labels

Accessibility labels provide descriptions for UI elements that VoiceOver reads aloud.

Developers should add meaningful labels to all interactive elements, such as buttons,
links, and images.

Button("Submit") {
// Action
fi
fi
}
.accessibilityLabel("Submit")

Accessibility Traits

Accessibility traits describe the behavior of UI elements, helping VoiceOver users


understand how to interact with them. For example, a button might have the "button"
trait, while an image might have the "image" trait.

Image(systemName: "star")
.accessibilityTraits([.isImage])

Accessibility Hints

Accessibility hints provide additional information about the action performed by an


element. This helps users understand what happens when they interact with an element.

Button("Submit") {
// Action
}
.accessibilityHint("Submits the form")

Testing for Accessibility

Testing is an essential part of the development process to ensure that apps are accessible.
Developers can use the Accessibility Inspector and VoiceOver to test their apps.

1. Enable VoiceOver: Enable VoiceOver on your device and navigate through your
app to identify any accessibility issues.
2. Use Accessibility Inspector: The Accessibility Inspector is a tool that helps
developers inspect and modify accessibility attributes of their app's UI elements.

Summary

VoiceOver is a powerful tool that transforms how visually impaired users interact with
their iOS devices. By providing auditory feedback and customizable gestures,
VoiceOver makes it possible to navigate, read, and perform various tasks effectively.
Understanding and utilizing VoiceOver can greatly enhance the accessibility and
usability of iOS devices, ensuring that everyone can enjoy the bene ts of technology.
fi
3.
TESTING VOICEOVER
Content dedicated to QA testers on how to test the basic VoiceOver features.

What is VoiceOver

VoiceOver is a critical accessibility feature for users with visual impairments. As a


Quality Assurance (QA) tester, it's essential to ensure that VoiceOver is functioning
correctly and providing a seamless user experience. This chapter will guide you through
the process of testing VoiceOver, including practical tips, tools, and best practices.

Understanding VoiceOver

VoiceOver is a screen reader that provides auditory descriptions of on-screen elements,


allowing users to navigate and interact with their devices through gestures and spoken
feedback. It reads out loud the elements on the screen, such as text, buttons, and icons,
and provides guidance on how to interact with them.

Key Components of VoiceOver

• Auditory Feedback: VoiceOver reads aloud on-screen elements and provides


instructions.
• Gestures: Users interact with their device using a variety of gestures speci c to
VoiceOver.
• Rotor: A virtual dial that allows users to quickly navigate through different
elements on the screen, such as headings, links, and form controls.

Preparing for VoiceOver Testing

Before you begin testing, ensure you have enabled VoiceOver:

1. Open Settings: Tap on the Settings app on your iOS device.


2. Select Accessibility: Scroll down and tap on Accessibility.
3. Choose VoiceOver: Tap on VoiceOver under the Vision category.
4. Toggle VoiceOver On: Use the toggle switch to turn VoiceOver on.

Tip: You can also use Siri to execute the following command: “enable VoiceOver”.
fi
Testing Scenarios for VoiceOver

To ensure comprehensive testing, consider the following scenarios:

Scenario 1: Navigating Through the App

1. Open App: Launch the app to be tested.


2. Explore by Touch: Move your nger around the screen and listen to
VoiceOver’s feedback.
3. Swipe Navigation: Use swipe gestures to navigate between elements.
4. Double-Tap to Activate: Double-tap to activate selected items.
5. Test Rotor: Rotate two ngers on the screen to use the rotor and navigate
through different elements like headings and links.

Scenario 2: Reading Content

1. Text Readout: Ensure that all text elements are read out correctly by VoiceOver.
2. Labels and Hints: Verify that accessibility labels and hints are provided for
interactive elements.
3. Dynamic Content: Check if VoiceOver updates correctly when dynamic content
changes.

Scenario 3: Form Inputs

1. Input Fields: Navigate to input elds and ensure VoiceOver announces the label
and input type.
2. Typing Feedback: Type in the elds and ensure VoiceOver provides appropriate
feedback.
3. Error Messages: Ensure error messages are read out loud when form validation
fails.

Scenario 4: Custom Controls

1. Custom Components: Test custom controls and ensure they have appropriate
accessibility traits.
2. Interaction Feedback: Verify that VoiceOver provides correct feedback when
interacting with custom controls.
3. State Changes: Ensure that state changes (e.g., toggle switches) are announced
properly.
fi
fi
fi
fi
Practical Tips for Testing VoiceOver

1. Enable Verbose Mode: Turn on verbose mode in VoiceOver settings to get more
detailed feedback.
2. Use Accessibility Inspector: Utilize Accessibility Inspector in Xcode to inspect
and modify accessibility properties of UI elements.
3. Simulate Real-World Use: Test the app in different real-world scenarios, such
as in bright sunlight or in a noisy environment.
4. Collaborate with Users: Work with visually impaired users to get feedback on
the usability of your app with VoiceOver.

Accessibility Inspector in Xcode

Accessibility Inspector is a powerful tool that helps you debug and improve the
accessibility of your app. It allows you to:

• Inspect Elements: View the accessibility properties of UI elements.


• Simulate VoiceOver: Simulate VoiceOver interactions.
• Check for Missing Labels: Identify elements that are missing accessibility
labels or hints.

Using Accessibility Inspector

1. Open Accessibility Inspector: In Xcode, go to Xcode > Open Developer Tool >
Accessibility Inspector.
2. Select Target Device: Choose the device you want to inspect.
3. Inspect Elements: Use the inspector to view and modify the accessibility
properties of UI elements.
4. Simulate VoiceOver: Use the inspector to simulate VoiceOver interactions and
test the accessibility of your app.

Best Practices for VoiceOver Testing

1. Ensure Completeness: Test all screens and UI elements, including hidden and
dynamic content.
2. Consistent Labels: Ensure consistency in labels and hints for similar elements
across the app.
3. Meaningful Feedback: Provide meaningful feedback for all interactive
elements.
4. Regular Updates: Regularly update your test cases and scenarios to include new
features and changes in the app.
Common Issues and Solutions

1. Missing Labels: Ensure all interactive elements have appropriate accessibility


labels.
2. Incorrect Order: Verify the logical order of elements for swipe navigation.
3. Custom Components: Add accessibility traits and hints to custom components.
4. Dynamic Content: Ensure VoiceOver updates correctly when dynamic content
changes.

Summary

Testing VoiceOver is crucial for ensuring your app is accessible to users with visual
impairments. By following best practices, using the right tools, and thoroughly testing
different scenarios, you can create an inclusive and user-friendly app. This chapter has
provided an in-depth guide on testing VoiceOver, including practical tips, tools, and
examples for SwiftUI.
4.
ADVANCED VOICEOVER FEATURES
VoiceOver is more than just a screen reader; it’s a highly customizable tool that can be
tailored to suit the unique needs of each user. This chapter delves into the advanced
features of VoiceOver, including custom rotors, gestures, and commands, providing
detailed explanations and code samples for SwiftUI.

Custom Rotors for VoiceOver

The rotor is one of VoiceOver’s most powerful features, allowing users to quickly
navigate through speci c elements on the screen. Custom rotors can be created to make
navigation even more ef cient by allowing users to de ne their own categories of
elements to move between.

What is a Rotor?

A rotor is a virtual control that VoiceOver users can turn to change the way they navigate
through content. For example, the rotor can be set to navigate by headings, links, form
controls, or custom categories de ned by the user.

Creating Custom Rotors

Custom rotors can be incredibly useful for users who frequently navigate through
similar types of content. For example, a custom rotor could be created to navigate
through product names in a shopping app or chapter titles in an eBook.

In SwiftUI, custom rotors are created using the .accessibilityRotor modi er.

import SwiftUI

struct ContentView: View {


@State private var text = "Heading 1\nContent under heading
1\nHeading 2\nContent under heading 2"

var body: some View {


TextEditor(text: $text)
.accessibilityRotor("Headings", entries: [
AccessibilityRotorEntry("Heading 1", text: "Heading
1"),
AccessibilityRotorEntry("Heading 2", text: "Heading 2")
])
fi
fi
fi
fi
fi
.padding()
}
}

Customizing Gestures and Commands

VoiceOver includes a wide range of gestures and commands that can be customized to
suit individual preferences. Users can assign speci c actions to gestures, making it
easier to perform frequently used tasks.
Customizing Gestures

1. Open Settings: Tap on the Settings app on your iOS device.


2. Select Accessibility: Scroll down and tap on Accessibility.
3. Choose VoiceOver: Tap on VoiceOver under the Vision category.
4. Tap on Commands: Select Commands and then choose the gesture you want to
customize.

From here, you can assign a new action to the selected gesture. For example, you can
assign a three- nger tap to open the App Switcher or a two- nger swipe up to read from
the top of the screen.
Customizing Commands

In addition to gestures, VoiceOver commands can also be customized. This allows users
to assign speci c actions to keyboard shortcuts or braille display buttons.

1. Open Settings: Tap on the Settings app on your iOS device.


2. Select Accessibility: Scroll down and tap on Accessibility.
3. Choose VoiceOver: Tap on VoiceOver under the Vision category.
4. Tap on Commands: Select Commands and then choose the device you want to
customize (e.g., Keyboard, Braille Display).

rom here, you can assign a new action to the selected command. For example, you can
assign a keyboard shortcut to toggle VoiceOver or a braille display button to navigate to
the next heading.
fi
fi
fi
fi
Practical Examples of Custom Rotors and Commands

Example 1: Creating a Custom Rotor for Form Controls

A custom rotor for form controls can help users navigate through text elds, buttons, and
other form elements more ef ciently.

import SwiftUI

struct FormContentView: View {


@State private var text = ""

var body: some View {


VStack {
TextField("Enter text", text: $text)
.padding()
.accessibilityRotorEntry("Form Controls", text: "Text
Field")

Button("Submit") {
// Action
}
.padding()
.accessibilityRotorEntry("Form Controls", text: "Submit
Button")
}
.accessibilityRotor("Form Controls", entries: [
AccessibilityRotorEntry("Text Field", text: "Enter text"),
AccessibilityRotorEntry("Submit Button", text: "Submit")
])
}
}

Example 2: Customizing a Gesture for Quick Navigation

Customizing a gesture can help users quickly perform frequently used actions, such as
opening the App Switcher.

1. Open Settings: Tap on the Settings app on your iOS device.


2. Select Accessibility: Scroll down and tap on Accessibility.
3. Choose VoiceOver: Tap on VoiceOver under the Vision category.
4. Tap on Commands: Select Commands and then choose the gesture you want to
customize.
5. Assign Action: Assign the action (e.g., Open App Switcher) to the selected
gesture.

This customization can greatly enhance the ef ciency of navigating through the device,
allowing users to quickly access the App Switcher with a simple gesture.
fi
fi
fi
Advanced VoiceOver Features and Settings

VoiceOver includes several advanced features and settings that can be customized to
further enhance the user experience. These features include verbosity settings, audio
settings, and braille support.

Verbosity Settings

Verbosity settings control the level of detail that VoiceOver provides. Users can adjust
these settings to get more or less information about the elements on the screen.

1. Open Settings: Tap on the Settings app on your iOS device.


2. Select Accessibility: Scroll down and tap on Accessibility.
3. Choose VoiceOver: Tap on VoiceOver under the Vision category.
4. Tap on Verbosity: Adjust the settings according to your preferences.

For example, you can choose to hear detailed descriptions of links, text attributes, and
more. Adjusting verbosity settings can make VoiceOver more ef cient by reducing
unnecessary information or providing additional context when needed.

Audio Settings

VoiceOver includes several audio settings that can be customized to enhance the
listening experience. These settings include audio ducking, sound effects, and the use of
stereo panning.

1. Open Settings: Tap on the Settings app on your iOS device.


2. Select Accessibility: Scroll down and tap on Accessibility.
3. Choose VoiceOver: Tap on VoiceOver under the Vision category.
4. Tap on Audio: Adjust the settings according to your preferences.

Audio ducking, for example, lowers the volume of other audio when VoiceOver is
speaking, making it easier to hear VoiceOver’s feedback. Sound effects can be enabled
or disabled based on user preference, and stereo panning can help localize sounds for
better spatial awareness.

Braille Support

VoiceOver provides extensive support for braille displays, allowing users to read and
input text using a braille device. Users can connect their braille display via Bluetooth
and customize the settings for an optimal experience.

1. Open Settings: Tap on the Settings app on your iOS device.


2. Select Accessibility: Scroll down and tap on Accessibility.
fi
3. Choose VoiceOver: Tap on VoiceOver under the Vision category.
4. Tap on Braille: Adjust the settings according to your preferences.

Users can choose their preferred braille table, customize the output and input options,
and assign commands to braille display buttons. This makes it possible for users to
navigate their device and interact with content using braille.

Summary

VoiceOver’s advanced features, such as custom rotors, gestures, and commands, provide
a highly customizable and ef cient user experience for visually impaired users. By
understanding and utilizing these features, users can navigate their iOS devices more
effectively and perform tasks with greater ease.

In this chapter, we’ve covered how to create custom rotors, customize gestures and
commands, and adjust advanced settings for verbosity, audio, and braille support. These
tools and techniques can signi cantly enhance the accessibility and usability of iOS
devices, ensuring that everyone can enjoy the bene ts of technology.
fi
fi
fi
5.
TESTING ADVANCED VOICEOVER FEATURES
Content dedicated to QA testers on how to test the basic VoiceOver features.

Preparing for Testing Advanced VoiceOver Features

1. Review Feature Documentation: Understand the speci cs of the advanced


features being tested.
2. Set Up Testing Environment: Ensure your iOS device is con gured correctly
for VoiceOver testing.
3. Create Detailed Test Plans: Outline scenarios for testing custom rotors,
gestures, and commands.

Testing Custom Rotors

1. Test Navigation: Ensure custom rotors navigate through the intended elements
correctly.
2. Verify Labels: Check that rotor options have appropriate labels and hints.
3. Interaction Feedback: Ensure VoiceOver provides correct feedback when
interacting with rotor items.

Testing Custom Gestures

1. Gesture Recognition: Verify that custom gestures are recognized correctly by


VoiceOver.
2. Action Execution: Ensure that the correct actions are performed when custom
gestures are used.
3. Error Handling: Check how the app handles incorrect or incomplete gestures.
fi
fi
Testing Custom Commands

1. Command Activation: Test that custom commands can be activated correctly


via VoiceOver.
2. Response Veri cation: Ensure the app responds appropriately to custom
commands.
3. User Feedback: Verify that VoiceOver provides meaningful feedback when
commands are used.

Practical Tips for Testing Advanced Features

1. Simulate Real Use Cases: Test features in scenarios that mimic real-world use.
2. Collaborate with Developers: Work closely with developers to understand the
intended behavior of advanced features.
3. Use Detailed Logs: Keep detailed logs of test results to help diagnose issues and
track xes.

Common Issues and Solutions

1. Gesture Recognition Issues: Ensure gestures are distinct and easy to perform.
2. Incorrect Feedback: Verify all custom features provide accurate and helpful
feedback.
3. Incomplete Implementations: Ensure all planned features are fully
implemented and tested.

Summary

Advanced VoiceOver features can signi cantly enhance the accessibility of your app but
require thorough testing to ensure they work correctly. By following best practices and
testing thoroughly, you can ensure these features provide a seamless user experience.
fi
fi
fi
6.
DISPLAY ACCOMMODATIONS
Display accommodations are vital for users with vision impairments, helping them
adjust the appearance of their screens to better suit their needs. This chapter covers the
various display accommodations available on iOS, including color lters, invert colors,
reduce motion, and transparency settings. We’ll provide practical examples and code
samples for SwiftUI to illustrate how these features can be implemented and
customized.

Color Filters and Invert Colors

Color lters and inverted colors help users with color blindness or low vision to see the
screen more clearly. These features can be customized to t individual preferences,
making it easier to distinguish between different elements on the screen.

Enabling Color Filters

Color lters can be adjusted to accommodate different types of color blindness or other
vision impairments. Here's how to enable and customize color lters:

1. Open Settings: Tap on the Settings app on your iOS device.


2. Select Accessibility: Scroll down and tap on Accessibility.
3. Choose Display & Text Size: Tap on Display & Text Size under the Vision
category.
4. Tap on Color Filters: Toggle the Color Filters switch to on.
5. Select a Filter: Choose from Grayscale, Red/Green Filter (for Protanopia),
Green/Red Filter (for Deuteranopia), Blue/Yellow Filter (for Tritanopia), or
Color Tint.

Users can adjust the intensity of the color lter to suit their needs. The Color Tint option
allows users to customize the hue and intensity, providing additional exibility.

Invert Colors

Inverting colors can help users with certain types of vision impairments by providing
higher contrast between elements on the screen. There are two options for inverting
colors: Smart Invert and Classic Invert.

1. Open Settings: Tap on the Settings app on your iOS device.


fi
fi
fi
fi
fi
fi
fl
2. Select Accessibility: Scroll down and tap on Accessibility.
3. Choose Display & Text Size: Tap on Display & Text Size under the Vision
category.
4. Tap on Invert Colors: Choose between Smart Invert and Classic Invert.
• Smart Invert: Inverts colors except for images, media, and some apps that
use dark color styles.
• Classic Invert: Inverts all colors on the screen.

Users can toggle between these options to see which one provides the best visual
experience for them.

Practical Example: Using Color Filters and Invert Colors

In SwiftUI, you can use environment values to detect color lter and invert color
settings.

import SwiftUI

struct ContentView: View {


@Environment(\.accessibilityInvertColors) var invertColors
@Environment(\.accessibilityReduceTransparency) var
reduceTransparency

var body: some View {


Text("Hello, World!")
.padding()
.background(invertColors ? Color.black : Color.white)
.opacity(reduceTransparency ? 0.5 : 1.0)
}
}

Reduce Motion and Transparency

Reducing motion and transparency can help users with sensitivity to motion or visual
overstimulation. These settings modify animations and transparency effects throughout
iOS to create a more comfortable viewing experience.

Reduce Motion

Reducing motion minimizes the animations used by the system, making transitions and
effects less dynamic and easier to process.

1. Open Settings: Tap on the Settings app on your iOS device.


2. Select Accessibility: Scroll down and tap on Accessibility.
3. Choose Motion: Tap on Motion under the Vision category.
4. Toggle Reduce Motion: Turn on the Reduce Motion switch.
fi
Reduce Transparency

Reducing transparency makes the background of some elements more opaque, which
can improve legibility and reduce visual clutter.

1. Open Settings: Tap on the Settings app on your iOS device.


2. Select Accessibility: Scroll down and tap on Accessibility.
3. Choose Display & Text Size: Tap on Display & Text Size under the Vision
category.
4. Toggle Reduce Transparency: Turn on the Reduce Transparency switch.

Practical Example: Supporting Reduce Motion and Transparency

To support reduced motion and transparency in SwiftUI, you can use environment
values to detect and respond to reduced motion and transparency settings.

import SwiftUI

struct ContentView: View {


@Environment(\.accessibilityReduceMotion) var reduceMotion
@Environment(\.accessibilityReduceTransparency) var
reduceTransparency

var body: some View {


Text("Hello, World!")
.padding()
.opacity(reduceTransparency ? 0.5 : 1.0)
.animation(reduceMotion ? nil : .default)
}
}

Magni er and Zoom

The Magni er tool and Zoom functionality are designed to help users with low vision
see small details more clearly. These features can be customized to provide optimal
magni cation and clarity.

Using the Magni er Tool

The Magni er tool turns your iOS device into a digital magnifying glass, allowing you
to zoom in on objects in the real world.

1. Open Settings: Tap on the Settings app on your iOS device.


fi
fi
fi
fi
fi
2. Select Accessibility: Scroll down and tap on Accessibility.
3. Choose Magni er: Tap on Magni er under the Vision category.
4. Toggle Magni er On: Turn on the Magni er switch.

Once enabled, you can activate the Magni er by triple-clicking the side button (or home
button on older devices). Use the on-screen controls to adjust the zoom level and apply
lters.

Zoom Functionality

Zoom allows users to magnify the screen content, making it easier to see small details.

1. Open Settings: Tap on the Settings app on your iOS device.


2. Select Accessibility: Scroll down and tap on Accessibility.
3. Choose Zoom: Tap on Zoom under the Vision category.
4. Toggle Zoom On: Turn on the Zoom switch.

Once enabled, you can double-tap with three ngers to zoom in and out. You can also
move around the screen by dragging with three ngers and adjust the zoom level by
double-tapping and dragging.

Practical Example: Implementing Magni er and Zoom

In SwiftUI, you can create a zoomable view using the MagnificationGesture.

import SwiftUI

struct MagnifierView: View {


@State private var scale: CGFloat = 1.0

var body: some View {


Image("example")
.resizable()
.scaledToFit()
.scaleEffect(scale)
.gesture(MagnificationGesture()
.onChanged { value in
self.scale = value.magnitude
}
)
.padding()
}
}
fi
fi
fi
fi
fi
fi
fi
fi
fi
Practical Tips for Display Accommodations

Display accommodations can greatly enhance the usability of iOS devices for users with
vision impairments. Here are some practical tips for making the most of these features:

1. Experiment with Settings: Spend time experimenting with different settings to


nd the combination that works best for you. Adjusting the intensity of color
lters or the level of magni cation can make a signi cant difference.
2. Combine Features: Use multiple display accommodations together for a better
experience. For example, combining color lters with reduced transparency can
improve legibility.
3. Customize Shortcuts: Set up accessibility shortcuts to quickly enable or disable
display accommodations. This can be done by going to Settings > Accessibility >
Accessibility Shortcut.
4. Stay Updated: Keep your device updated to bene t from the latest accessibility
improvements and features. Apple continuously enhances accessibility features
with each iOS update.

Summary

Display accommodations on iOS provide essential tools for users with vision
impairments, allowing them to customize the appearance of their screens for better
clarity and usability. By leveraging features like color lters, invert colors, reduce
motion, and transparency settings, users can create a more comfortable and accessible
viewing experience.

In this chapter, we’ve covered the various display accommodations available on iOS,
provided practical examples, and offered tips for making the most of these features.
Understanding and utilizing these tools can greatly enhance the accessibility of iOS
devices, ensuring that everyone can enjoy the bene ts of technology.
fi
fi
fi
fi
fi
fi
fi
fi
7.
TESTING DISPLAY ACCOMMODATIONS
Content dedicated to QA testers on how to test the basic VoiceOver features.

Preparing for Testing Display Accommodations

1. Review Accommodation Features: Understand how each display


accommodation should function.
2. Set Up Testing Environment: Ensure your iOS device is con gured correctly
for testing display settings.
3. Create Detailed Test Plans: Outline scenarios for testing each display
accommodation.

Testing Color Filters and Invert Colors

1. Enable Features: Ensure color lters and invert colors can be enabled and
customized as expected.
2. Visual Veri cation: Verify the visual changes on the screen when lters and
inversion are applied.
3. User Feedback: Ensure that the features improve usability for users with color
vision impairments.

Testing Reduce Motion

1. Animation Reduction: Verify that animations are reduced or replaced with


simpler effects.
2. Performance Impact: Check that reducing motion does not negatively impact
app performance.
3. User Feedback: Ensure the feature reduces motion sickness or visual discomfort
for users.
fi
fi
fi
fi
Practical Tips for Testing Display Accommodations

1. Simulate Various Conditions: Test features under different lighting and visual
conditions.
2. Collect User Feedback: Work with users who bene t from these features to
gather feedback.
3. Use Tools and Simulators: Utilize tools and simulators to test visual changes
accurately.

Common Issues and Solutions

1. Incomplete Visual Changes: Ensure all elements are correctly modi ed by


color lters and invert colors.
2. Performance Issues: Address any performance issues caused by enabling
display accommodations.
3. Feedback Accuracy: Verify that visual feedback accurately re ects the changes
made by display accommodations.

Summary

Testing display accommodations ensures that users with visual impairments can
effectively use your app. By following best practices and thoroughly testing each
feature, you can provide a better user experience for all users.
fi
fi
fl
fi
8.
MAGNIFIER AND ZOOM
Magni cation tools are essential for users with low vision, allowing them to see details
more clearly on their iOS devices. This chapter delves into the Magni er tool and the
Zoom functionality, explaining how to enable and customize these features. Practical
examples and code samples for SwiftUI will be provided to illustrate their
implementation.

Using the Magni er Tool

The Magni er tool transforms your iOS device into a digital magnifying glass, enabling
you to zoom in on real-world objects and text for better visibility.

Enabling the Magni er Tool

1. Open Settings: Tap on the Settings app on your iOS device.


2. Select Accessibility: Scroll down and tap on Accessibility.
3. Choose Magni er: Tap on Magni er under the Vision category.
4. Toggle Magni er On: Turn on the Magni er switch.

Once enabled, you can activate the Magni er by triple-clicking the side button (or home
button on older devices). This opens the Magni er interface, which includes controls for
adjusting the zoom level, applying color lters, and capturing images.

Using the Magni er

1. Open the Magni er: Triple-click the side or home button.


2. Adjust Zoom Level: Use the slider to zoom in and out.
3. Apply Filters: Tap the lters button to choose a color lter, such as grayscale or
inverted colors.
4. Capture Images: Tap the capture button to take a snapshot, which you can then
zoom in on and inspect more closely.
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
Customizing the Magni er

Users can customize the Magni er settings to suit their preferences:

1. Go to Settings: Open the Settings app on your iOS device.


2. Select Accessibility: Tap on Accessibility.
3. Choose Magni er: Tap on Magni er under the Vision category.
4. Adjust Settings: Customize options like brightness, contrast, and lter settings.

These customizations can enhance the usability of the Magni er, making it a powerful
tool for users with low vision.

Zoom Functionality

The Zoom feature on iOS allows users to magnify the screen content, making it easier to
see small details and read text. Zoom can be used system-wide, affecting all apps and
screens.

Enabling Zoom

1. Open Settings: Tap on the Settings app on your iOS device.


2. Select Accessibility: Scroll down and tap on Accessibility.
3. Choose Zoom: Tap on Zoom under the Vision category.
4. Toggle Zoom On: Turn on the Zoom switch.

Using Zoom

1. Activate Zoom: Double-tap with three ngers to zoom in and out.


2. Move Around the Screen: Drag with three ngers to move around the screen.
3. Adjust Zoom Level: Double-tap with three ngers and drag to adjust the zoom
level.

Customizing Zoom

Zoom offers several customization options to improve usability:

1. Go to Settings: Open the Settings app on your iOS device.


2. Select Accessibility: Tap on Accessibility.
3. Choose Zoom: Tap on Zoom under the Vision category.
4. Adjust Settings: Customize options like Follow Focus, Zoom Controller, and
Region settings.
fi
fi
fi
fi
fi
fi
fi
fi
fi
These settings allow users to tailor the Zoom experience to their speci c needs,
providing greater control and exibility.

Practical Examples: Implementing Magni er and Zoom

Example 1: Using Magni er

Yo u c a n c r e a t e a s i m i l a r m a g n i f y i n g f e a t u r e u s i n g t h e
UIViewControllerRepresentable protocol to embed a
UIViewController with camera functionality.

import SwiftUI
import AVFoundation

struct MagnifierView: UIViewControllerRepresentable {


class Coordinator: NSObject,
AVCaptureVideoDataOutputSampleBufferDelegate {
var parent: MagnifierView

init(parent: MagnifierView) {
self.parent = parent
}

func captureOutput(_ output: AVCaptureOutput, didOutput


sampleBuffer: CMSampleBuffer, from connection: AVCaptureConnection) {
// Handle camera output here
}
}

func makeCoordinator() -> Coordinator {


return Coordinator(parent: self)
}

func makeUIViewController(context: Context) -> UIViewController {


let viewController = UIViewController()
let captureSession = AVCaptureSession()
guard let captureDevice = AVCaptureDevice.default(for: .video)
else { return viewController }

do {
let input = try AVCaptureDeviceInput(device: captureDevice)
captureSession.addInput(input)
} catch {
print(error.localizedDescription)
return viewController
}

let videoPreviewLayer = AVCaptureVideoPreviewLayer(session:


captureSession)
videoPreviewLayer.videoGravity = .resizeAspectFill
videoPreviewLayer.frame = viewController.view.layer.bounds
viewController.view.layer.addSublayer(videoPreviewLayer)

captureSession.startRunning()
fi
fl
fi
fi
return viewController
}

func updateUIViewController(_ uiViewController: UIViewController,


context: Context) {
// Update UI if needed
}
}

struct ContentView: View {


var body: some View {
MagnifierView()
.edgesIgnoringSafeArea(.all)
}
}

Example 2: Implementing Zoom

While UIKit provides direct APIs to support Zoom functionality for your app, in
SwiftUI you can implement Zoom using the MagnificationGesture.

import SwiftUI

struct ZoomableView: View {


@State private var scale: CGFloat = 1.0

var body: some View {


Rectangle()
.fill(Color.blue)
.frame(width: 300, height: 300)
.scaleEffect(scale)
.gesture(MagnificationGesture()
.onChanged { value in
self.scale = value.magnitude
}
)
}
}

struct ContentView: View {


var body: some View {
ZoomableView()
.padding()
}
}
Practical Tips for Using Magni er and Zoom

Magni er and Zoom tools can signi cantly enhance the usability of iOS devices for
users with low vision. Here are some practical tips for making the most of these
features:

1. Experiment with Settings: Spend time experimenting with different settings to


nd the combination that works best for you. Adjusting the zoom level and
applying different lters can make a signi cant difference.
2. Use Shortcuts: Set up accessibility shortcuts to quickly enable or disable
Magni er and Zoom. This can be done by going to Settings > Accessibility >
Accessibility Shortcut.
3. Combine Features: Use multiple magni cation features together for a better
experience. For example, combining Zoom with Display & Text Size settings
can improve legibility.
4. Stay Updated: Keep your device updated to bene t from the latest accessibility
improvements and features. Apple continuously enhances accessibility features
with each iOS update.

Summary

The Magni er and Zoom tools on iOS provide essential support for users with low
vision, allowing them to see details more clearly and interact with their devices more
effectively. By leveraging these features, users can customize their viewing experience
to better suit their needs.

In this chapter, we’ve covered how to enable and customize the Magni er and Zoom
tools, provided practical examples, and offered tips for making the most of these
features. Understanding and utilizing these tools can greatly enhance the accessibility of
iOS devices, ensuring that everyone can enjoy the bene ts of technology.
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
9.
TESTING MAGNIFIER AND ZOOM
Content dedicated to QA testers on how to test the basic VoiceOver features.

Preparing for Testing Magni er and Zoom

1. Review Magni er and Zoom Features: Understand how each tool should
function and its intended use.
2. Set Up Testing Environment: Ensure your iOS device is con gured correctly
for testing magni cation tools.
3. Create Detailed Test Plans: Outline scenarios for testing magni er and zoom
features.

Testing the Magni er Tool

1. Activation and Use: Verify that the magni er tool can be activated and used as
expected.
2. Customization Options: Ensure users can adjust zoom levels and apply lters.
3. Visual Clarity: Check that the magni ed content remains clear and readable.

Testing Zoom Functionality

1. Zoom Activation: Ensure zoom can be activated and controlled using gestures.
2. Navigation and Interaction: Verify that users can navigate and interact with
zoomed content.
3. Customization Options: Ensure users can customize zoom levels and settings.

Practical Tips for Testing Magni er and Zoom

1. Test in Various Environments: Use the tools in different lighting conditions and
environments.
2. Collect User Feedback: Work with users who bene t from these features to
gather feedback.
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
3. Use Real-World Scenarios: Test features in scenarios that mimic real-world use
cases.

Common Issues and Solutions

1. Blurry or Distorted Content: Ensure magni ed content remains clear and


readable.
2. Inconsistent Behavior: Verify that zoom and magni er tools behave
consistently across different apps and screens.
3. Customization Limitations: Address any issues with customizing zoom and
magni er settings.

Summary

Testing magni er and zoom tools ensures that users with low vision can effectively use
your app. By following best practices and thoroughly testing each feature, you can
provide a better user experience for all users.
fi
fi
fi
fi
10.
HEARING ACCOMMODATIONS
Hearing accommodations on iOS are designed to assist users who are deaf or hard of
hearing by providing tools and features that enhance audio perception and
communication. This chapter explores the various hearing accommodations available on
iOS, including hearing devices, Live Listen, and Sound Recognition. We will provide
practical examples and code samples for SwiftUI to illustrate how these features can be
implemented and customized.

Hearing Devices and Audio Routing

iOS supports a wide range of hearing devices, including Made for iPhone (MFi) hearing
aids and cochlear implants. These devices can be paired with an iOS device to improve
sound quality and provide a more personalized audio experience.

Connecting Hearing Aids and Devices

1. Open Settings: Tap on the Settings app on your iOS device.


2. Select Accessibility: Scroll down and tap on Accessibility.
3. Choose Hearing Devices: Tap on Hearing Devices under the Hearing category.
4. Pair Your Device: Follow the on-screen instructions to pair your hearing aid or
cochlear implant.

Once paired, you can customize the settings for your hearing device, including volume
control, microphone directionality, and more.

Customizing Audio Routing

Audio routing settings allow users to control how audio is delivered through their
hearing devices. This includes options for routing audio during phone calls, media
playback, and more.

1. Open Settings: Tap on the Settings app on your iOS device.


2. Select Accessibility: Scroll down and tap on Accessibility.
3. Choose Hearing Devices: Tap on Hearing Devices under the Hearing category.
4. Tap on Audio Routing: Customize the settings for Call Audio Routing and
Media Audio Routing.
These settings ensure that audio is routed to the most appropriate output device,
providing a seamless audio experience for users with hearing impairments.

Live Listen

Live Listen is a feature that turns your iOS device into a remote microphone,
transmitting sound directly to your hearing aids or AirPods. This can be particularly
useful in noisy environments or when trying to hear someone from across the room.

Enabling Live Listen

1. Open Control Center: Swipe down from the top-right corner of the screen (or
swipe up from the bottom on older devices) to open Control Center.
2. Tap on the Hearing Icon: If the Hearing icon isn’t visible, you can add it by
going to Settings > Control Center > Customize Controls and tapping the green
plus button next to Hearing.
3. Start Live Listen: Tap on the Hearing icon in Control Center, then tap on Live
Listen to turn it on.

Live Listen will now use your iOS device’s microphone to capture sound and transmit it
to your hearing aids or AirPods.

Customizing Live Listen

You can adjust the microphone sensitivity and other settings in the Live Listen interface
to optimize the audio quality for your environment.

1. Open Control Center: Swipe down from the top-right corner of the screen (or
swipe up from the bottom on older devices) to open Control Center.
2. Tap on the Hearing Icon: Tap the Hearing icon, then tap on Live Listen.
3. Adjust Settings: Use the on-screen controls to adjust the microphone sensitivity
and other settings.

These adjustments can help improve the clarity of the sound being transmitted, making
it easier to hear in various situations.

Sound Recognition

Sound Recognition uses on-device intelligence to listen for certain sounds and notify
users when those sounds are detected. This can be particularly helpful for users who are
deaf or hard of hearing.
Enabling Sound Recognition

1. Open Settings: Tap on the Settings app on your iOS device.


2. Select Accessibility: Scroll down and tap on Accessibility.
3. Choose Sound Recognition: Tap on Sound Recognition under the Hearing
category.
4. Toggle Sound Recognition On: Turn on the Sound Recognition switch.
5. Choose Sounds: Select the sounds you want your device to recognize, such as
re alarms, sirens, or doorbells.

Customizing Sound Recognition

You can customize which sounds are recognized and how noti cations are delivered.
This ensures that you are alerted to important sounds in your environment.

1. Open Settings: Tap on the Settings app on your iOS device.


2. Select Accessibility: Tap on Accessibility.
3. Choose Sound Recognition: Tap on Sound Recognition under the Hearing
category.
4. Tap on Sounds: Select or deselect the sounds you want your device to
recognize.

By customizing these settings, you can tailor Sound Recognition to your speci c needs,
ensuring you are alerted to important sounds.

Practical Examples: Implementing Hearing Accommodations

Example: Detecting Hearing Device Connectivity

You can use Combine to detect changes in the audio route and adjust your app’s audio
settings.

import SwiftUI
import AVFoundation
import Combine

class HearingDeviceObserver: ObservableObject {


@Published var hearingDeviceConnected: Bool = false
private var cancellable: AnyCancellable?

init() {
let session = AVAudioSession.sharedInstance()
cancellable = NotificationCenter.default.publisher(for:
AVAudioSession.routeChangeNotification)
.sink { [weak self] _ in
for output in session.currentRoute.outputs {
fi
fi
fi
if output.portType == .bluetoothHFP ||
output.portType == .bluetoothA2DP {
self?.hearingDeviceConnected = true
return
}
}
self?.hearingDeviceConnected = false
}
}
}

struct ContentView: View {


@ObservedObject var observer = HearingDeviceObserver()

var body: some View {


Text(observer.hearingDeviceConnected ? "Hearing Device
Connected" : "No Hearing Device")
.padding()
}
}

Practical Tips for Hearing Accommodations

Hearing accommodations can greatly enhance the usability of iOS devices for users who
are deaf or hard of hearing. Here are some practical tips for making the most of these
features:

1. Experiment with Settings: Spend time experimenting with different settings to


nd the combination that works best for you. Adjusting audio routing and
microphone sensitivity can make a signi cant difference.
2. Use Shortcuts: Set up accessibility shortcuts to quickly enable or disable hearing
accommodations. This can be done by going to Settings > Accessibility >
Accessibility Shortcut.
3. Combine Features: Use multiple hearing accommodations together for a better
experience. For example, combining Live Listen with Sound Recognition can
provide comprehensive support.
4. Stay Updated: Keep your device updated to bene t from the latest accessibility
improvements and features. Apple continuously enhances accessibility features
with each iOS update.

Summary

Hearing accommodations on iOS provide essential support for users who are deaf or
hard of hearing, allowing them to customize their audio experience and stay aware of
important sounds in their environment. By leveraging features like hearing devices, Live
fi
fi
fi
Listen, and Sound Recognition, users can create a more accessible and personalized
audio experience.

In this chapter, we’ve covered the various hearing accommodations available on iOS,
provided practical examples, and offered tips for making the most of these features.
Understanding and utilizing these tools can greatly enhance the accessibility of iOS
devices, ensuring that everyone can enjoy the bene ts of technology.

fi
11.
TESTING HEARING ACCOMMODATIONS
Content dedicated to QA testers on how to test the basic VoiceOver features.

Preparing for Testing Hearing Accommodations

1. Review Hearing Accommodation Features: Understand how each hearing


accommodation should function.
2. Set Up Testing Environment: Ensure your iOS device is con gured correctly
for testing hearing accommodations.
3. Create Detailed Test Plans: Outline scenarios for testing hearing devices, Live
Listen, and Sound Recognition.

Testing Hearing Devices and Audio Routing

1. Device Pairing: Ensure hearing aids and devices can be paired and used with the
iOS device.
2. Audio Quality: Verify that audio quality is consistent and clear.
3. Customization Options: Ensure users can customize audio routing and settings.

Testing Live Listen

1. Activation and Use: Verify that Live Listen can be activated and used as
expected.
2. Audio Clarity: Ensure the audio captured by the microphone is clear and
transmitted effectively to hearing devices.
3. Customization Options: Check that users can adjust microphone sensitivity and
other settings.
fi
Testing Sound Recognition

1. Enable and Customize: Ensure Sound Recognition can be enabled and


customized for different sounds.
2. Noti cation Accuracy: Verify that the device correctly recognizes and noti es
users of selected sounds.
3. User Feedback: Ensure the feature improves awareness of important sounds in
the environment.

Practical Tips for Testing Hearing Accommodations

1. Test in Various Environments: Use the features in different noise levels and
environments.
2. Collect User Feedback: Work with users who bene t from these features to
gather feedback.
3. Use Real-World Scenarios: Test features in scenarios that mimic real-world use
cases.

Common Issues and Solutions

1. Pairing Issues: Ensure hearing devices can be easily paired and used with the
iOS device.
2. Audio Quality Issues: Address any issues with audio quality and clarity.
3. Noti cation Accuracy: Verify that Sound Recognition accurately recognizes and
noti es users of selected sounds.

Summary

Testing hearing accommodations ensures that users with hearing impairments can
effectively use your app. By following best practices and thoroughly testing each
feature, you can provide a better user experience for all users.
fi
fi
fi
fi
fi
12.
ASSISTIVETOUCH AND SWITCH CONTROL
AssistiveTouch and Switch Control are two powerful accessibility features designed to
help users with physical and motor impairments interact with their iOS devices more
easily. This chapter covers how to enable and customize these features, providing
practical examples and code samples for SwiftUI.

Introduction to AssistiveTouch

AssistiveTouch is a feature that allows users to perform complex gestures using simple
touch commands. It provides an on-screen menu that lets users access various functions,
such as returning to the home screen, adjusting volume, and activating Siri, without
needing to use physical buttons.

Enabling AssistiveTouch

1. Open Settings: Tap on the Settings app on your iOS device.


2. Select Accessibility: Scroll down and tap on Accessibility.
3. Choose Touch: Tap on Touch under the Physical and Motor category.
4. Tap on AssistiveTouch: Toggle the AssistiveTouch switch to on.

Once enabled, an on-screen button will appear, which you can drag to any edge of the
screen. Tapping this button opens the AssistiveTouch menu.

Customizing AssistiveTouch

AssistiveTouch can be customized to better suit individual needs. Here are some
customization options:

1. Open AssistiveTouch Settings: Go to Settings > Accessibility > Touch >


AssistiveTouch.
2. Customize Top Level Menu: Tap on Customize Top Level Menu to add,
remove, or rearrange menu items.
3. Create New Gesture: Tap on Create New Gesture to create custom touch
gestures.
4. Idle Opacity: Adjust the opacity of the AssistiveTouch button when not in use.
Practical Example: Using AssistiveTouch

AssistiveTouch can be used to perform various actions, such as taking screenshots,


activating Siri, or adjusting the volume.

1. Activate AssistiveTouch Menu: Tap the on-screen AssistiveTouch button.


2. Select an Action: Choose an action from the menu, such as Home, Siri, or
Device.
3. Perform Custom Gestures: Create and select custom gestures for speci c tasks.

Introduction to Switch Control

Switch Control allows users with limited mobility to control their iOS devices using
adaptive switches. This feature can be customized to perform various actions, such as
selecting items, scrolling, and typing.

Enabling Switch Control

1. Open Settings: Tap on the Settings app on your iOS device.


2. Select Accessibility: Scroll down and tap on Accessibility.
3. Choose Switch Control: Tap on Switch Control under the Physical and Motor
category.
4. Toggle Switch Control On: Turn on the Switch Control switch.

Setting Up Switches

1. Add a Switch: Go to Settings > Accessibility > Switch Control > Switches >
Add New Switch.
2. Choose Source: Select the source of the switch, such as External, Screen, or
Camera.
3. Assign an Action: Assign an action to the switch, such as Select Item, Move to
Next Item, or Tap.

Customizing Switch Control

Switch Control can be customized to provide a more tailored experience:

1. Open Switch Control Settings: Go to Settings > Accessibility > Switch Control.
2. Auto Scanning: Enable or disable Auto Scanning and adjust the scanning speed.
3. Scanning Style: Choose between Auto Scanning, Manual Scanning, and Single
Switch Step Scanning.
fi
4. Recipes: Create and manage recipes to perform complex actions with a single
switch.

Practical Example: Using Switch Control

Switch Control can be used to navigate the device, select items, and perform various
actions:

1. Activate Switch Control: Turn on Switch Control from the Accessibility


settings.
2. Use Switches: Use your con gured switches to navigate and interact with the
device.
3. Create Recipes: Set up recipes for speci c tasks, such as opening an app or
performing a series of actions.

Practical Examples: Implementing AssistiveTouch and Switch Control

Example 1: Customizing AssistiveTouch

You can provide custom actions using the accessibilityAction modi er.

import SwiftUI

struct ContentView: View {


var body: some View {
Text("Hello, World!")
.padding()
.accessibility(addTraits: .isButton)
.accessibilityAction(named: Text("Custom Action")) {
// Perform custom action
print("Custom action performed")
}
}
}

Example 2: Implementing Switch Control

Ensure that all interactive elements have appropriate accessibility labels and hints.

import SwiftUI

struct ContentView: View {


var body: some View {
Button(action: {
print("Button tapped")
fi
fi
fi
}) {
Text("Tap me")
.padding()
}
.accessibility(label: Text("Tap button"))
.accessibility(hint: Text("Taps the button"))
}
}

Practical Tips for AssistiveTouch and Switch Control

1. Experiment with Settings: Spend time experimenting with different settings to


nd the combination that works best for you. Adjusting the scanning speed and
customizing the AssistiveTouch menu can make a signi cant difference.
2. Use Shortcuts: Set up accessibility shortcuts to quickly enable or disable
AssistiveTouch and Switch Control. This can be done by going to Settings >
Accessibility > Accessibility Shortcut.
3. Combine Features: Use multiple accessibility features together for a better
experience. For example, combining AssistiveTouch with Switch Control can
provide comprehensive support.
4. Stay Updated: Keep your device updated to bene t from the latest accessibility
improvements and features. Apple continuously enhances accessibility features
with each iOS update.

Summary

AssistiveTouch and Switch Control are powerful tools that provide essential support for
users with physical and motor impairments. By leveraging these features, users can
interact with their iOS devices more easily and effectively.

In this chapter, we’ve covered how to enable and customize AssistiveTouch and Switch
Control, provided practical examples, and offered tips for making the most of these
features. Understanding and utilizing these tools can greatly enhance the accessibility of
iOS devices, ensuring that everyone can enjoy the bene ts of technology.
fi
fi
fi
fi
13.
TESTING ASSISTIVETOUCH AND SWITCH CONTROL
Content dedicated to QA testers on how to test the basic VoiceOver features.

Preparing for Testing AssistiveTouch and Switch Control

1. Review AssistiveTouch and Switch Control Features: Understand how each


feature should function.
2. Set Up Testing Environment: Ensure your iOS device is con gured correctly
for testing these features.
3. Create Detailed Test Plans: Outline scenarios for testing AssistiveTouch and
Switch Control.

Testing AssistiveTouch

1. Menu Navigation: Verify that users can navigate the AssistiveTouch menu and
activate features.
2. Custom Gestures: Ensure custom gestures are recognized and executed
correctly.
3. Customization Options: Check that users can customize the AssistiveTouch
menu and settings.

Testing Switch Control

1. Switch Con guration: Ensure switches can be con gured and used with the iOS
device.
2. Navigation and Interaction: Verify that users can navigate and interact with the
device using switches.
3. Customization Options: Ensure users can customize Switch Control settings
and actions.
fi
fi
fi
Practical Tips for Testing AssistiveTouch and Switch Control

1. Test in Various Environments: Use the features in different physical


environments.
2. Collect User Feedback: Work with users who bene t from these features to
gather feedback.
3. Use Real-World Scenarios: Test features in scenarios that mimic real-world use
cases.

Common Issues and Solutions

1. Navigation Issues: Ensure users can easily navigate and use AssistiveTouch and
Switch Control.
2. Gesture Recognition Issues: Verify custom gestures are recognized and
executed correctly.
3. Customization Limitations: Address any issues with customizing
AssistiveTouch and Switch Control settings.

Summary

Testing AssistiveTouch and Switch Control ensures that users with physical and motor
impairments can effectively use your app. By following best practices and thoroughly
testing each feature, you can provide a better user experience for all users.
fi
14.
GUIDED ACCESS AND ACCESSIBILITY SHORTCUTS
Guided Access and Accessibility Shortcuts are essential tools designed to help users
focus on a single task and quickly access frequently used accessibility features. This
chapter covers how to enable and customize these features, providing practical examples
and code samples for SwiftUI.

Guided Access

Guided Access is a feature that restricts the device to a single app, allowing users to stay
focused on the task at hand. It is particularly useful for users with attention de cits or
those who require a controlled environment.

Enabling Guided Access

1. Open Settings: Tap on the Settings app on your iOS device.


2. Select Accessibility: Scroll down and tap on Accessibility.
3. Choose Guided Access: Tap on Guided Access under the General category.
4. Toggle Guided Access On: Turn on the Guided Access switch.

Once enabled, you can activate Guided Access in any app by triple-clicking the side
button (or home button on older devices). This will lock the device into the current app,
preventing access to other apps and settings.

Customizing Guided Access

Guided Access can be customized to suit individual needs, including setting a passcode,
limiting touch input, and con guring time limits.

1. Open Guided Access Settings: Go to Settings > Accessibility > Guided Access.
2. Set Passcode: Tap on Passcode Settings to set a Guided Access passcode.
3. Con gure Time Limits: Tap on Time Limits to set a time limit for Guided
Access sessions.
4. Limit Touch Input: When activating Guided Access, you can circle areas of the
screen that you want to disable touch input for.
fi
fi
fi
Practical Example: Using Guided Access

Guided Access can be used to help users stay focused on a speci c app, such as an
educational app or a communication tool.

1. Activate Guided Access: Open the app you want to use, then triple-click the
side or home button.
2. Customize Session: Use the on-screen controls to disable areas of the screen, set
a time limit, or con gure other options.
3. Start Guided Access: Tap Start to begin the Guided Access session.

Accessibility Shortcuts

Accessibility Shortcuts provide quick access to frequently used accessibility features,


allowing users to enable or disable them with a triple-click of the side or home button.

Setting Up Accessibility Shortcuts

1. Open Settings: Tap on the Settings app on your iOS device.


2. Select Accessibility: Scroll down and tap on Accessibility.
3. Choose Accessibility Shortcut: Tap on Accessibility Shortcut under the General
category.
4. Select Features: Choose the accessibility features you want to include in the
shortcut, such as VoiceOver, Magni er, or AssistiveTouch.

Using Accessibility Shortcuts

Once set up, you can enable or disable the selected features by triple-clicking the side or
home button.

1. Activate Shortcut: Triple-click the side or home button.


2. Select Feature: If multiple features are selected, a menu will appear allowing
you to choose which feature to enable or disable.
fi
fi
fi
Practical Examples: Implementing Guided Access and Accessibility Shortcuts

Example: Implementing Guided Access

No special code is required here, you can simply provide information about using
Accessibility Shortcuts within your app.

import SwiftUI

struct ContentView: View {


var body: some View {
VStack {
Text("To enable Accessibility Shortcuts, go to Settings >
Accessibility > Accessibility Shortcut.")
.padding()
.multilineTextAlignment(.center)

Text("Triple-click the side button to access selected


features.")
.padding()
.multilineTextAlignment(.center)
}
.padding()
}
}

Practical Tips for Guided Access and Accessibility Shortcuts

1. Experiment with Settings: Spend time experimenting with different settings to


nd the combination that works best for you. Adjusting time limits and
customizing the Guided Access session can make a signi cant difference.
2. Use Shortcuts: Set up accessibility shortcuts to quickly enable or disable
frequently used features. This can save time and improve ef ciency.
3. Combine Features: Use multiple accessibility features together for a better
experience. For example, combining Guided Access with AssistiveTouch can
provide comprehensive support.
4. Stay Updated: Keep your device updated to bene t from the latest accessibility
improvements and features. Apple continuously enhances accessibility features
with each iOS update.

Summary

Guided Access and Accessibility Shortcuts are powerful tools that provide essential
support for users who need to focus on a single task or quickly access frequently used
accessibility features. By leveraging these features, users can create a more accessible
and personalized experience on their iOS devices.
fi
fi
fi
fi
In this chapter, we’ve covered how to enable and customize Guided Access and
Accessibility Shortcuts, provided practical examples, and offered tips for making the
most of these features. Understanding and utilizing these tools can greatly enhance the
accessibility of iOS devices, ensuring that everyone can enjoy the bene ts of
technology.

fi
15.
TESTING GUIDED ACCESS AND ACCESSIBILITY
SHORTCUTS
Content dedicated to QA testers on how to test the basic VoiceOver features.

Preparing for Testing Guided Access and Accessibility Shortcuts

1. Review Guided Access and Accessibility Shortcut Features: Understand how


each feature should function.
2. Set Up Testing Environment: Ensure your iOS device is con gured correctly
for testing these features.
3. Create Detailed Test Plans: Outline scenarios for testing Guided Access and
Accessibility Shortcuts.

Testing Guided Access

1. Activation and Use: Verify that Guided Access can be activated and used as
expected.
2. Customization Options: Ensure users can customize Guided Access settings,
such as limiting touch input and setting time limits.
3. User Feedback: Check that Guided Access improves focus and usability for
users.

Testing Accessibility Shortcuts

1. Shortcut Con guration: Ensure accessibility shortcuts can be con gured and
accessed using the side or home button.
2. Feature Activation: Verify that selected features are activated correctly when
using the shortcut.
3. Customization Options: Ensure users can customize the accessibility shortcuts
and settings.
fi
fi
fi
Practical Tips for Testing Guided Access and Accessibility Shortcuts

1. Test in Various Environments: Use the features in different physical


environments.
2. Collect User Feedback: Work with users who bene t from these features to
gather feedback.
3. Use Real-World Scenarios: Test features in scenarios that mimic real-world use
cases.

Common Issues and Solutions

1. Activation Issues: Ensure users can easily activate and use Guided Access and
Accessibility Shortcuts.
2. Customization Limitations: Address any issues with customizing Guided
Access and Accessibility Shortcut settings.
3. Feature Inconsistencies: Verify that features activated through shortcuts behave
consistently.

Summary

Testing Guided Access and Accessibility Shortcuts ensures that users can effectively use
your app in a focused and ef cient manner. By following best practices and thoroughly
testing each feature, you can provide a better user experience for all users.
fi
fi
16.
VOICE CONTROL
Voice Control is a powerful feature that allows users to control their iOS devices entirely
with their voice. This feature is particularly useful for users with physical or motor
impairments, providing hands-free control over their device. This chapter covers how to
enable and customize Voice Control, practical examples of using it, and code samples
for SwiftUI.

Enabling and Setting Up Voice Control

Voice Control allows users to perform various tasks using voice commands, such as
navigating the device, interacting with apps, and dictating text.

Enabling Voice Control

1. Open Settings: Tap on the Settings app on your iOS device.


2. Select Accessibility: Scroll down and tap on Accessibility.
3. Choose Voice Control: Tap on Voice Control under the Physical and Motor
category.
4. Toggle Voice Control On: Turn on the Voice Control switch.

Once enabled, you will see a blue microphone icon in the status bar, indicating that
Voice Control is active. You can start using voice commands immediately.

Setting Up Voice Control

Voice Control comes with a set of default commands, but you can customize it to better
suit your needs.

1. Open Voice Control Settings: Go to Settings > Accessibility > Voice Control.
2. Customize Commands: Tap on Customize Commands to view and edit existing
commands or create new ones.
3. Vocabulary: Tap on Vocabulary to add custom words or phrases that Voice
Control should recognize.
4. Language: Select the preferred language for Voice Control under Language
settings.
By customizing these settings, you can make Voice Control more effective and tailored
to your speci c needs.

Basic Commands and Navigation

Voice Control includes a wide range of commands that allow you to perform various
actions on your device. Here are some basic commands:

• Open Apps: "Open [app name]"


• Go Home: "Go Home"
• Swipe: "Swipe left/right/up/down"
• Tap: "Tap [element name]"
• Dictate Text: "Type [text]"
• Control Center: "Open Control Center"

These commands cover basic navigation and interaction with your device. You can use
these commands to open apps, navigate between screens, interact with elements, and
dictate text.

Customizing Commands

Voice Control allows you to create custom commands to perform speci c actions.

1. Open Voice Control Settings: Go to Settings > Accessibility > Voice Control.
2. Customize Commands: Tap on Customize Commands and select Create New
Command.
3. Phrase: Enter the phrase you want to use for the command.
4. Action: Choose the action for the command, such as performing a gesture,
running a shortcut, or opening an app.
5. Application: Select the application in which the command will be active, if
applicable.

Custom commands can make Voice Control more ef cient by allowing you to perform
frequently used actions with a single phrase.

Practical Examples: Using Voice Control

Voice Control can be used for various tasks, such as composing messages, browsing the
web, and interacting with apps. Here are some practical examples:

Example 1: Composing a Message

1. Open Messages: "Open Messages"


2. Start a New Message: "Tap New Message"
fi
fi
fi
3. Enter Recipient: "Type [contact name]"
4. Dictate Message: "Type 'Hello, how are you?'"
5. Send Message: "Tap Send"

Example 2: Browsing the Web

1. Open Safari: "Open Safari"


2. Search for a Website: "Search for [website name]"
3. Navigate Links: "Tap [link name]"
4. Scroll Page: "Swipe up/down"

Example 3: Interacting with an App

1. Open App: "Open [app name]"


2. Navigate App: "Swipe left/right"
3. Interact with Elements: "Tap [element name]"

By using these commands, you can ef ciently perform tasks and navigate your device
hands-free.

Practical Examples: Implementing Voice Control in Apps

While Voice Control is primarily a system-level feature, developers can ensure their
apps are accessible and compatible with Voice Control by properly labeling UI elements
and providing custom accessibility actions.

Example: Ensuring Compatibility

Ensure that all interactive elements have appropriate accessibility labels and hints.

import SwiftUI

struct ContentView: View {


var body: some View {
Button(action: {
print("Button tapped")
}) {
Text("Tap me")
.padding()
}
.accessibility(label: Text("Tap button"))
.accessibility(hint: Text("Taps the button"))
}
}
fi
Practical Tips for Voice Control

1. Experiment with Commands: Spend time experimenting with different


commands to nd the ones that work best for you. Customizing commands can
make a signi cant difference.
2. Use Vocabulary: Add custom words or phrases to the Vocabulary settings to
improve Voice Control's recognition accuracy.
3. Combine Features: Use Voice Control in conjunction with other accessibility
features, such as Switch Control or AssistiveTouch, for a more comprehensive
experience.
4. Stay Updated: Keep your device updated to bene t from the latest accessibility
improvements and features. Apple continuously enhances Voice Control with
each iOS update.

Summary

Voice Control on iOS provides a powerful tool for users with physical and motor
impairments, allowing them to control their devices entirely with their voice. By
leveraging the built-in commands and customizing the feature to suit individual needs,
users can navigate, interact, and perform tasks hands-free.

In this chapter, we’ve covered how to enable and customize Voice Control, provided
practical examples of using it, and offered tips for making the most of this feature.
Understanding and utilizing Voice Control can greatly enhance the accessibility of iOS
devices, ensuring that everyone can enjoy the bene ts of technology.
fi
fi
fi
fi
17.
TESTING VOICE CONTROL
Content dedicated to QA testers on how to test the basic VoiceOver features.

Preparing for Testing Voice Control

1. Review Voice Control Features: Understand how Voice Control should function
and its intended use.
2. Set Up Testing Environment: Ensure your iOS device is con gured correctly
for testing Voice Control.
3. Create Detailed Test Plans: Outline scenarios for testing Voice Control
commands and interactions.

Testing Voice Control

1. Command Recognition: Verify that Voice Control accurately recognizes and


executes spoken commands.
2. Navigation and Interaction: Ensure users can navigate and interact with the
device using voice commands.
3. Customization Options: Check that users can customize Voice Control settings
and commands.

Practical Tips for Testing Voice Control

1. Test in Various Environments: Use the feature in different noise levels and
environments.
2. Collect User Feedback: Work with users who bene t from these features to
gather feedback.
3. Use Real-World Scenarios: Test features in scenarios that mimic real-world use
cases.
fi
fi
Common Issues and Solutions

1. Recognition Issues: Ensure Voice Control accurately recognizes spoken


commands.
2. Navigation Limitations: Verify that users can easily navigate and use Voice
Control.
3. Customization Issues: Address any issues with customizing Voice Control
settings and commands.

Summary

Testing Voice Control ensures that users with physical and motor impairments can
effectively use your app through voice commands. By following best practices and
thoroughly testing each feature, you can provide a better user experience for all users.
18.
SIRI AND ACCESSIBILITY
Siri, Apple’s intelligent assistant, plays a crucial role in enhancing accessibility on iOS
devices. Siri can be used to perform a wide range of tasks using voice commands,
making it easier for users with physical, motor, or cognitive impairments to interact with
their devices. This chapter explores how to use Siri for accessibility, customize its
settings, and provides practical examples and code samples for SwiftUI.

Using Siri for Accessibility

Siri can assist users with a variety of tasks, such as sending messages, making phone
calls, setting reminders, and controlling smart home devices. By leveraging Siri, users
can perform these tasks hands-free, which is particularly bene cial for those with
physical or motor impairments.

Enabling Siri

1. Open Settings: Tap on the Settings app on your iOS device.


2. Select Siri & Search: Scroll down and tap on Siri & Search.
3. Toggle Siri On: Turn on Listen for "Hey Siri" and Press Side Button for Siri (or
Press Home for Siri on older devices).

Once Siri is enabled, you can activate it by saying "Hey Siri" or by pressing the side or
home button.

Customizing Siri

Siri can be customized to better suit individual preferences and needs.

1. Open Siri & Search Settings: Go to Settings > Siri & Search.
2. Language: Select your preferred language for Siri.
3. Siri Voice: Choose the voice you prefer for Siri.
4. Voice Feedback: Customize when Siri provides voice feedback (always, with
silent mode off, or with hands-free only).
5. My Information: Select your contact card to personalize Siri’s responses and
access information relevant to you.
fi
By customizing these settings, you can make Siri more effective and tailored to your
needs.

Practical Examples: Using Siri for Accessibility

Siri can be used for a variety of accessibility-related tasks. Here are some practical
examples:

Example 1: Sending Messages

1. Activate Siri: Say "Hey Siri" or press the side/home button.


2. Send Message: Say "Send a message to [contact name] saying 'I'll be there in 10
minutes.'"

Example 2: Making Phone Calls

1. Activate Siri: Say "Hey Siri" or press the side/home button.


2. Make Call: Say "Call [contact name] on speaker."

Example 3: Setting Reminders

1. Activate Siri: Say "Hey Siri" or press the side/home button.


2. Set Reminder: Say "Remind me to take my medication at 8 PM."

Example 4: Controlling Smart Home Devices

1. Activate Siri: Say "Hey Siri" or press the side/home button.


2. Control Device: Say "Turn on the living room lights."

By using these commands, users can ef ciently perform tasks and control their devices
hands-free.
fi
Integrating Siri with Accessibility Needs

Developers can integrate Siri into their apps to enhance accessibility by providing voice-
controlled functionality. This can be done using Siri Shortcuts and SiriKit.

Example 1: Creating Siri Shortcuts

Siri Shortcuts allow users to create custom voice commands for speci c actions within
your app. In SwiftUI, you can use the NSUserActivity to create Siri Shortcuts.

import SwiftUI
import Intents

struct ContentView: View {


var body: some View {
Button("Add to Siri") {
addToSiri()
}
.padding()
}

func addToSiri() {
let activity = NSUserActivity(activityType:
"com.example.myApp.sayHello")
activity.title = "Say Hello"
activity.userInfo = ["message": "Hello, world!"]
activity.isEligibleForSearch = true
activity.isEligibleForPrediction = true
activity.persistentIdentifier =
NSUserActivityPersistentIdentifier("com.example.myApp.sayHello")

UIApplication.shared.userActivity = activity
activity.becomeCurrent()
}
}

Example 2: Using SiriKit Intents

SiriKit allows developers to handle user intents directly within their apps. This can
provide a more seamless integration for complex tasks.

1. De ne Intents: Create an Intents De nition le and de ne your intents.


2. Handle Intents: Implement the intent handling in your app.

import Intents

class IntentHandler: INExtension, INSendMessageIntentHandling {


func handle(intent: INSendMessageIntent, completion: @escaping
(INSendMessageIntentResponse) -> Void) {
fi
fi
fi
fi
fi
// Handle the intent
let response = INSendMessageIntentResponse(code: .success,
userActivity: nil)
completion(response)
}

func resolveRecipients(for intent: INSendMessageIntent, with


completion: @escaping ([INSendMessageRecipientResolutionResult]) ->
Void) {
// Resolve recipients
let recipients =
[INSendMessageRecipientResolutionResult.success(with:
intent.recipients!.first!)]
completion(recipients)
}

func resolveContent(for intent: INSendMessageIntent, with


completion: @escaping (INStringResolutionResult) -> Void) {
// Resolve content
if let content = intent.content, !content.isEmpty {
completion(.success(with: content))
} else {
completion(.needsValue())
}
}
}

By integrating Siri with your app, you can provide users with a hands-free way to
interact with your app, enhancing accessibility.

Practical Tips for Using Siri

1. Experiment with Commands: Spend time experimenting with different Siri


commands to nd the ones that work best for you. Customizing commands and
using Siri Shortcuts can make a signi cant difference.
2. Use Personalization: Set up your contact card in Siri & Search settings to
personalize Siri’s responses and access information relevant to you.
3. Combine Features: Use Siri in conjunction with other accessibility features,
such as Voice Control or AssistiveTouch, for a more comprehensive experience.
4. Stay Updated: Keep your device updated to bene t from the latest accessibility
improvements and features. Apple continuously enhances Siri with each iOS
update.

Summary

Siri on iOS provides a powerful tool for users with physical, motor, or cognitive
impairments, allowing them to perform tasks and control their devices entirely with their
fi
fi
fi
voice. By leveraging Siri's built-in commands and customizing its settings, users can
create a more personalized and ef cient hands-free experience.

In this chapter, we’ve covered how to enable and customize Siri, provided practical
examples of using it, and offered tips for making the most of this feature. Understanding
and utilizing Siri can greatly enhance the accessibility of iOS devices, ensuring that
everyone can enjoy the bene ts of technology.
fi
fi
19.
TESTING SIRI AND ACCESSIBILITY
Content dedicated to QA testers on how to test the basic VoiceOver features.

Preparing for Testing Siri and Accessibility

1. Review Siri Features: Understand how Siri should function and its intended
use.
2. Set Up Testing Environment: Ensure your iOS device is con gured correctly
for testing Siri.
3. Create Detailed Test Plans: Outline scenarios for testing Siri commands and
interactions.

Testing Siri

1. Command Recognition: Verify that Siri accurately recognizes and executes


spoken commands.
2. Integration with Apps: Ensure Siri can interact with and control third-party
apps as expected.
3. Customization Options: Check that users can customize Siri settings and
commands.

Practical Tips for Testing Siri

1. Test in Various Environments: Use Siri in different noise levels and


environments.
2. Collect User Feedback: Work with users who bene t from these features to
gather feedback.
3. Use Real-World Scenarios: Test features in scenarios that mimic real-world use
cases.
fi
fi
Common Issues and Solutions

1. Recognition Issues: Ensure Siri accurately recognizes spoken commands.


2. Integration Limitations: Verify that Siri can effectively control third-party apps.
3. Customization Issues: Address any issues with customizing Siri settings and
commands.

Summary

Testing Siri ensures that users with various impairments can effectively use your app
through voice commands. By following best practices and thoroughly testing each
feature, you can provide a better user experience for all users.
20.
READING SUPPORT
Reading support on iOS is designed to assist users with visual impairments or reading
dif culties by providing tools that can read text aloud, highlight text, and adjust text size
and appearance for better readability. This chapter covers the various reading support
features available on iOS, including Speak Screen, Speak Selection, and VoiceOver
reading. We’ll also provide practical examples and code samples for SwiftUI to illustrate
how these features can be implemented and customized.

Speak Screen and Speak Selection

Speak Screen and Speak Selection are features that allow iOS to read text aloud. These
features are particularly useful for users with visual impairments or dyslexia, helping
them to access written content more easily.

Enabling Speak Screen and Speak Selection

1. Open Settings: Tap on the Settings app on your iOS device.


2. Select Accessibility: Scroll down and tap on Accessibility.
3. Choose Spoken Content: Tap on Spoken Content under the Vision category.
4. Toggle Speak Screen On: Turn on the Speak Screen switch.
5. Toggle Speak Selection On: Turn on the Speak Selection switch.

Using Speak Screen

Once enabled, Speak Screen can be activated by swiping down with two ngers from
the top of the screen. This will read aloud all the content on the screen.

1. Activate Speak Screen: Swipe down with two ngers from the top of the
screen.
2. Control Playback: Use the on-screen controls to pause, play, and adjust the
speaking rate.
fi
fi
fi
Using Speak Selection

Speak Selection allows you to select speci c text to be read aloud.

1. Select Text: Highlight the text you want to be read aloud.


2. Tap Speak: Tap the Speak button that appears in the context menu.

Customizing Speak Screen and Speak Selection

You can customize the voice, speaking rate, and feedback for Speak Screen and Speak
Selection.

1. Open Spoken Content Settings: Go to Settings > Accessibility > Spoken


Content.
2. Voices: Tap on Voices to choose the preferred voice.
3. Speaking Rate: Adjust the slider to change the speaking rate.
4. Highlight Content: Toggle Highlight Content to on to have text highlighted as it
is read aloud.

These customizations can make Speak Screen and Speak Selection more effective and
tailored to individual needs.

VoiceOver Reading

VoiceOver, iOS’s built-in screen reader, provides comprehensive reading support by


reading aloud everything on the screen, including text, buttons, and other UI elements.

Enabling VoiceOver

1. Open Settings: Tap on the Settings app on your iOS device.


2. Select Accessibility: Scroll down and tap on Accessibility.
3. Choose VoiceOver: Tap on VoiceOver under the Vision category.
4. Toggle VoiceOver On: Turn on the VoiceOver switch.

Using VoiceOver for Reading

VoiceOver provides various gestures for reading content:

1. Read from Top: Swipe down with two ngers to read from the top of the screen.
2. Read All: Swipe down with two ngers again to read all content on the screen.
3. Pause/Resume Reading: Tap with two ngers to pause or resume reading.
fi
fi
fi
fi
Customizing VoiceOver Reading

You can customize VoiceOver to enhance the reading experience:

1. Open VoiceOver Settings: Go to Settings > Accessibility > VoiceOver.


2. Voice: Choose your preferred voice under Speech.
3. Verbosity: Adjust the verbosity settings to control how much detail VoiceOver
provides.
4. Rotor: Customize the rotor to include reading-speci c options, such as lines,
words, and characters.

These settings can help users optimize VoiceOver for reading, making it more useful and
accessible.

Practical Examples: Implementing Reading Support

Example 1: Using Speak Screen

In SwiftUI, you can enable Speak Screen and ensure your content is accessible by
providing meaningful text labels and hints.

import SwiftUI

struct ContentView: View {


var body: some View {
Text("This is a sample text for Speak Screen.")
.padding()
.accessibility(label: Text("Sample Text"))
}
}

Example 2: Implementing VoiceOver Reading

No special code is required here, you can simply ensure that all interactive elements
have appropriate accessibility labels and hints.

import SwiftUI

struct ContentView: View {


var body: some View {
Button(action: {
print("Button tapped")
}) {
Text("Tap me")
.padding()
}
.accessibility(label: Text("Tap button"))
fi
.accessibility(hint: Text("Taps the button"))
}
}

Practical Tips for Reading Support

1. Experiment with Settings: Spend time experimenting with different settings to


nd the combination that works best for you. Adjusting the voice, speaking rate,
and content highlighting can make a signi cant difference.
2. Use Personalization: Customize the voices and other settings to suit your
preferences and needs.
3. Combine Features: Use reading support features in conjunction with other
accessibility features, such as VoiceOver and Display & Text Size settings, for a
more comprehensive experience.
4. Stay Updated: Keep your device updated to bene t from the latest accessibility
improvements and features. Apple continuously enhances reading support
features with each iOS update.

Summary

Reading support on iOS provides essential tools for users with visual impairments or
reading dif culties, allowing them to access written content more easily. By leveraging
features like Speak Screen, Speak Selection, and VoiceOver reading, users can
customize their reading experience to better suit their needs.

In this chapter, we’ve covered how to enable and customize reading support features,
provided practical examples of using them, and offered tips for making the most of these
tools. Understanding and utilizing reading support can greatly enhance the accessibility
of iOS devices, ensuring that everyone can enjoy the bene ts of technology.
fi
fi
fi
fi
fi
21.
TESTING READING SUPPORT
Content dedicated to QA testers on how to test the basic VoiceOver features.

Preparing for Testing Reading Support

1. Review Reading Support Features: Understand how each reading support


feature should function.
2. Set Up Testing Environment: Ensure your iOS device is con gured correctly
for testing reading support.
3. Create Detailed Test Plans: Outline scenarios for testing Speak Screen, Speak
Selection, and VoiceOver reading.

Testing Speak Screen and Speak Selection

1. Activation and Use: Verify that Speak Screen and Speak Selection can be
activated and used as expected.
2. Content Readout: Ensure that text is read out correctly and clearly.
3. Customization Options: Check that users can customize voice and speaking
rate settings.

Testing VoiceOver Reading

1. Navigation and Interaction: Verify that VoiceOver reads out content correctly
and allows for navigation.
2. Labels and Hints: Ensure all interactive elements have appropriate labels and
hints.
3. Dynamic Content: Check that VoiceOver updates correctly when dynamic
content changes.
fi
Practical Tips for Testing Reading Support

1. Test in Various Environments: Use the features in different reading conditions


and environments.
2. Collect User Feedback: Work with users who bene t from these features to
gather feedback.
3. Use Real-World Scenarios: Test features in scenarios that mimic real-world use
cases.

Common Issues and Solutions

1. Readout Issues: Ensure all text is read out correctly and clearly.
2. Navigation Limitations: Verify that users can easily navigate and use reading
support features.
3. Customization Issues: Address any issues with customizing reading support
settings.

Summary

Testing reading support ensures that users with visual impairments or reading dif culties
can effectively use your app. By following best practices and thoroughly testing each
feature, you can provide a better user experience for all users.
fi
fi
22.
INTERACTION AND HAPTICS
Interaction and haptic feedback play a vital role in making iOS devices more accessible
and user-friendly for individuals with various impairments. This chapter explores the
various touch accommodations and haptic feedback options available on iOS, providing
practical examples and code samples for SwiftUI to illustrate how these features can be
implemented and customized.

Touch Accommodations

Touch accommodations are designed to help users with motor impairments by


modifying how touch inputs are recognized. These features include options to adjust the
response time for touch inputs and ignore repeated touches.

Enabling Touch Accommodations

1. Open Settings: Tap on the Settings app on your iOS device.


2. Select Accessibility: Scroll down and tap on Accessibility.
3. Choose Touch: Tap on Touch under the Physical and Motor category.
4. Tap on Touch Accommodations: Toggle the Touch Accommodations switch to
on.

Customizing Touch Accommodations

Touch accommodations can be customized to suit individual needs, including adjusting


hold duration, ignore repeat, and tap assistance.

1. Open Touch Accommodations Settings: Go to Settings > Accessibility > Touch


> Touch Accommodations.
2. Hold Duration: Adjust the slider to set the duration a user must hold before a
touch is recognized.
3. Ignore Repeat: Toggle Ignore Repeat to on and adjust the slider to set the time
interval during which repeated touches are ignored.
4. Tap Assistance: Choose between Use Initial Touch Location and Use Final
Touch Location to determine how taps are recognized.
These customizations can make touch interactions more accessible and user-friendly for
individuals with motor impairments.

Practical Example: Using Touch Accommodations

Touch accommodations can be particularly useful for users with tremors or dif culty
making precise touch inputs.

1. Enable Touch Accommodations: Follow the steps outlined above.


2. Customize Settings: Adjust hold duration and ignore repeat settings to suit your
needs.
3. Test Interaction: Interact with your device to ensure the settings provide the
desired support.

Haptic Feedback

Haptic feedback uses vibrations to provide tactile feedback to users, enhancing the
overall interaction experience. This can be particularly bene cial for users with visual
impairments or those who rely on tactile cues.

Enabling System Haptics

1. Open Settings: Tap on the Settings app on your iOS device.


2. Select Sounds & Haptics: Scroll down and tap on Sounds & Haptics.
3. Toggle System Haptics: Turn on the System Haptics switch.

Customizing Haptic Feedback

Haptic feedback can be customized within apps to provide additional feedback for
various interactions.

You can use the UIImpactFeedbackGenerator within a button action to


provide haptic feedback.

import SwiftUI

struct ContentView: View {


var body: some View {
Button(action: {
let generator = UIImpactFeedbackGenerator(style: .medium)
generator.impactOccurred()
}) {
Text("Tap me")
.padding()
}
fi
fi
}
}

Practical Tips for Using Haptic Feedback

1. Provide Feedback for Important Actions: Use haptic feedback to signal


important actions or changes in state, such as button taps or successful form
submissions.
2. Adjust Intensity: Use different styles of haptic feedback (light, medium, heavy)
to convey varying levels of importance.
3. Combine with Other Feedback: Combine haptic feedback with visual and
auditory feedback to create a multi-sensory experience.

Interaction Enhancements

In addition to touch accommodations and haptic feedback, iOS provides several other
interaction enhancements to improve accessibility.

AssistiveTouch

AssistiveTouch provides an on-screen menu that lets users perform various actions
without using physical buttons.

1. Enable AssistiveTouch: Go to Settings > Accessibility > Touch >


AssistiveTouch and toggle it on.
2. Customize Menu: Tap on Customize Top Level Menu to add, remove, or
rearrange menu items.
3. Create Gestures: Tap on Create New Gesture to create custom touch gestures.

Back Tap

Back Tap allows users to perform actions by tapping the back of their device.

1. Enable Back Tap: Go to Settings > Accessibility > Touch > Back Tap.
2. Choose Actions: Select Double Tap or Triple Tap and assign actions to them.
Practical Examples: Implementing Interaction Enhancements

Example 1: Customizing AssistiveTouch

No special code is required here, you can simply provide information about using
AssistiveTouch within your app.

import SwiftUI

struct ContentView: View {


var body: some View {
VStack {
Text("To enable AssistiveTouch, go to Settings >
Accessibility > Touch > AssistiveTouch.")
.padding()
.multilineTextAlignment(.center)
}
.padding()
}
}

Example 2: Implementing Back Tap

No special code is required here, you can simply provide information about using Back
Tap within your app.

import SwiftUI

struct ContentView: View {


var body: some View {
VStack {
Text("To enable Back Tap, go to Settings > Accessibility >
Touch > Back Tap.")
.padding()
.multilineTextAlignment(.center)
}
.padding()
}
}

Practical Tips for Interaction and Haptics

1. Experiment with Settings: Spend time experimenting with different settings to


nd the combination that works best for you. Adjusting touch accommodations
and haptic feedback intensity can make a signi cant difference.
2. Use Personalization: Customize interaction enhancements, such as
AssistiveTouch and Back Tap, to suit your preferences and needs.
fi
fi
3. Combine Features: Use interaction and haptic feedback features in conjunction
with other accessibility features, such as Voice Control and Display & Text Size
settings, for a more comprehensive experience.
4. Stay Updated: Keep your device updated to bene t from the latest accessibility
improvements and features. Apple continuously enhances interaction and haptic
feedback features with each iOS update.

Summary

Interaction and haptic feedback on iOS provide essential tools for users with motor
impairments, enhancing the overall user experience by making touch interactions more
accessible and providing tactile feedback. By leveraging features like touch
accommodations, haptic feedback, AssistiveTouch, and Back Tap, users can customize
their interaction experience to better suit their needs.

In this chapter, we’ve covered how to enable and customize interaction and haptic
feedback features, provided practical examples of using them, and offered tips for
making the most of these tools. Understanding and utilizing interaction and haptic
feedback can greatly enhance the accessibility of iOS devices, ensuring that everyone
can enjoy the bene ts of technology.
fi
fi
23.
TESTING INTERACTION AND HAPTICS
Content dedicated to QA testers on how to test the basic VoiceOver features.

Preparing for Testing Interaction and Haptics

1. Review Interaction and Haptic Features: Understand how each feature should
function.
2. Set Up Testing Environment: Ensure your iOS device is con gured correctly
for testing interaction and haptic feedback.
3. Create Detailed Test Plans: Outline scenarios for testing touch accommodations
and haptic feedback.

Testing Touch Accommodations

1. Activation and Use: Verify that touch accommodations can be activated and
used as expected.
2. Customization Options: Ensure users can customize touch settings, such as
hold duration and ignore repeat.
3. User Feedback: Check that touch accommodations improve usability for users
with motor impairments.

Testing Haptic Feedback

1. Feedback Consistency: Verify that haptic feedback is consistent and clear for all
interactions.
2. Customization Options: Ensure users can customize haptic feedback settings.
3. Performance Impact: Check that haptic feedback does not negatively impact
app performance.
fi
Practical Tips for Testing Interaction and Haptics

1. Test in Various Environments: Use the features in different physical


environments.
2. Collect User Feedback: Work with users who bene t from these features to
gather feedback.
3. Use Real-World Scenarios: Test features in scenarios that mimic real-world use
cases.

Common Issues and Solutions

1. Feedback Issues: Ensure haptic feedback is clear and consistent.


2. Customization Limitations: Address any issues with customizing interaction
and haptic feedback settings.
3. Performance Impact: Verify that haptic feedback does not negatively impact
app performance.

Summary

Testing interaction and haptic feedback ensures that users with motor impairments can
effectively use your app. By following best practices and thoroughly testing each
feature, you can provide a better user experience for all users.
fi

You might also like