Expo UI and Router for iOSExpo SDK 57 and later, iOS only
Modifiers

accessibilityIdentifier

Sets an accessibility identifier for the view.

accessibilityIdentifier(identifier)

ParameterTypeDescription
identifierstringThe accessibility identifier used for UI testing.

Sets an accessibility identifier for the view.

Unlike accessibilityLabel, this value is for UI testing and is not visible to the user. UI testing tools such as XCUITest read it to locate the view, so prefer a stable, machine-readable identifier here.

Returns: ModifierConfig

See: Official SwiftUI documentation.

Works with

You can add accessibilityIdentifier to any view. It changes what you see on 39 of the 39 components.

Sources

The original Expo docs for this page:

On this page