Function

hasContentDescription

Returns whether the node's content description contains the given value.

hasContentDescription

Source set: Common
public fun hasContentDescription(
    value: String,
    substring: Boolean = false,
    ignoreCase: Boolean = false,
): SemanticsMatcher

Returns whether the node's content description contains the given value.

Note that in merged semantics tree there can be a list of content descriptions that got merged from the child nodes. Typically an accessibility tooling will decide based on its heuristics which ones to announce.

Parameters

value Value to match as one of the items in the list of content descriptions.
substring Whether to use substring matching.
ignoreCase Whether case should be ignored.
Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: