Chapters

Hide chapters

Android Accessibility by Tutorials

First Edition - Early Access 1 · Android 11 · Kotlin 1.4 · AS 4.1

Before You Begin

Section 0: 3 chapters
Show chapters Hide chapters

Section I: Android Accessibility by Tutorials

Section 1: 13 chapters
Show chapters Hide chapters

1. Why Accessibility
Written by Victoria Gonda

Thank you! By picking up this book, you’re proving that you care about an important topic: accessibility, which is often shortened to a11y. Whether you’re looking to deepen your existing accessibility knowledge, or are beginning your learning journey, this book will support your goals.

In this first chapter, you’ll discover why accessibility matters, and it answers the question: Why should I care about accessibility? Once you reach the end of this chapter, you’ll have a number of answers to that question, and you’ll be able to have effective conversations with your peers about why developers should prioritize accessibility in their designs.

Caring about accessibility

Imagine: You’re stuck at home and need something to eat. You can’t leave because you broke your hand, your car is in the shop, and you have a sweet, new puppy that will destroy your everything if you turn your back for too long.

And now you’re hungry. You’ve got an insatiable craving for a burrito, and you decide to try a burrito-ordering app a friend recommended. As your hunger grows, so does your frustration, because you can’t place an order because your broken hand is making it difficult to use your phone. Additionally, you don’t know which buttons do what.

Something is missing from the form, but the app doesn’t say what. You desperately need some guacamole on this burrito, and you can see the “add guacamole” option but can’t select it.

How would you feel? A little hangry? Is it your right to order that burrito? What’s your perception of this food delivery app?

Keep those thoughts in mind as you keep reading.

An accessible app means that most people can use it without help from another person, regardless of ability or situation. When there’s a mismatch between the app and the users’ abilities, an app is considered inaccessible.

Inaccessible apps put barriers between a user and the task they are trying to do.

You can see ways physical objects are accessible, be it ramps in front of buildings or braille on the elevator buttons. But what does accessible mean for digital objects, specifically, your apps? And why should you care?

This chapter focuses on that second question, and the rest of the book is dedicated to the first.

There are many reasons to care, including those below—in no particular order. By developing an accessible app you:

  • Open your app to a wider audience.
  • Minimize risk of legal battles.
  • Make a better product.
  • Drive innovation.
  • Increase developer productivity.
  • Recognize revenue potential.
  • Treat others with care.

Widening your audience

According to the Centers for Disease Control and Prevention (CDC), “1 in 4 of adults in the United States have a disability”.

1 in 4 of adults in the United States have some type of disability.
1 in 4 of adults in the United States have some type of disability.

When you scale that number to the entire world, that’s a huge potential audience to whom you can open your app simply by making it accessible. Conversely, if your competition’s app is accessible but yours is not, you’re essentially capitulating market share.

Note: Does that number surprise you? Keep in mind two points, the first being the most important:

1. Many people have invisible disabilities. You could know someone your whole life and never know they have dyslexia and struggle to read. The young mom you walk past in the grocery store may have a perfect, happy-go-lucky face but you don’t know that she’s in chronic pain from a disease that destroys her ligaments and muscles.

2. Different communities have different concentrations of people with disabilities. For example, “2 in 5 adults age 65 years and older have a disability” according to the CDC.

Learn more about disabilities among different groups at https://www.cdc.gov/ncbddd/disabilityandhealth/infographic-disability-impacts-all.html.

Don’t make assumptions

As a developer, it’s a force of habit to assume what people will and won’t do with your app. Maybe you think: “I’m building a fitness app. People with motor disabilities aren’t using my app” or “I have a parking app. Why would anybody with vision impairment think to use it?”

You should not make assumptions about what people can do or the value they get from your app. Every single person has their own story and way of interacting with the world.

Maybe that user with vision impairments books parking spaces for a friend, who’s coming to visit soon. Or that user with motor impairments is helping their cousin train for a triathlon with your fitness app.

There are a million possibilities. You can’t assume you know them all. In addition, you can’t assume that everyone who has a disability with the same name has the same abilities. Disabilities manifest themselves in diverse ways with different people.

If you think that two people with hearing disabilities will experience your app the same way, you’ll be wrong.

Avoiding legal battles

Did the words “legal battles” get your attention? That’s right, it’s the law that your app be accessible. It’s a civil right. People with disabilities must have access to public accommodations and commercial facilities.

Because of laws such as the Americans with Disabilities Act (or ADA) in the United States and the Web Accessibility Directive (or WAD) in the European Union, it’s prohibited to discriminate based on the basis of disabilities.

Here’s a powerful example of why you should care about accessibility: Guillermo Robles wanted to order from Domino’s. More than once, Robles used the Domino’s Pizza app to place an order only to discover he could not.

See, Robles is blind and uses assistive technologies, but the app did not support the correct technologies. He brought his concerns to court and won in the case Robles v. Domino’s Pizza.

Back to your app: Someone can sue you for creating an inaccessible app if you market your app in any country that has these protections, if you don’t follow accessibility guidelines. That sounds scary—and expensive!

It’s a good thing that you’ll learn about those guidelines in this book so you can avoid that. Surely, Domino’s wishes it had your foresight.

Making a better product

Have you ever used voice control to perform a task on your phone while you were responsibly driving with both hands on the wheel? Is your phone on vibrate so you can feel when you get a message rather than hear it? Perhaps you use captions when watching a video in a noisy location.

Have these functions caused you to enjoy the apps on your device more than you might have otherwise? All these actions are supported by accessibility features.

Stop and think: What everyday features do you use, either in the physical or digital world, that could be an accessibility feature? Hint: Most things have multiple ways to consume information or perform a task, which improves its accessibility.

Supporting accessible features makes for a more enjoyable experience to all of your users. Not only does it manifest itself in the ways described above, but it also makes your app more consistent and easier to use, which increases users’ happiness and engagement.

Accessibility can be the difference between a one- and five-star review.

One-star play store review next to a five-star review.
One-star play store review next to a five-star review.

Supporting accessibility also benefits you, the developer, by opening up opportunities for your app.

For example, when you integrate with the device system in a way that makes your app accessible, it means that if you port your app to a TV platform, you’ll be able to navigate it with a remote. When users attach a keyboard to their tablet, they’ll be able to navigate that form you have in your app using the keyboard. Who really wants to move the mouse or tap the screen to move to the next field when you can press tab?

Driving innovation

Designing with accessibility in mind encourages you to make a better product and can drive innovation. Scholars have studied and discovered that by placing limits on a project, you foster greater creativity. After all, an app that does EVERYTHING is a poorly designed product.

So, maybe you can’t fit everything you want onto a certain screen because the view needs to be large enough to interact with and consume. This means you need to get creative and really think about what content you need where.

You get to come up with fresh new ways to communicate to your users what you mean, and you are required to think hard about how to make your app simple and easy to use.

These constraints may feel like a burdensome creative writing assignment, but the limitations will improve your creative processes when you design apps!

Stop and think: Pick a screen in one of your favorite apps. Now pick a constraint and think about how you might change the screen. Maybe the constraint is that you can only have half the content on the screen, or that everything needs to be 2x bigger. Some other options might be you can only use black and white, or there are no images allowed.

How would you redesign the screen to meet these requirements?

See how constraints can spark your creativity?

Increasing developer productivity

Surprised? How can something that will require a lot of your time actually increase your productivity?

Simple: Building an accessible app encourages the use of reusable components and a design system. Because you’re doing the same thing multiple places in the app, you, as the “lazy developer” will find a way to do it once and abstract it away. And surely, your designers will welcome an established design system.

This is great news for you too! You’ll have plug-and-play components that allow you to build new features at lightning speed. The gains you would have made by ignoring accessibility may help you in the short term, but supporting accessibility will help you in the long term.

While maintaining an accessible app, you’ll also find that it encourages and supports conducting UI tests in your app. Espresso tests on Android even hook into accessibility services! You’ll learn more soon how UI tests support your quest for a more accessible app.

One of the biggest themes you’ll learn in this book, on top of how to make your Android app accessible, is how designing with accessibility in mind can improve your product and engineering practices, justifying your upfront investment.

Recognizing revenue potential

Neglecting accessibility in your apps could mean that you lose revenue.

Right here, right now is your chance to change your thinking from “We don’t have the resources to think about accessibility” to “We don’t have the resources to NOT think about accessibility.”

There were hints that neglecting accessibility can cause you to lose money above. For example, by supporting accessibility in your apps, you’re minimizing the risk of incurring legal fees and liability due to non-compliance.

How else might accessibility affect your profitability?

You’ve already read that having an accessible app makes for a better product. Following the guidelines makes it possible for people with disabilities to use your app and enables more users to have better experiences with your app. When your app delights people, they’re more likely to rate it highly and tell their friends about it.

If your app is inaccessible, you won’t experience these benefits.

Imagine a person named Tyler downloads the trial version then discovers he can’t use your app. That’s one less paying customer.

But wait — it’s not only him. You’re also losing every single referral he would have given if he had a better experience. You lose the people who see his one-star review and decide not to download your app.

Then, those people who decided not to use your app, never get to refer their friends to it. This branching can grow exponentially.

What about the people who can use your app? Imagine someone named Laura, for example, who isn’t disabled but struggles to remember how to use apps. She uses your app but feels discontent with it.

She might continue to use it but will not recommend it to others. She is already trying out competitor’s apps to find one that gives her a better experience and has complained about your app to her friends.

By leaving someone out, you also lose their potential advocacy.
By leaving someone out, you also lose their potential advocacy.

You want your app to be a success. You can’t afford to let your users down with inaccessible design.

Treating others with care

Even if all that wasn’t enough reason to care, there’s one more: People with disabilities deserve to have access to the same services everyone does. This includes your app. Plainly said: Supporting an accessible app is the right thing to do.

Society has normalized accessibility in the physical world with affordances like dedicated parking spaces and wheelchair accessible layouts in the grocery stores. Now that so many companies exist online, the tech sector needs to consider accessible user experiences as a key requirement for all user experiences.

When you market an inaccessible app, you send the message to some people that “We don’t want you here”. You may not realize you’re acting in a hurtful way, but that doesn’t mean that your insensitivity doesn’t hurt.

Let’s change the narrative “Heroic disabled person overcomes obstacles” to “Society is inclusive, all can succeed.”

-Haben Girma

In the end, you should build quality apps because you care about having a quality app that can reach the biggest audience possible. And build accessible apps that demonstrate the care that you want to see in the world.

You now understand why you should care about making your app accessible to everyone, regardless of how they perceive or operate it. To help you wrap your head around what that might look like, you need to know about the different situations that cause people to experience your app differently.

Experiencing your app

The first thing you need to recognize is that temporary, partial and permanent disabilities all change the way people experience your app.

Someone might have a hard time seeing what’s on-screen because they have color-blindness or because it’s bright outside. They might have a hard time performing a gesture because they have tremors or because they broke their hand. They might not hear the content of your video due to hearing loss or because they are in a noisy place.

These people often use assistive technologies to allow them to consume your app in a way that makes sense for them.

Accessible design improves your app for so many people in all kinds of situations.

There are four different categories where the user’s ability can change the way they experience your app:

  1. Visual.
  2. Motor.
  3. Auditory.
  4. Cognitive and mental health.

Visual impairments

There is a wide range in the ways people might experience visual limitations, from being near-sighted or having color blindness, to being legally blind. Other visual impairments include:

  • Tunnel vision.
  • Wooly or cottony opacity in the central vision but not necessarily the peripheral vision.
  • Cloudy vision.
  • Light sensitivity.
  • Double vision.
  • Black spots or floating shapes.
  • Loss of peripheral vision.

This grid shows a simulation of different vision impairments. These were generated using the NoCoffee Chrome plugin that you can try yourself.
This grid shows a simulation of different vision impairments. These were generated using the NoCoffee Chrome plugin that you can try yourself.

Many of these have ranges in themselves, for example, low vision loss to complete vision loss. Vision loss could be in one or both eyes. It could be temporary, such as after an injury or after the eye doctor dilates your eyes.

When building apps, you should not make assumptions about what users can and cannot see, as each user’s visual experience will be unique. You should also keep in mind that people might be using assistive technologies such as magnification or screen readers.

Motor impairments

Motor impairments affect the way people move. Some of the types of motor disabilities that impact the way someone uses an app include:

  • Paralysis in some or all limbs.
  • Loss or damage of one or more limbs.
  • Low dexterity or poor fine motor skills.
  • Pain while moving.
  • Slowness.
  • Weakness.
  • Stiffness.
  • Loss of muscle control, which can result in muscle tightness and unpredictable movements.
  • Tremors.

Also consider temporary impairments, such as having a splint on your finger or restrictions because you’re carrying something heavy.

As you can see, there are many different interactions to consider here when making your app accessible. In Chapter 3, “Testing and Tools”, you’ll learn about some of the tools people use to interact with their devices.

Try: Clasp your hands behind your back or sit on your hands. Think about what ways you might use your phone without the use of your hands. Think about how you might use your phone if you were always wearing mittens. What about if you had finger splints on all your fingers?

This might be frustrating for you at first. However, you can imagine how living with an impairment every day would allow you to learn to excel at using accessibility tools to perform tasks without the dexterity you previously had.

Auditory impairments

While there are multiple classifications of hearing loss, the most important thing for you to consider is that some people won’t be able to hear your app. This could be due to damage to the parts of the ear, nerve damage, a total loss of hearing, loss of hearing of high or low tones or a loss of hearing in one ear.

Either way, you’ll learn techniques for building apps for users with auditory impairments.

Try: Spend a whole day, or even a whole week, with all the sound turned off on your phone. This means no ringer, no alarm, no podcasts and no audio on videos. In what places might you need to find alternative ways to use your phone, and what might those alternatives be?

When your apps support the option to consume them in this way, using your phone without audio can feel natural.

Cognitive impairments and mental health

This is perhaps the broadest category. While you’re reading these, keep in mind that there are many ways to experience every one of these.

Memory

Some people may have trouble remembering a piece of information from one task to the next. They could forget an instruction or what an unlabeled icon does. They might forget how they reached a specific screen in your app, or forget what to do once there.

Problem-solving

It’s extremely frustrating to experience a problem and not know how to solve it. When designing for accessibility, you need to be clear about why a problem occurs and what the user can do to solve it.

Attention

Keep in mind that distractions may pull users away from your content. You can help with this by reducing the distractions you provide. Distractions can be as simple as asking the user to confirm actions repeatedly, not showing a loading bar, or sending the user to another website for some information.

Reading and language

The text you use in your app is important to the way it’s understood. With that, you need to know that some people have difficulty reading or comprehending, so try to reduce complexity. It can also confuse when you use sarcasm and idioms.

Math

Similar to language, some people struggle to understand numbers and math equations. Be careful how you use them.

Visual comprehension

Of the people who can see images and icons, some will not comprehend what is in the image or what the icon represents. You can’t assume that all users understand what a hamburger menu does. It’s helpful to include text, along with the icon or image, to clarify what the element does.

Anxiety

When you introduce uncertainty, it can trigger anxiety in some users. It helps to be clear about what will happen when the user performs a given action and not rush them into performing a task.

By keeping these things in mind, you can make your app much easier and enjoyable to use by many people.

Key points

  • To create an accessible app, you must design it so that most people can use it without assistance.
  • Accessible apps widen your audience to the 1 in 4 adults who have some type of disability.
  • You can face legal battles if your app is inaccessible.
  • Developing an accessible app makes your product better and increases developer productivity.
  • The constraints of accessibility guidelines will drive innovation.
  • You can lose potential revenue if you neglect accessible design.
  • Having access to apps is a civil right, and caring about accessibility is the right thing to do.
  • Visual, motor, auditory and cognitive impairments change the way people experience your app.

Where to go from here?

You now know why you should care about accessibility and understand the different impairments that impact the way someone may use your app. And now that you know, you’re prepared to start learning the skills and applying this knowledge!

You won’t render your users burrito-less, anxious or feeling discontent with your app.

In the next chapter, you’ll get started on fixing up a taco recipe app to make it more accessible. Because who doesn’t love accessible tacos?

Have a technical question? Want to report a bug? You can ask questions and report bugs to the book authors in our official book forum here.
© 2024 Kodeco Inc.