Skip to content

[a11y] aria-hidden not working on some elements #53350

@mdjastrzebski

Description

@mdjastrzebski

Description

By MDN definition aria-hidden element should remove given view and it's children from Accessibility APIs.

However, this prop only works partially:

Element iOS Android
View
Text
TextInput (non-editable)
Pressable
Image

Note: according to MDN, one should not use aria-hidden on focusable elements, hence we have non-editable TextInput above which is not focusable.

Tested case

<View accessible aria-hidden aria-label="This should be hidden">
  <Text>View with aria-hidden</Text>
</View>

<Text aria-hidden aria-label="This should be hidden">Text with aria-hidden</Text>

<TextInput 
  aria-hidden 
  placeholder="TextInput with aria-hidden" 
  aria-label="This should be hidden" 
/>

<Pressable aria-hidden onPress={() => console.log('Pressed')} aria-label="This should be hidden">
  <Text>Pressable with aria-hidden</Text>
</Pressable>

<Image
  aria-hidden
  aria-label="This should be hidden" 
  source={{ uri: 'https://reactnative.dev/img/homepage/dissection-dark.png', width: 100, height: 100 }} 
/>

In most cases this can be fixed by:

  • iOS: adding accessible={false} and/or accessibilityElementsHidden
  • Android: adding importantForAccessibility="no-hide-descendants"

Steps to reproduce

  1. Get repro repo: https://github.com/mdjastrzebski/rn-repro-aria-hidden
  2. Run it under screen reader on iOS & Android

React Native Version

0.81.0

Affected Platforms

Runtime - Android, Runtime - iOS

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

info Fetching system and libraries information...
System:
  OS: macOS 15.6
  CPU: (11) arm64 Apple M3 Pro
  Memory: 107.27 MB / 36.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 22.17.1
    path: ~/.nvm/versions/node/v22.17.1/bin/node
  Yarn:
    version: 3.6.4
    path: ~/.nvm/versions/node/v22.17.1/bin/yarn
  npm:
    version: 10.9.2
    path: ~/.nvm/versions/node/v22.17.1/bin/npm
  Watchman:
    version: 2025.07.28.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.15.2
    path: /Users/mdj/.rbenv/shims/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 24.5
      - iOS 18.5
      - macOS 15.5
      - tvOS 18.5
      - visionOS 2.5
      - watchOS 11.5
  Android SDK:
    API Levels:
      - "35"
      - "36"
    Build Tools:
      - 35.0.0
      - 36.0.0
    System Images:
      - android-35 | Google Play ARM 64 v8a
      - android-36 | Google Play ARM 64 v8a
    Android NDK: Not Found
IDEs:
  Android Studio: 2025.1 AI-251.25410.109.2511.13752376
  Xcode:
    version: 16.4/16F6
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.16
    path: /usr/bin/javac
  Ruby:
    version: 3.4.5
    path: /Users/mdj/.rbenv/shims/ruby
npmPackages:
  "@react-native-community/cli":
    installed: 20.0.0
    wanted: 20.0.0
  react:
    installed: 19.1.0
    wanted: 19.1.0
  react-native:
    installed: 0.81.0
    wanted: 0.81.0
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: true
  newArchEnabled: false

Stacktrace or Logs

n/a

MANDATORY Reproducer

https://github.com/mdjastrzebski/rn-repro-aria-hidden

Screenshots and Videos

iOS

AriaHidden.iOS.mp4

Android

AriaHidden.Android.mp4

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    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