• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1page.title=Accessibility
2page.tags="accessibility","navigation","input"
3page.metaDescription=Design an app that's universally accessible to people with visual impairment, color deficiency, hearing loss, and limited dexterity.
4@jd:body
5
6<a class="notice-developers" href="{@docRoot}training/accessibility/index.html">
7  <div>
8    <h3>Developer Docs</h3>
9    <p>Implementing Accessibility</p>
10  </div>
11</a>
12
13<p>One of Android's missions is to organize the world's information and make it universally accessible and useful. Accessibility is the measure of how successfully a product can be used by people with varying abilities. Our mission applies to all users-including people with disabilities such as visual impairment, color deficiency, hearing loss, and limited dexterity.</p>
14<p><a href="https://www.google.com/#hl=en&q=universal+design&fp=1">Universal design</a> is the practice of making products that are inherently accessible to all users, regardless of ability. The Android design patterns were created in accordance with universal design principles, and following them will help your app meet basic usability standards. Adhering to universal design and enabling Android's accessibility tools will make your app as accessible as possible.</p>
15<p>Robust support for accessibility will increase your app's user base. It may also be required for adoption by some organizations.</p>
16<p><a href="http://www.google.com/accessibility/">Learn more about Google and accessibility.</a></p>
17
18<h2 id="tools">Android's Accessibility Tools</h2>
19<p>Android includes several features that support access for users with visual impairments; they don't require drastic visual changes to your app.</p>
20
21<ul>
22  <li><strong><a href="https://play.google.com/store/apps/details?id=com.google.android.marvin.talkback">TalkBack</a></strong> is a pre-installed screen reader service provided by Google. It uses spoken feedback to describe the results of actions such as launching an app, and events such as notifications.</li>
23  <li><strong>Explore by Touch</strong> is a system feature that works with TalkBack, allowing you to touch your device's screen and hear what's under your finger via spoken feedback. This feature is helpful to users with low vision.</li>
24  <li><strong>Accessibility settings</strong> let you modify your device's display and sound options, such as increasing the text size, changing the speed at which text is spoken, and more.</li>
25</ul>
26
27<p>Some users use hardware or software directional controllers (such as a D-pad, trackball, keyboard) to jump from selection to selection on a screen. They interact with the structure of your app in a linear fashion, similar to 4-way remote control navigation on a television.</p>
28
29<h2 id="tools">Guidelines</h2>
30<p>The Android design principle "I should always know where I am" is key for accessibility concerns. As a user navigates through an application, they need feedback and a mental model of where they are. All users benefit from a strong sense of information hierarchy and an architecture that makes sense. Most users benefit from visual and haptic feedback during their navigation (such as labels, colors, icons, touch feedback) Low vision users benefit from explicit verbal descriptions and large visuals with high contrast.</p>
31<p>As you design your app, think about the labels and notations needed to navigate your app by sound. When using Explore by Touch, the user enables an invisible but audible layer of structure in your application. Like any other aspect of app design, this structure can be simple, elegant, and robust. The following are Android's recommended guidelines to enable effective navigation for all users.</p>
32
33<h4>Make navigation intuitive</h4>
34<p>Design well-defined, clear task flows with minimal navigation steps, especially for major user tasks. Make sure those tasks are navigable via focus controls. </p>
35
36<h4>Use recommended touch target sizes</h4>
37<p>48 dp is the recommended touch target size for on screen elements. Read about <a href="{@docRoot}design/style/metrics-grids.html">Android Metrics and Grids</a> to learn about implementation strategies to help most of your users. For certain users, it may be appropriate to use larger touch targets. An example of this is educational apps, where buttons larger than the minimum recommendations are appropriate for children with developing motor skills and people with manual dexterity challenges.</p>
38
39
40<h4>Label visual UI elements meaningfully</h4>
41<p>In your wireframes, <a href="{@docRoot}guide/topics/ui/accessibility/apps.html#label-ui">label functional UI components</a> that have no visible text. Those components might be buttons, icons, tabs with icons, and icons with state (like stars). Developers can use the <code><a href="{@docRoot}guide/topics/ui/accessibility/apps.html#label-ui">contentDescription</a></code> attribute to set the label.</p>
42
43<div class ="layout-content-row">
44    <div class="layout-content-col span-8">
45      <img src="{@docRoot}design/media/accessibility_contentdesc.png">
46    </div>
47    <div class="layout-content-col span-5 with-callouts">
48      <ol>
49        <li class="value-1">group</li>
50        <li class="value-2">all contacts</li>
51        <li class="value-3">favorites</li>
52        <li class="value-4">search</li>
53        <li class="value-5">action overflow button</li>
54        <li class="value-6">
55          <em>when starred:</em> remove from favorites </br>
56          <em>when not starred:</em> add to favorties</li>
57        <li class="value-7">action overflow button</li>
58        <li class="value-8">text message</li>
59      </ol>
60  </div>
61</div>
62
63<h4>Provide alternatives to affordances that time out</h4>
64<p>Your app may have icons or controls that disappear after a certain amount of time. For example, five seconds after starting a video, playback controls may fade from the screen.</p>
65
66<p>Due to the way that TalkBack works, those controls are not read out loud unless they are focused on. If they fade out from the screen quickly, your user may not even be aware that they are available. Therefore, make sure that you are not relying on timed out controls for high priority task flows. (This is a good universal design guideline too.) If the controls enable an important function, make sure that the user can turn on the controls again and/or their function is duplicated elsewhere. You can also change the behavior of your app when accessibility services are turned on. Your developer may be able to make sure that timed-out controls won't disappear.</p>
67
68<h4>Use standard framework controls or enable TalkBack for custom controls</h4>
69<p>Standard Android framework controls work automatically with accessibility services and have ContentDescriptions built in by default.</p>
70
71<p>An oft-overlooked system control is font size. Users can turn on a system-wide large font size in Settings; using the default system font size in your application will enable the user's preferences in your app as well. To enable system font size in your app, mark text and their associated containers to be measured in <a href="{@docRoot}guide/practices/screens_support.html#screen-independence">scale pixels</a>.</p>
72
73<p>Also, keep in mind that when users have large fonts enabled or speak a different language than you, their type might be larger than the space you've allotted for it. Read <a href="{@docRoot}design/style/devices-displays.html">Devices and Displays</a> and <a href="http://developer.android.com/guide/practices/screens_support.html">Supporting Multiple Screens</a> for design strategies.</p>
74
75<p>If you use custom controls, Android has the developer tools in place to allow adherence to the above guidelines and provide meaningful descriptions about the UI. Provide adequate notation on your wireframes and direct your developer to the <a href="{@docRoot}guide/topics/ui/accessibility/apps.html#custom-views">Custom Views</a> documentation.</p>
76
77<h4>Try it out yourself</h4>
78<p>Turn on the TalkBack service in <strong>Settings > Accessibility</strong> and navigate your application using directional controls or eyes-free navigation.</p>
79
80
81
82<h2>Checklist</h2>
83<ul>
84  <li>Make navigation intuitive</li>
85  <li>Use recommended touch target sizes</li>
86  <li>Label visual UI elements meaningfully</li>
87  <li>Provide alternatives to affordances that time out</li>
88  <li>Use standard framework controls or enable TalkBack for custom controls</li>
89  <li>Try it out yourself</li>
90</ul>