Skip to content

Android: an accessible Image takes hardware-keyboard focus even with focusable={false} or tabIndex={-1} #60168

Open

Description

@YevheniiKotyrlo

Description

On Android, an <Image accessible /> takes hardware-keyboard focus, and focusable={false} or tabIndex={-1} does not take it out: Tab, Shift+Tab and the D-pad or arrow keys still land on it. React Native documents focusable as "whether this View should be focusable with a non-touch input device, eg. receive focus with a hardware keyboard".

ReactImageManager.setAccessible sets isFocusable, the flag both accessibility services and keyboard navigation read (L103-L106). focusable is a valid attribute of every Android host component (BaseViewConfig.android.js L402), but ReactImageManager has no setter for it, so the prop reaches nothing.

Related: #34737 (keyboard focus apart from screen-reader focus). #59048 adds a keyboard exclusion for View and #59139 for Text; neither covers Image.

Steps to reproduce

The reproducer renders, top to bottom: a Pressable "first button", <Image accessible accessibilityLabel="logo with focusable false" focusable={false} />, <Image accessible accessibilityLabel="logo with tabIndex -1" tabIndex={-1} />, and a Pressable "second button".

  1. Build and install the release APK: cd ReproducerApp && yarn install && cd android && ./gradlew assembleRelease && adb install -r app/build/outputs/apk/release/app-release.apk.
  2. Open the app, attach a hardware keyboard and press Tab repeatedly.
  3. From the first button, press the down arrow (D-pad Down) three times.

Or run ./reproduce.sh with one Android device attached: it builds and installs the app, then for each of Tab, Shift+Tab and D-pad Down starts the app afresh, presses the key six times through adb shell input and reads which view holds focus after each press from uiautomator dump. It exits 1 while either image takes focus.

Expected: neither image takes keyboard focus. Tab and Shift+Tab move between the two buttons only, D-pad Down goes from the first button to the second, and both images stay accessibility elements with their labels.
Seen: Tab goes first button → second button → "logo with focusable false" → "logo with tabIndex -1" → first button; Shift+Tab goes the reverse way through both images; D-pad Down goes through both images to the second button.

React Native Version

0.90.0-nightly-20261119-f4f8b6a1f

Affected Platforms

Runtime - Android

Output of npx @react-native-community/cli info

System:
  OS: Windows 11 10.0.26300
  CPU: "(32) x64 AMD Ryzen 9 9950X3D 16-Core Processor          "
  Memory: 152.76 GB / 255.67 GB
Binaries:
  Node:
    version: 26.12.1
    path: C:\Program Files\nodejs\node.EXE
  Yarn:
    version: 1.22.22
    path: C:\Users\<user>\AppData\Roaming\npm\yarn.CMD
  npm:
    version: 12.2.1
    path: C:\Program Files\nodejs\npm.CMD
  Watchman: Not Found
SDKs:
  Android SDK: Not Found
  Windows SDK:
    AllowDevelopmentWithoutDevLicense: Enabled
    Versions:
      - 10.0.19041.0
      - 10.0.26100.0
IDEs:
  Android Studio: AI-262.9437.185.2621.16467767
  Visual Studio: Not Found
Languages:
  Java:
    version: 17.0.20.1
    path: C:\Program Files\Microsoft\jdk-17.0.20.101-hotspot\bin\javac.EXE
  Ruby: Not Found
npmPackages:
  "@react-native-community/cli":
    installed: 21.0.0-alpha.1
    wanted: 21.0.0-alpha.1
  react:
    installed: 19.3.0
    wanted: 19.3.0
  react-native:
    installed: 0.90.0-nightly-20261119-f4f8b6a1f
    wanted: 0.90.0-nightly-20261119-f4f8b6a1f
  react-native-windows: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: Not found
  newArchEnabled: Not found

Stacktrace or Logs

./reproduce.sh at the reproducer's 6ec0a83, on a nubia NX809J; no error is logged:

device: NX809J, Android 16 (API 36), arm64-v8a
react-native 0.90.0-nightly-20261119-f4f8b6a1f
== ./gradlew :app:assembleRelease -PreactNativeArchitectures=arm64-v8a
== Tab, 6 presses from a fresh launch
  Tab 1: "first button" holds focus
  Tab 2: "second button" holds focus
  Tab 3: "logo with focusable false" holds focus
  Tab 4: "logo with tabIndex -1" holds focus
  Tab 5: "first button" holds focus
  Tab 6: "second button" holds focus
== Shift+Tab, 6 presses from a fresh launch
  Shift+Tab 1: "logo with tabIndex -1" holds focus
  Shift+Tab 2: "logo with focusable false" holds focus
  Shift+Tab 3: "second button" holds focus
  Shift+Tab 4: "first button" holds focus
  Shift+Tab 5: "logo with tabIndex -1" holds focus
  Shift+Tab 6: "logo with focusable false" holds focus
== D-pad Down, 6 presses from a fresh launch
  D-pad Down 1: "first button" holds focus
  D-pad Down 2: "logo with focusable false" holds focus
  D-pad Down 3: "logo with tabIndex -1" holds focus
  D-pad Down 4: "second button" holds focus
  D-pad Down 5: "second button" holds focus
  D-pad Down 6: "second button" holds focus
SUMMARY: an accessible Image with focusable={false} or tabIndex={-1} takes keyboard focus: Tab lands on "logo with focusable false" and "logo with tabIndex -1"; Shift+Tab lands on "logo with tabIndex -1" and "logo with focusable false"; D-pad Down lands on "logo with focusable false" and "logo with tabIndex -1"

MANDATORY Reproducer

https://github.com/YevheniiKotyrlo/rn-accessible-image-keyboard-focus

Screenshots and Videos

No response

Activity

  1. GBS05577-Andrea commented on Nov 20, 2026

    @GBS05577-Andrea

    I suppose this is due to accessible having precedence over Android-only props:

    image
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions