[Accessibility] Missing contentdescription attribute on image

Source: Internet
Author: User

Today the next ADT 16.0 is used to define a imageview and always prompt for this [accessibility] Missing contentdescription attribute on image warning, although you can ignore But always feel strange, in a search online found that this is ADT 16.0 new features, in some non-text display controls, such as ImageView and ImageButton, ADT will prompt you to define a Android:contentdescription property, Used to describe the effect of this control. The English text is as follows, please criticize if there is a wrong place to translate.

Resolved this warning by setting attribute android:contentdescription for my ImageView

android:contentdescription= "@string/desc"

android Lint Support in ADT throws the warning to ensure the image widgets provide a contentdescription

this defines text that briefly describes content of the view. Used primarily for accessibility. Since Some views does not have the textual representation this attribute can is used for providing such.

Non-textual widgets like Imageviews and imagebuttons should use the ContentDescription attribute to specify a textual desc Ription of the widget such that screens readers and other accessibility tools can adequately describe the user interface.


original link: http://stackoverflow.com/questions/8500544/android-lint-contentdescription-warning

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.