当前位置:Gxlcms > 数据库问题 > [Accessibility] Missing contentDescription attribute on image

[Accessibility] Missing contentDescription attribute on image

时间:2021-07-01 10:21:17 帮助过:44人阅读

 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.

[Accessibility] Missing contentDescription attribute on image

标签:android

人气教程排行