Skip to content

Tooltip: the wrapper is a focus stop of its own and hides its child's role #5282

Open

Description

@Doberjohn

Current behaviour

Tooltip wraps its child in a pressable view, and that view becomes a stop of its own:

  • Android: each wrapped control is two keyboard and TalkBack stops, the wrapper first. The wrapper has no role, no label and no focus indicator, and TalkBack reads only the icon's glyph there. The child comes next.
  • Web: the wrapper is a div with tabindex="0", no role and no label, before the child's button.
  • iOS: the wrapper replaces the child as the accessibility element. It's named after the child but has no button role, so VoiceOver reads a labelled FAB without "Button", and a child with no label, such as <FAB icon="plus" />, is a silent stop.

The same wrapper stretches to the width of a column, so a tap well beside a wrapped IconButton or FAB runs its onPress. 6.0.0-alpha.3 does the same.

Expected behaviour

One stop per control, the child's, with its own role, label and focus indicator, and only the child's own box responds to presses.

How to reproduce?

  1. Render <Tooltip title="Compose"><FAB icon="pencil" aria-label="Compose" onPress={onPress} /></Tooltip>.
  2. On Android or web, Tab to it with a hardware keyboard (with TalkBack on Android to hear it). On iOS, swipe to it with VoiceOver.
  3. For the press area, put <Tooltip title="Like"><IconButton icon="heart" aria-label="Like" onPress={onPress} /></Tooltip> in a ScrollView and tap well to the right of the icon.

Your Environment

software version
ios 27.0.1 (iPhone 13 Pro), 27.2 (simulator)
android 13 (emulator), TalkBack 14.2
web Chromium
react-native 0.88.1 (New Architecture)
react-native-web 0.21.4
react-native-paper main (fbf9006)
expo sdk 58
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

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions