[Accessibility] missing contentdescription attribute on Image

Source: Internet
Author: User

This [Accessibility] missing contentdescription attribute on image warning is always prompted when you use eclipse to define an imageview. Although it can be ignored, it is always strange, I found on the Internet that this was a new feature of ADT 16.0 (I used adt20.0). In some controls without text display, such as imageview and imagebutton, ADT will prompt you to define an Android: contentdescription attribute to describe the role of this control. The original English text is as follows:

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 shocould 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 links:

Http://stackoverflow.com/questions/8500544/android-lint-contentdescription-warning

Http://blog.csdn.net/hn307165411/article/details/7179317

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.