hasContentDescription

Function

Common
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

valueValue to match as one of the items in the list of content descriptions.
substringWhether to use substring matching.
ignoreCaseWhether case should be ignored.