Skip to content

Android Talkback reads title and/or message as a button #352

@dumathane

Description

@dumathane

We attempt to use the react-native-action-sheet library but have noticed that title and messages when passed are being read as buttons by android Talkback and includes a 'double tap to activate' after the read because of this. It looks like you'd need to include a accessibility role of 'text' to those two text components and ensure the parent containers don't interfere with that setup.

  _renderTitleContent = () => {
    const { title, titleTextStyle, message, messageTextStyle, showSeparators } = this.props;

    if (!title && !message) {
      return null;
    }

    return (
      <View>
        <View style={[styles.titleContainer, { paddingBottom: showSeparators ? 24 : 16 }]}>
          {!!title && <Text style={[styles.title, titleTextStyle]}>{title}</Text>}
          {!!message && <Text style={[styles.message, messageTextStyle]}>{message}</Text>}
        </View>
        {!!showSeparators && this._renderRowSeparator('title')}
      </View>
    );
  };

You can reproduce this and text the fix by setting up an action sheet with a title and having Talkback read it before and after.

Thanks, and let me know if you have any questions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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