# How to Add Content Descriptions in Compose - A Guide for Android Devs

DevFeed: [How to Add Content Descriptions in Compose - A Guide for Android Devs](<https://devfeed.tech/articles/how-to-add-content-descriptions-in-compose-a-guide-for-android-devs-38465.md>)

Original publisher: [Read original article](<https://eevis.codes/blog/2023-11-15/how-to-add-content-descriptions-in-compose-a-guide-for-android-devs/>)

Author: Eevis Panula

Published: 2023-11-15T04:09:02.862000Z

Content type: tutorial

Language: en

Sources: [Eevis Blog](<https://devfeed.tech/sources/eevis-blog.md>)

Topics: [Compose](<https://devfeed.tech/topics/compose.md>), [Accessibility](<https://devfeed.tech/topics/accessibility.md>), [Android](<https://devfeed.tech/topics/android.md>), [Android Studio](<https://devfeed.tech/topics/android-studio.md>), [alt text](<https://devfeed.tech/topics/alt-text.md>)

Tags: [accessibility](<https://devfeed.tech/tags/accessibility.md>), [alt-text](<https://devfeed.tech/tags/alt-text.md>), [android](<https://devfeed.tech/tags/android.md>), [android-studio](<https://devfeed.tech/tags/android-studio.md>), [compose](<https://devfeed.tech/tags/compose.md>), [guide](<https://devfeed.tech/tags/guide.md>), [how-to](<https://devfeed.tech/tags/how-to.md>)

## AI overview

This guide explains how Android developers should use Compose contentDescription values as text alternatives for meaningful images, icons, and graphs. It covers accessibility for screen reader and voice access users, common mistakes such as using icon names, and the relationship between Android content descriptions and web alt text.

## Source excerpt

When it comes to the contentDescription-attribute, I've noticed a couple of things Android devs do that are wrong and make apps harder to use with assistive technology. The first thing I see a lot is setting the content description of an icon to the icon name, such as icon_cat_sleeping. Another thing is suppressing the warnings Android Studio gives about missing content descriptions. I decided to write about this theme, and in this blog post, you'll learn about content descriptions: the problems and solutions. And yes, you'll understand why those things I mentioned in the previous paragraph are problematic. Let's start discussing content description, then continue with how to write one, and finally, how to set the content description. What Content Description Is When I talk about content description, I mean text alternative. If you have any background in web development or, e.g., using any social media platforms, you might have heard about the word "alt text". They mean the same thing and different environments have different names for this concept. In Android, the attribute is called contentDescription, and I think that content description is actually a very explanatory name for what we're trying to accomplish with it: describing the content of an image or a graphic. One thing that's important to remember is who we are describing the content for: Users who utilize the accessibility APIs. This means, for example, screen reader and voice access users. Screen reader users rely on the content descriptions for visual content (that they usually can't see, depending on their sight level), and voice access users can use these values as labels to interact with elements, such as buttons. Content descriptions should be added for meaningful visual elements like images, icons, and graphs. For some of the elements, it's more straightforward, but for, for example, different types of graphs, it's more complicated. This blog post won't go into details on adding content descriptions