Skip to main content
Logo Appt Light

Success Criterion 2.4.4 - Level A

Link Purpose (In Context)

Ensure links are clear without the surrounding content. Users of assistive technologies can request an overview of all links on the screen. It is important that the purpose of each link is clear. A common mistake is to name a link 'here'. Without the surrounding text it is not clear what you will read more about.


Assistive technologies can show an overview of all links on the screen. The purpose of each link should be clear immediately.


Is the purpose of each link clear?

This can be tested without assistive technologies.


Mark links

On Android, links should be embedded inside an URLSpan.

To create text links, you can show the span in using the setText method of TextView. To support assistive technologies on lower version of Android, you need to call the ViewCompat.enableAccessibleClickableSpanSupport() method.

The helper method ViewCompat.addLinks() is also useful to automatically create accessible links.

Warning: you have to remove the android:autoLink attribute from your XML to make your URLSpan's clickable.

val textView = TextView(this)

val url = ""
val link = "Appt"

val spannableString = SpannableString("Learn more about $link")

val index = spannableString.indexOf(link)
spannableString.setSpan(URLSpan(url), index, index + link.length, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE)

textView.text = spannableString
textView.movementMethod = LinkMovementMethod.getInstance()




Let us know!