Skip to main content
Logo Appt Light

Success Criterion 1.1.1 - Level A

Non-text Content

Make sure that alternative text is available for all content without text. These include images, icons and graphs. Describe what there is to see. People who are blind have this description read aloud through their screen reader. Alternative text can also be useful for anyone who is unsure about the meaning of the content.

Impact

  • Alternative text can help anyone understand the meaning of icons, photos, and other images.

  • People with a visual impairment can use their screen reader to read what is being shown.

  • People who are deafblind can read the content in braille.

Check

"Is alternative text available for all non-text content?”

You can use the screen reader or voice control to check alternative text.

Exception: It is not necessary to provide alternative text for decorative images. In this case, you should also make sure that assistive technologies cannot focus on the image.

Solution

Set accessibility label

On Android, you can use the contentDescription attribute to set an accessibility label.

You can also pass any kind of Span for greater control over pronunciation. For example, you can set a language by using LocaleSpan.

If another element is used to display the label, you can link the label by using the labelFor attribute.

// Set accessibility label
element.contentDescription = "Appt"

// Set accessibility label in Dutch language
val locale = Locale.forLanguageTag("nl-NL")
val localeSpan = LocaleSpan(locale)

val string = SpannableString("Appt")
string.setSpan(localeSpan, 0, string.length, Spanned.SPAN_INCLUSIVE_INCLUSIVE)

element.contentDescription = localeSpan

// Link visual label to field
textView.setLabelFor(R.id.editText)

Disable accessibility focus

On Android, you can use the setImportantForAccessibility method to set whether assistive technologies can focus on an element. You can also set this property directly in XML by using the android:importantForAccessibility property.

view.importantForAccessibility = View.IMPORTANT_FOR_ACCESSIBILITY_NO

Resources

Feedback?

Let us know!