feat(core): Use accessibilityLabel, aria-label, and testID as touch breadcrumb label fallbacks#6103
Merged
feat(core): Use accessibilityLabel, aria-label, and testID as touch breadcrumb label fallbacks#6103
Conversation
…readcrumb label fallbacks Closes #6096 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
Semver Impact of This PR⚪ None (no version bump detected) 📋 Changelog PreviewThis is how your changes will appear in the changelog.
🤖 This preview updates automatically when you update the PR. |
Contributor
|
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
6 tasks
10 tasks
alwx
approved these changes
May 7, 2026
3 tasks
antonis
added a commit
to getsentry/sentry-docs
that referenced
this pull request
May 7, 2026
## DESCRIBE YOUR PR Updates React Native touch event docs to reflect that `accessibilityLabel`, `aria-label`, and `testID` are now automatically used as label fallbacks for touch breadcrumbs (added in [getsentry/sentry-react-native#6103](getsentry/sentry-react-native#6103)). **Changes:** - **`touchevents.mdx`**: Rewrote the "Tracking Specific Components" section to correctly distinguish between the **label** fallback chain (`sentry-label` > `labelName` > `accessibilityLabel` > `aria-label` > `testID`) and the **name** field (Babel annotation / `displayName`). Updated `labelName` option description. - **`user-interaction-instrumentation.mdx`**: Updated the label identification description to mention the full fallback chain. ## IS YOUR CHANGE URGENT? - [ ] Urgent deadline (GA date, etc.) - [ ] Other deadline - [x] None: Not urgent, can wait up to 1 week+⚠️ Should be merged after getsentry/sentry-react-native#6103 is released ## PRE-MERGE CHECKLIST - [ ] Checked Vercel preview for correctness, including links - [ ] PR was reviewed and approved by any necessary SMEs (subject matter experts) - [ ] PR was reviewed and approved by a member of the [Sentry docs team](https://github.com/orgs/getsentry/teams/docs) --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📢 Type of change
📜 Description
Extends
getLabelValueintouchevents.tsxto readaccessibilityLabel,aria-label, andtestIDfrommemoizedPropsas fallback labels for touch breadcrumbs.Priority chain:
sentry-label> customlabelKey>accessibilityLabel>aria-label>testIDPreviously, the only way to get a meaningful label on a touch breadcrumb was to explicitly set
sentry-labelon the component — which almost nobody does. Now any app that uses accessibility labels or testIDs gets meaningful breadcrumbs out of the box.Before:
After (if accessibilityLabel is set):
This also improves Session Replay AI summaries, which rely on breadcrumb data to describe user actions.
Note on PII:
accessibilityLabelandaria-labelcan carry dynamic content (e.g.,accessibilityLabel={`Delete ${item.name}`}), so user data may appear in breadcrumbs via this path. This is consistent with existing behavior forsentry-label, which can also be dynamic.💡 Motivation and Context
Closes #6096
Customer feedback indicated that Session Replay summaries are not useful because tap breadcrumbs only show generic component hierarchies (
TouchableOpacity > Animated(View) > View > ExpoLinearGradient) with no meaningful labels. On web, the SDK captures button text and element attributes; on mobile, we were only reading the four Babel-injected props and explicitsentry-label.💚 How did you test it?
accessibilityLabelused as fallbacktestIDused as fallbackaria-labelused as fallbacksentry-labeltakes priority over alllabelNametakes priority overaccessibilityLabelaccessibilityLabeltakes priority overaria-labelandtestIDaccessibilityLabeltakes priority overtestID📝 Checklist
sendDefaultPIIis enabled🔮 Next steps