Skip to content

Read accessibilityLabel and testID from touch event props #6096

@antonis

Description

@antonis

In touchevents.tsx, getTouchedComponentInfo (L267-292) already has memoizedProps in hand but only reads the four Babel-injected/sentry-label props. We should also read accessibilityLabel and testID as label fallbacks.

Priority order: explicit sentry-label > accessibilityLabel > testID.

Both are developer-authored strings (not user input), so PII risk is low.

Any RN app that cares about accessibility or has UI tests already sets these — we're just reading what's there.

Scope: ~10 lines in touchevents.tsx + unit tests.

Ref: https://github.com/getsentry/sentry-react-native/blob/main/packages/core/src/js/touchevents.tsx#L267-L335

Metadata

Metadata

Assignees

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions