Understanding accessibility
Improving your product’s accessibility can enhance the usability for all users, including those with low vision, blindness, hearing impairments, cognitive impairments, motor impairments or situational disabilities (such as a broken arm).
Principles
Help users navigate by designing clear layouts with distinct calls to action. Design your app to accommodate a variety of users. Support assistive technologies specific...
Clear
Help users navigate by designing clear layouts with distinct calls to action.
Robust
Design your app to accommodate a variety of users.
Specific
Support assistive technologies specific to your platform, just as you support the input methods of touch, keyboard, and mouse.
Mobile guidance
This section primarily applies to mobile UI design. For more information on designing and developing more accessible products, visit the Google accessibility site.
Assistive technology
Assistive technology helps increase, maintain, or improve the functional capabilities of individuals with disabilities, through devices like screen readers, magnification tools, and hearing aids.
Screen readers
A screen reader is a program that uses a braille display or reads text aloud, such as Google’s screen reader TalkBack. Content can be labelled...
A screen reader is a program that uses a braille display or reads text aloud, such as Google’s screen reader TalkBack. Content can be labelled for those who use screen readers or experience a text-only version of your UI.
Navigation with a screen reader
Screen readers give users multiple ways to navigate a screen, including:
- Explore by touch: Touch interface screen readers allow users to run their finger over the screen to hear what is directly underneath. This provides the user a quick sense of an entire interface. Or the user can quickly move to a UI element from muscle memory. In TalkBack, this feature is called “explore by touch”. To select an item, the user double taps.
- Linear navigation: Users may also move focus by swiping backwards or forwards on screen to read pages linearly, from top to bottom. This allows users to hone in on certain elements. In TalkBack, this is called linear navigation.
Users can switch between both “explore by touch” and “linear navigation” modes.
Navigation by landmark
Some assistive technologies allow users to navigate between page landmarks, such as headings, when these landmarks use the appropriate semantic markup.
Directional controllers
Hardware or software directional controllers (such as a D-pad, trackball, or keyboard) allow users to jump from selection to selection in a linear fashion.
Hardware or software directional controllers (such as a D-pad, trackball, or keyboard) allow users to jump from selection to selection in a linear fashion.
Hierarchy
When navigation is easy, it helps users know where they are in your app and what’s important. To emphasize which information is important, it can use multiple visual and textual cues like color, shape, text, and motion.
Types of feedback
Visual feedback (such as labels, colors, and icons) and touch feedback show users what is available in the UI.
Navigation
Navigation can have clear task flows with minimal steps, with navigation controls easy to locate and clearly written. Focus control, or the ability to control keyboard and reading focus, can be implemented for frequently used tasks.
Hierarchy
Every added button, image, and line of text increases the complexity of a UI. You can simplify how your UI is understood by using: To...
Every added button, image, and line of text increases the complexity of a UI. You can simplify how your UI is understood by using:
- Clearly visible elements
- Sufficient contrast and size
- A clear hierarchy of importance
- Key information that is discernable at a glance
To suggest an item’s relative level of importance:
- Place important actions at the top or bottom of the screen (reachable with shortcuts)
- Place related items of a similar hierarchy next to each other
Do.
By placing important actions at the top of the screen, they are given more importance in the hierarchy.
Caution.
When important actions are embedded within other content, it may be unclear what the most important elements are on the page.
Focus order
Input focus that follows the order of the visual layout usually flows from the top to the bottom of the screen. It can traverse from...
Input focus that follows the order of the visual layout usually flows from the top to the bottom of the screen. It can traverse from the most important to the least important item.
To help determine your focus points and movements, consider:
- The order in which elements receive focus
- The way in which elements are grouped
- Where focus moves when the element in focus disappears
Focus points can be expressed through a combination of visual indicators and accessibility text.
The black circles indicate the order in which onscreen elements could receive focus.
Grouping
Items can be grouped under headings that communicate what the groupings are. These groups organize content spatially.
Items can be grouped under headings that communicate what the groupings are. These groups organize content spatially.
Transitions
Focus traversal between screens and tasks improves the user experience when it’s continuous. If a task is interrupted and then resumed, it can help to...
Focus traversal between screens and tasks improves the user experience when it’s continuous. If a task is interrupted and then resumed, it can help to focus on the element that was previously focused.
Color and contrast
Color and contrast can be used to help users see and interpret your app’s content, interact with the right elements, and understand actions.
More accessible color
Material Design’s Color Tool can help you choose colors with sufficient contrast between elements Related Link arrow_downward Color can help communicate mood, tone, and critical...
Color can help communicate mood, tone, and critical information. Primary, secondary, and accent colors can be selected to support usability. Sufficient color contrast between elements can help users with low vision see and use your app.
Contrast ratios
Contrast ratios represent how different a color is from another color, commonly written as 1:1 or 21:1. The higher the difference between the two numbers...
Contrast ratios represent how different a color is from another color, commonly written as 1:1 or 21:1. The higher the difference between the two numbers in the ratio, the greater the difference in relative luminance between the colors. The contrast ratio between a color and its background ranges from 1-21 based on its luminance (the intensity of light emitted) according to the World Wide Web Consortium (W3C).
The W3C recommends the following contrast ratios for body text and image text:
- Small text should have a contrast ratio of at least 4.5:1 against its background.
- Large text (at 14 pt bold/18 pt regular and up) should have a contrast ratio of at least 3:1 against its background.
Do.
These lines of text follow the color contrast ratio recommendations and are legible against their background colors.
Don’t.
These lines of text don’t meet the color contrast ratio recommendations and are difficult to read against their background colors.
Icons or other critical elements should also consider using the above recommended contrast ratios.
Do.
These icons follow the color contrast ratio recommendations and are legible against their backgrounds.
Don’t.
These icons don’t follow the color contrast ratio recommendations and are difficult to discern against their backgrounds.
Logos and decorative elements
Decorative elements (such as logos or illustrations) don’t need to meet contrast ratios, but if they important functionality it helps to make them distinguishable.
Decorative elements (such as logos or illustrations) don’t need to meet contrast ratios, but if they important functionality it helps to make them distinguishable.
Do.
Decorative logos that are distinguishable don’t have to meet contrast ratios.
Don’t.
Don’t distort your logo to meet contrast ratios.
Other visual cues
For users who are colorblind, or cannot see differences in color, other design elements can help express the same amount of information. Because colorblindness takes...
For users who are colorblind, or cannot see differences in color, other design elements can help express the same amount of information.
Because colorblindness takes different forms (including red-green, blue-yellow, and monochromatic), multiple visual cues help communicate important states. Elements such as strokes, indicators, patterns, texture, or text can describe actions and content.
Do.
The text field error state is communicated through multiple cues: title color, text field stroke, and an error message below the field.
Don’t.
The text field error state is only communicated with a colored stroke, which could be missed such as by a user who cannot perceive color.
Layout and typography
Material Design’s touch target guidelines can help users who aren’t able to see the screen, or who have difficulty with small touch targets, to tap elements in your app.
Touch and pointer targets
Touch targets are the parts of the screen that respond to user input. They extend beyond the visual bounds of an element. For example, an...
Touch targets
Touch targets are the parts of the screen that respond to user input. They extend beyond the visual bounds of an element. For example, an icon may appear to be 24 x 24 dp, but the padding surrounding it comprises the full 48 x 48 dp touch target.
Touch targets should be at least 48 x 48 dp. A touch target of this size results in a physical size of about 9mm, regardless of screen size. The recommended target size for touchscreen elements is 7-10mm. It may be appropriate to use larger touch targets to accommodate a larger spectrum of users.
Pointer targets
Pointer targets are similar to touch targets, but apply to the use of motion-tracking pointer devices such as a mouse or a stylus. Pointer targets should be at least 44 x 44 dp.
Avatar: 40dp
Icon: 40dp
Touch target on both: 48dp
Touch targets
Touch target spacing
In most cases, touch targets should be separated by 8dp of space or more to ensure balanced information density and usability.
Touch target height: 48dp
Button height: 36dp
Touch targets and buttons
Layout
Flexible, responsive layouts help content scale in relation to the screen size. This helps avoid truncating content that may not display entirely on specific device...
Responsive layouts
Flexible, responsive layouts help content scale in relation to the screen size. This helps avoid truncating content that may not display entirely on specific device types or at varied resolutions.
Grouping items
Related items can be grouped in proximity to one another to improve readability.
Do.
The slider value is in close proximity with the slider control.
Don’t.
Don’t place the slider value too far away from the control. Someone using screen magnification may not be able to view both the slider and the value without panning back and forth.
Typography
To improve readability, users might increase font size. Mobile devices and browsers include features to allow users to adjust font size system-wide. To enable system...
Fonts
To improve readability, users might increase font size. Mobile devices and browsers include features to allow users to adjust font size system-wide. To enable system font size in an Android app, mark text and their associated containers to be measured in scalable pixels (sp) .
Sufficient space for large and foreign language fonts N. See Line Height for information on the recommended sizes of foreign language fonts.
Writing
Accessibility text
Accessibility text refers to text that is used by screen reader accessibility software, such as TalkBack on Android, VoiceOver on iOS, and JAWS on desktop....
Accessibility text refers to text that is used by screen reader accessibility software, such as TalkBack on Android, VoiceOver on iOS, and JAWS on desktop. Screen readers read text and elements (such as buttons) on screen aloud, including both visible and nonvisible alternative text.
Visible and nonvisible text
Accessibility text includes both visible text (including labels for UI elements, text on buttons, links, and forms) and nonvisible descriptions that don’t appear on screen (such as alternative text for images). Sometimes, an on-screen label may be overridden with accessibility text to provide more information to the user.
When both visible and nonvisible text is descriptive and meaningful, it helps users navigate using headings or links on a screen. A screen reader can help you test accessibility text and identify places where you can add it.
Reading speed
Screen reader users hear every UI element read aloud. The shorter the text, the faster the screen reader users can navigate it. Switch to jeffersonloveshiking@gmail.com...
Screen reader users hear every UI element read aloud. The shorter the text, the faster the screen reader users can navigate it.
Switch to jeffersonloveshiking@gmail.com
Do.
Write clear and short accessibility text.
Account switcher. Switch to account jeffersonloveshiking@gmail.com
Don’t.
Don’t write long accessibility text.
Control types and states
Screen readers may automatically announce a control’s type or state either speaking the control name, or making a sound. Building More Accessible Custom Views. Related...
Screen readers may automatically announce a control’s type or state either speaking the control name, or making a sound.
Search
Do.
Use short descriptions.
Search field
Don’t.
Don’t write the control type.
Download over Wi-Fi only
Do.
Use short descriptions.
Download over Wi-Fi is selected
Don’t.
Don’t describe the current state, in this case, that Wi-Fi is “selected.”
Developer note
If the control type or state isn’t being read correctly, the control’s accessibility role may be a custom control or improperly set.
- Accessibility role association: Each element should be associated with an accessibility role on a website or be coded to be communicated correctly. This means setting a button as a button, and a checkbox as a checkbox.
- Native elements: If you extend or inherit from a native UI element, you will probably find the correct role. Otherwise, to override accessibility information for each platform see ARIA for the web, and AccessibilityNodeInfo for Android.
Indicating elements by action
Action verbs indicate what an element or link does if tapped, rather than what an element looks like. This describes what an element does without...
Action verbs indicate what an element or link does if tapped, rather than what an element looks like. This describes what an element does without relying on visual acuity.
Do.
The description read aloud indicates the action represented by the icon.
Don’t.
Describing what the icon looks like doesn’t make it clear what the action does.
Do.
Accessibility text for a navigation menu could be “Show navigation menu” and “Hide navigation menu” (preferred) or “Show main menu” and “Hide main menu” (acceptable).
Don’t.
Don’t use accessibility text that doesn’t indicate what action will occur, such as “Side drawer.”
Elements with state changes
For icons that toggle between values or states, announce the icon according to how it is presented to the user. For example, if a star...
For icons that toggle between values or states, announce the icon according to how it is presented to the user. For example, if a star icon represents the action of adding something to a wishlist, the app should verbalize “Add to wishlist” or “Remove from wishlist.”
- If the icon is a property of an item, screen readers will verbalize the current state (such as “on” or “off”) if coded as a checkbox
- If the icon is an action, if the icon is selected, the text label can specify the action that occurs, such as “Add to wishlist.”
Control interactions
Users may be navigating with a keyboard or other device, not with their fingers or a mouse, so keep that in mind when telling them...
Users may be navigating with a keyboard or other device, not with their fingers or a mouse, so keep that in mind when telling them how to interact with a control. Accessibility software will describe the correct interaction for the user.
Do.
The command “voice search” describes the user task (search) paired with the input method (voice).
Don’t.
Don’t use commands that don’t fully express how to activate a control. This voice command says “tap,” even though it could be selected via a keyboard press, switch device, or braille display. As this task is to perform a search, that action should be mentioned instead of “speak”.
Hint speech
Hint speech provides extra information for actions that aren't clear. For example, Android's “double-tap to select” feature prompts the user to tap twice. Android TalkBack...
Hint speech provides extra information for actions that aren't clear. For example, Android's “double-tap to select” feature prompts the user to tap twice. Android TalkBack will also announce any custom actions associated with an element.
Sound and motion
Sound
Labeling User Interface Elements Related Link arrow_downward Users can navigate your app using sound when you add descriptive labels to UI elements. When using a...
Users can navigate your app using sound when you add descriptive labels to UI elements. When using a screen reader (such as TalkBack) and navigating by touch exploration, labels are spoken aloud when users touch UI elements on screen.
Screenreaders can be difficult to use when:
- Sound plays over a screen reader, such as background music that autoplays (you can provide controls for users to pause or stop these sounds)
- Extra sounds are added to native elements (as screen readers will be able to interpret native elements correctly)
Alternatives to sound
Visual alternatives can be given to sound or other critical audio elements and alerts, such as closed captions or a transcript.
Motion
Material Design uses motion to guide focus between screens. Surfaces transform into focal points for the user to follow, and unimportant elements are removed. To...
Material Design uses motion to guide focus between screens. Surfaces transform into focal points for the user to follow, and unimportant elements are removed.
To allow users with motion and vision sensitivities to use interfaces comfortably, Material Design provides motion guidance, which supports the following from the W3C:
- Enable content that moves, scrolls, or blinks automatically to be paused, stopped, or hidden if it lasts more than five seconds
- Limit flashing content to three times in a one-second period to meet flash and red flash thresholds
- Avoid flashing large central regions of the screen
Timed controls
Controls in an app can be set to disappear after a certain amount of time. For example, five seconds after starting a video, playback controls...
Controls in an app can be set to disappear after a certain amount of time. For example, five seconds after starting a video, playback controls can fade from the screen.
High-priority controls
Controls that perform high-priority functions can be missed by users if timers cause them to fade away too quickly. For example, TalkBack reads controls out loud if they are focused on. Placing them on timers can prevent the controls from completing their task.
Controls that enable important functions can allow users to turn them on again, or perform the same function in other ways. Learn more in Composition.
Implementing accessibility
By using standard platform controls and semantic HTML (on the web), apps automatically contain the markup and code needed to work well with a platform’s assistive technology. Meeting each platform's accessibility standards and supporting its assistive technology (including shortcuts and structure) gives users an efficient experience.
Do.
Use native elements, such as the standard platform dialog.
Don’t.
Don’t use non-standard elements, such as a non-standard platform dialog to perform a standard dialog task. It requires extra testing to work well with assistive technology.
You can test your design with the platform accessibility settings turned on (both during and after implementation).
Other design considerations:
- Scalable text and a spacious layout accommodate users who may have large text, color correction, magnification, or other assistive settings turned on.
- Keyboard and mouse interfaces can have every task and all hover information available through keyboard-only input.
- Touch interfaces can allow screen readers and other assistive technology devices to read all parts of your interface.
Do.
Scale your UI to work well with magnification and large text.
Don’t.
This UI hasn’t scaled well with magnification and large text. Portions of content are overlapping or cut off.
Label UI elements
To let screen-reader users know which UI elements are tappable, enable screen readers to read the names of components out loud. The contentDescription attribute can...
To let screen-reader users know which UI elements are tappable, enable screen readers to read the names of components out loud. The contentDescription attribute can be added to components (such as buttons, icons, and tabs) containing icons that have no visible text. For web apps, add an add aria-label.
- Label the Search icon
- Label the Microphone icon
- Label the Edit icon
- Label the Chat icon
Help documentation
Features with special accessibility considerations can be included in help documentation. As an example, review this guide on how to use a screen reader with...
Features with special accessibility considerations can be included in help documentation. As an example, review this guide on how to use a screen reader with Google Drive.
Testing and research
Following these accessibility guidelines helps improve the accessibility of your app, but does not guarantee a fully accessible experience. It is recommended that you also:...
Following these accessibility guidelines helps improve the accessibility of your app, but does not guarantee a fully accessible experience. It is recommended that you also:
- Test your app for full task completion, beginning to end, with various assistive technologies turned on. For example, turn on Explore by Touch in TalkBack and change the speed at which text is spoken out loud.
- Have users with impairments test your app.
- Consider how individual elements can be made more accessible while also fitting together in a coherent user flow.
- Make the major tasks you want your users to complete as usable as possible for a wide range of users.
Talk to your users, particularly those who use assistive technology, to learn about their needs, what they want out of your app, which tools they use, and how they use them. Become familiar with these tools so you can give them the best experience.
People use assistive technology in different ways.