Informative link text tells the user the purpose of the link, such as "Save" or "Settings." Uninformative link text, such as "More" or "Here," requires the user to learn the purpose of the link from the surrounding context, or through trial and error.
For someone who uses an accessibility service to navigate in an app, informative link text is particularly important. Informative link text helps the user know immediately whether they want to activate the link. Screen reader users might have an option to scan through only the links that are present. If the description of each link is clear, the user can understand the purpose of the link without the surrounding context.
Without informative link text, the user might need to navigate forward and backward through the app to discover the purpose of the link, causing confusion and increasing effort and time to complete a task.
Implementation
Android offers several ways of creating linked text:
URLSpan
- the convenience class
Linkify
ClickableSpan
Whenever you create a link, verify that the text within the link conveys its purpose.
Learn more about clickable links.
Design
When designing an app, here are some tips for choosing link text:
- Consider whether the purpose of each link would be obvious to a person who is using the app for the first time.
- Use different text for links that serve different purposes. Use the same text for links that serve the same purpose.
- Try not to rely upon content adjacent to the link to convey its meaning.
Testing
When testing your app, here are some tips to make sure that link text is clear:
- Examine each link displayed in an app to see if its purpose is clear.
- Using the TalkBack screen reader, open the local context menu and review the list of links. Make sure that the purpose of each is clear without its surrounding context.
- Show the app to someone who hasn't seen it before, and see if they can predict what each link will do.
For English only: Android's automated testing tools can identify some generic link text, like "Learn more" or "Tap here." For automated tests, turn on accessibility checking in Espresso and Robolectric.