You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
h.span and other text components default to userSelect: "auto" style. This causes keyboard navigation (tab or dpad) to pick default text elements as focusable.
CleanShot.2025-06-09.at.11.57.00.mp4
React Native's Text behaves correctly (is skipped by keyboard nav).
How this happens:
this starts with default style of userSelect: "auto"here
which causes selectable: true prop passed to React Native component here
then this sets textIsSelectable attribute on ReactTextView which is descendant of Android TextViewhere
finally Android's TextView sets couple of flags: focusable, focusableInTouchMode, clickable, and longClickable to true docs
Since React Native is not exposing any of the focusable, etc flags, this cannot be overridden, to make text non-focusable.
NOTE:
this is different from screen reader behavior when it's expected that text elements are picked up, this issue is for keyboard navigation.
on iOS these default text components behave correctly
on iOS these default text components aren't do not have "selectable" text but rather enable Copy context action
Expected behavior
Default text components should not be picked by keyboard/dpad navigation.
IMO reasonable solution would be to have default to userSelect: none for native environments (iOS, Android), as this matches the default behavior on both OSes.
Describe the issue
h.spanand other text components default touserSelect: "auto"style. This causes keyboard navigation (tab or dpad) to pick default text elements as focusable.CleanShot.2025-06-09.at.11.57.00.mp4
React Native's
Textbehaves correctly (is skipped by keyboard nav).How this happens:
userSelect: "auto"hereselectable: trueprop passed to React Native component heretextIsSelectableattribute onReactTextViewwhich is descendant of AndroidTextViewherefocusable,focusableInTouchMode,clickable, andlongClickableto true docsSince React Native is not exposing any of the
focusable, etc flags, this cannot be overridden, to make text non-focusable.NOTE:
Expected behavior
Default text components should not be picked by keyboard/dpad navigation.
IMO reasonable solution would be to have default to
userSelect: nonefor native environments (iOS, Android), as this matches the default behavior on both OSes.Steps to reproduce
Test case
https://github.com/mdjastrzebski/repro-rsd-keyboard-navigation
Additional comments
No response