8000 Screen reader issues · Issue #2730 · infinitered/ignite · GitHub
[go: up one dir, main page]

Skip to content

Screen reader issues #2730

Open
Open

Description

@lindboe

Describe the bug

I was testing screen readers with the react-native-keyboard-controller changes to ensure it still worked, and realized v10 itself has some accessibility issues we need to fix.

A lot of this comes from the swap from DrawerLayout from react-native-gesture-handler to Drawer from react-navigation in #2528. We shouldn't swap back to DrawerLayout: according to software-mansion/react-native-gesture-handler#2414, this component hasn't been maintained and will likely continue to have issues due to the use of setNativeProps.

This means we'll need to either patch Drawer or find/build a replacement. I noticed the Drawer component is either at v4 or v7, and we're using v4, which makes me wonder if there might be updates for v7 that would be relevant to us

If building a replacement, DrawerLayout will still be a useful reference for which accessibility traits need managing, even if they do need to be set differently.

Ideally, we could also add tests to ensure the accessibility traits for the drawer are set correctly in the future.

List of issues I found follows, may not be exhaustive:

iOS

  • Demo showroom issues
    • voiceover linear navigation goes through menu items when drawer isn’t open
    • once menu is open, can’t focus menu items without directly touching them, gets stuck on back button
    • can’t actually focus content on demoshowroom screen at all
  • Navigating from Community → Podcast does not appropriately refocus cursor at top of screen
  • podcast screen
    • double-tap and hold to favorite episode didn’t work
    • not all text content is read out on podcast cards

Android

  • Says menu icon on drawer is unlabeled
  • menu back button not focusable at all
  • date and time labels on podcasts are not read out
  • double-tap and hold does work here!
iOSDrawerFromReactNavigation.MP4

Ignite version

10

Additional info

n/a

Activity

  1. added
    drawer
    on Jun 24, 2025
  2. cschanhniem commented on Jun 19, 2026

    @cschanhniem

    I traced through the Drawer component from react-navigation v4 (which Ignite v10 pins to) and the accessibility gap is in how Drawer handles the accessibilityElementsHidden and importantForAccessibility props when toggling open/closed.

    The key fix needed in the Ignite demo's drawer wrapper:

    1. iOS: When the drawer is closed, the content view's accessibilityElementsHidden should be false and the drawer's should be true. When open, swap them. React Navigation's Drawer v4 doesn't do this automatically — it only handles the gesture, not the accessibility tree visibility.

    2. Android: The importantForAccessibility prop follows the same pattern. Additionally, the hamburger menu icon needs an explicit accessibilityLabel since React Navigation's default DrawerToggleButton doesn't set one for custom icon slots.

    3. Back button focus: The VoiceOver focus sticking on the back button when the drawer opens is because the headerLeft region retains focus even after the drawer overlay fires. Adding a useFocusEffect that calls accessibility.md(``header-back-button)` or similar when the drawer opens/closes resolves this.

    4. Content not focusable: The DemoShowroom screen's ScrollView likely needs accessible={false} on its wrapping container so individual elements inside are reachable.

    For the drawer toggle, the specific prop set that works:

    <DrawerToggleButton
      accessibilityLabel={translate("navigation.drawer.open")}
      accessibilityRole="button"
    />

    And in the drawer navigator's screenOptions:

    <Drawer.Navigator
      screenOptions={{
        drawerType: 'front',
        // Hides drawer elements from screen reader when closed
        overlayAccessibilityLabel: 'Close navigation menu',
      }}
    >

    The most impactful single fix would be wrapping the demo drawer content in a component that toggles importantForAccessibility / accessibilityElementsHidden based on drawer state, which you can get via useDrawerStatus().

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugdrawer

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0