Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
Rendre votre application Android plus accessible
Découvrez les principes d'accessibilité qui font toute la différence pour vos utilisateurs, dont le contraste des couleurs, la taille des zones cibles tactiles et les libellés de contenu.
Retour
check_circle
Premiers pas avec l'accessibilité sur Android
ondemand_video
Vidéo
Apprenez-en plus sur l'accessibilité et découvrez les concepts abordés dans cette série.
check_circle
Accessibilité sur Android
ondemand_video
Vidéo
Découvrez comment les utilisateurs ayant un handicap peuvent modifier la configuration par défaut de leur appareil Android pour qu'il soit plus fonctionnel.
check_circle
Services d'accessibilité et modèle d'accessibilité Android
ondemand_video
Vidéo
Découvrez comment le framework Android communique avec les services d'accessibilité, et offre ainsi une alternative qui permet aux utilisateurs ayant un handicap d'interagir avec les appareils Android.
check_circle
Problèmes d'accessibilité courants
subject
Article
Découvrez comment les utilisateurs ayant un handicap peuvent modifier la configuration par défaut de leur appareil Android pour qu'il soit plus fonctionnel.
Découvrez comment mettre en œuvre les bonnes pratiques concernant les libellés de contenu, les zones cibles tactiles et le contraste des couleurs, et comment identifier et résoudre ces problèmes d'accessibilité.
[null,null,[],[],[],null,["# Make apps more accessible\n\nTry to make your Android app usable for everyone, including people with\naccessibility needs.\n\nPeople with impaired vision, color blindness, impaired hearing, impaired\ndexterity, cognitive disabilities, and many other disabilities use Android\ndevices. When you develop apps with\naccessibility in mind, you make the user experience better for people with\naccessibility needs.\n\nThis page presents guidelines for implementing key elements of accessibility\nso that everyone can use your app more easily. For more in-depth guidance on\nhow to make your app more accessible, see [Principles for improving app\naccessibility](/guide/topics/ui/accessibility/principles).\n\nIncrease text visibility\n------------------------\n\nFor each set of text within your app, we recommend the *color contrast*---or\ndifference in perceived brightness between the color of the text and the color\nof the background behind the text---to be above a specific threshold. The\nexact threshold depends on the text's font size and whether the text appears in\nbold:\n\n- If the text is smaller than 18pt, or if the text is bold and smaller than 14pt, set the color contrast ratio to at least 4.5:1.\n- For all other text, set the color contrast ratio to at least 3:1.\n\nThe following image shows two examples of text-to-background color contrast: \n**Figure 1.** Lower than recommended (left) and sufficient (right) color contrast.\n\nTo check the text-to-background color contrast in your app, use an online color\ncontrast checker or the [Accessibility\nScanner](https://play.google.com/store/apps/details?id=com.google.android.apps.accessibility.auditor)\napp.\n\nUse large, simple controls\n--------------------------\n\nYour app's UI is easier to use if its controls are easier to see\nand tap. We recommend that each interactive UI element have a focusable area, or\n*touch target size*, of at least 48dpx48dp. Larger is even better.\n\nFor a given UI element to have a large enough touch target size, the following\nconditions should **both** be true:\n\n- The sum of the values of [`android:paddingLeft`](/reference/android/view/View#attr_android:paddingLeft), [`android:minWidth`](/reference/android/view/View#attr_android:minWidth), and [`android:paddingRight`](/reference/android/view/View#attr_android:paddingRight) is greater than or equal to 48dp.\n- The sum of the values of [`android:paddingTop`](/reference/android/view/View#attr_android:paddingTop), [`android:minHeight`](/reference/android/view/View#attr_android:minHeight), and [`android:paddingBottom`](/reference/android/view/View#attr_android:paddingBottom) is greater than or equal to 48dp.\n\nThe padding values allow an object's *visible* size to be less than 48dpx48dp\nwhile still having the recommended touch target size.\n\nThe following code snippet shows an element that has the recommended touch\ntarget size: \n\n```xml\n\u003cImageButton ...\n android:paddingLeft=\"4dp\"\n android:minWidth=\"40dp\"\n android:paddingRight=\"4dp\"\n\n android:paddingTop=\"8dp\"\n android:minHeight=\"32dp\"\n android:paddingBottom=\"8dp\" /\u003e\n```\n\nDescribe each UI element\n------------------------\n\nFor each UI element in your app, include a description that\ndescribes the element's purpose. In most cases, you include this description in\nthe element's `contentDescription` attribute, as shown in the following code\nsnippet: \n\n```xml\n\u003c!-- Use string resources for easier localization. --\u003e\n\u003c!-- The en-US value for the following string is \"Inspect\". --\u003e\n\u003cImageView\n ...\n android:contentDescription=\"@string/inspect\" /\u003e\n```\n| **Note:** Don't provide descriptions for [`TextView`](/reference/android/widget/TextView) elements. Android accessibility services automatically announce the text itself as the description.\n\nWhen adding descriptions to your app's UI elements, keep the following best\npractices in mind:\n\n- Don't include the type of UI element in the content description. Screen\n readers automatically announce both the element's type and description. For\n example, if selecting a button causes a \"submit\" action to occur in your app,\n make the button's description `\"Submit\"`, not `\"Submit button\"`.\n\n- Each description must be unique. That way, when screen reader users\n encounter a repeated element description, they correctly recognize that the\n focus is on an element that already had focus earlier. In particular, each item\n within a view group such as\n [`RecyclerView`](/reference/androidx/recyclerview/widget/RecyclerView) must have\n a different description. Each description must reflect the content that's unique\n to a given item, such as the name of a city in a list of locations.\n\n- If your app's `minSdkVersion` is `16` or higher, you can set the\n [`android:importantForAccessibility`](/reference/android/view/View#attr_android:importantForAccessibility)\n attribute to `\"no\"` for graphical elements that are only used for decorative\n effect.\n\nAdditional resources\n--------------------\n\nTo learn more about making your app more accessible, see the following\nadditional resources:\n\n### Codelabs\n\n- [Starting Android\n Accessibility](https://codelabs.developers.google.com/codelabs/starting-android-accessibility)\n\n### Blog posts\n\n- [Accessibility: Are You Serving All Your\n Users?](https://android-developers.googleblog.com/2012/04/accessibility-are-you-serving-all-your.html)"]]