Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accessibility focus order issue with ActionSheet for Talkback #2755

Open
ethan501 opened this issue Sep 25, 2023 · 1 comment
Open

Accessibility focus order issue with ActionSheet for Talkback #2755

ethan501 opened this issue Sep 25, 2023 · 1 comment
Labels
bug a bug in one of the components wontfix

Comments

@ethan501
Copy link

ethan501 commented Sep 25, 2023

Description

There is a bug where when I pass a custom header component to the renderTitle prop the focus order is incorrect. When the sheet opens the focus is placed on the header then when you swipe to go to the next item the focus moves down to the items passed into the options prop. Then on the next swipe it moves back into the custom header component. Then on the next swipe it abruptly moves down to the second option in the list. This bug only exists while using Talkback.

Related to

  • ActionSheet

Steps to reproduce

  1. Enable Talkback
  2. Open up an action sheet
  3. Swipe through the sheet
  4. Notice that the focus goes from the header to item one to the close button then to item two and then proceeds to navigate normally

Expected behavior

While navigating through the ActionSheet component, focus should be placed on the header/title of the sheet then on swipe move to the close button then on next swipe to the body of the ActionSheet where it navigates through it's children normally.

Code example

Action sheet

 <ActionSheet
      options={options}
      visible={props.isVisible}
      renderTitle={() => (
        <SheetHeading label="Sheet title" onDismiss={handleDismiss} />
      )}
      onDismiss={handleDismiss}
    />

Custom Header Component

const SheetHeading = (props: IProps) => {

  return (
      <View center>
        <Text
          accessibilityRole="header">
          {props.label}
        </Text>
        <Button
          onPress={props.onDismiss}
          iconSource={() => (
            <Icons.Close />
          )}
          accessibilityRole="button"
          accessibilityLabel="Close"
        />
      </View>
    </Accessibility.Wrapper>
  )
}

Environment

  • React Native version: 0.72.4
  • React Native UI Lib version: 7.7.0

Affected platforms

  • Android
@ethan501 ethan501 added the bug a bug in one of the components label Sep 25, 2023
Copy link

stale bot commented Feb 1, 2025

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Feb 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug a bug in one of the components wontfix
Projects
None yet
Development

No branches or pull requests

1 participant