Clickable span
This test checks if links are displayed using a ClickableSpan
before Android 8.0 (API level 26).
Accessibility services are not able to activate a ClickableSpan
before Android 8.0. An exception to this rule is an URLSpan
which does not contain a relative URI.
Solutions
- Use
ViewCompat.enableAccessibleClickableSpanSupport(android.view.View)
to make aClickableSpan
available to accessibility services as early as API level 19. - Use a
URLSpan
with a matchingIntentFilter
to handle the click action, as an accessibility service may activate these hyperlinks through an intent broadcast. - Accessibility link