Hello Developer, Hope you guys are doing great. Today at Tutorial Guruji Official website, we are sharing the answer of imagebutton gives me error: [Accessibility] Missing contentDescription attribute on image without wasting too much if your time.
The question is published on by Tutorial Guruji team.
The question is published on by Tutorial Guruji team.
[Accessibility] Missing contentDescription attribute on image
What does this error mean and how can I fix it?
<ImageButton android:id="@+id/callbannerbuttonpg1" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="157dp" android:background="@null" android:src="@drawable/callbanner" android:visibility="invisible" />
Answer
“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.
We are here to answer your question about imagebutton gives me error: [Accessibility] Missing contentDescription attribute on image - If you find the proper solution, please don't forgot to share this with your team members.