Missing contentDescription attribute on image' in XML
Follow this link for solution: Android Lint contentDescription warning
Resolved this warning by setting attribute android:contentDescription
for my ImageViewandroid:contentDescription="@string/desc"
Android Lint support in ADT 16 throws this warning to ensure that
image widgets provide a contentDescriptionThis defines text that briefly describes the content of the view. This
property is used primarily for accessibility. Since some views do not
have textual representation this attribute can be used for providing
such.Non-textual widgets like ImageViews and ImageButtons should use the
contentDescription attribute to specify a textual description of the
widget such that screen readers and other accessibility tools can
adequately describe the user interface.
This link for explanation: Accessibility, It's Impact and Development Resources
Many Android users have disabilities that require them to interact
with their Android devices in different ways. These include users who
have visual, physical or age-related disabilities that prevent them
from fully seeing or using a touchscreen.Android provides accessibility features and services for helping these
users navigate their devices more easily, including text-to-speech,
haptic feedback, trackball and D-pad navigation that augments their
experience. Android application developers can take advantage of these
services to make their applications more accessible and also build
their own accessibility services.
This guide is for making your app accessible: Making Apps More Accessible
Making sure your application is accessible to all users is relatively
easy, particularly when you use framework-provided user interface
components. If you only use these standard components for your
application, there are just a few steps required to ensure your
application is accessible:
Label your ImageButton, ImageView, EditText, CheckBox and other user
interface controls using the android:contentDescription attribute.Make all of your user interface elements accessible with a directional
controller, such as a trackball or D-pad.Test your application by turning on accessibility services like TalkBack
and Explore by Touch,
and try using your application using only directional controls.
Missing contentDescription attribute on image in android XML
You have to set the attribute "android:contentDescription" in your ImageView.
Example :
<ImageView
android:id="@+id/user_image"
android:layout_width="30dip"
android:layout_height="30dip"
android:contentDescription="@string/imageViewDescription" />
This warning is thrown to be sure that your ImageView describes his content by a brief text.
imagebutton gives me error: [Accessibility] Missing contentDescription attribute on image
Designing for Accessibility
"Defines text that briefly describes content of the view. This property is used primarily for accessibility. Since some views do not have textual representation this attribute can be used for providing such."
And this is not error just a warning. Usage of this attribute is optional.
imagebutton gives me error: [Accessibility] Missing contentDescription attribute on image
Designing for Accessibility
"Defines text that briefly describes content of the view. This property is used primarily for accessibility. Since some views do not have textual representation this attribute can be used for providing such."
And this is not error just a warning. Usage of this attribute is optional.
Android Lint contentDescription warning
Resolved this warning by setting attribute android:contentDescription
for my ImageView
android:contentDescription="@string/desc"
Android Lint support in ADT 16 throws this warning to ensure that image widgets provide a contentDescription.
This defines text that briefly describes content of the view. This property is used primarily for accessibility. Since some views do not have textual representation this attribute can be used for providing such.
Non-textual widgets like ImageViews and ImageButtons should use the contentDescription attribute to specify a textual description of the widget such that screen readers and other accessibility tools can adequately describe the user interface.
Related Topics
Android Tabwidget Detect Click on Current Tab
Android Calling Asynctask Right After an Another Finished
Android: Launch Activity from Clickable Text
How to Get Each Device's Ip Address in Wi-Fi Direct Scenario
Android 'Unable to Add Window -- Token Null Is Not for an Application' Exception
Two Textviews Side by Side, Only One to Ellipsize
How to Get References for All Currently Active Fragments in an Activity
Identifying Rtl Language in Android
How to Change the Background Color Around a Dialogfragment
Get My Phone Number in Android
Gridview with Different Cells Sizes, Pinterest Style
Google Play App Description Formatting
Understanding Canvas and Surface Concepts
What Are the Android Sdk Build-Tools, Platform-Tools and Tools? and Which Version Should Be Used