Skip to content

TextInput: VoiceOver problems on iOS (a multiline field's label isn't spoken, the label is lost after toggling multiline, the placeholder is read twice) #5352

Backlog

Description

@Doberjohn

Current behaviour

Four problems with VoiceOver on a real iPhone:

A multiline field's label is never spoken. With multiline, an empty field reads "Text field, Double-tap to edit." (no label, placeholder or supporting text); focused, "Placeholder, Text field, Is editing, ..."; filled, "Text field, Is editing, Abc, ..., Supporting text". Paper passes the same aria-label as for a single-line field (TextInput/utils.ts), so the cause may be React Native's multiline text view on iOS (not debugged).

The label and hint are lost after multiline is switched on and off. The field then reads "Abc, Text field, Double-tap to edit.", twice in a row. After the app restarts, the same field reads "Label, Text field, Is editing, Abc, ..., Supporting text". Maybe switching multiline swaps the native view without applying the label and hint again (not verified).

The placeholder is read twice once the label has floated. A focused, empty single-line field reads "Label, Text field, Is editing, Placeholder, Character mode, insertion point at start, Placeholder, Supporting text": the placeholder as the value and again in the hint. It is read once on first focus.

With Speak Hints off, the placeholder, supporting text and error aren't read at all. Since #5111 they are in the field's accessibility hint (accessibilityHint on iOS), and VoiceOver users who turn off Settings, Accessibility, VoiceOver, Verbosity, Speak Hints hear only the label and the value.

Expected behaviour

  • A multiline field reads like a single-line one: "Label, Text field, Placeholder, Supporting text" when empty, and "Label, Text field, Is editing, Abc, ..." when filled.
  • The label and hint come back when multiline is turned off.
  • The placeholder is read once.
  • The placeholder, supporting text and error are still read with Speak Hints off.

How to reproduce?

Multiline:

  1. Render <TextInput multiline label="Label" placeholder="Placeholder" supportingText="Supporting text" />.
  2. With VoiceOver on, swipe to the field, double tap to focus it, type "abc", then swipe away and back.

Toggling multiline:

  1. Render a TextInput with label, placeholder, supportingText and a multiline prop the app can toggle, and type "abc" into it.
  2. Set multiline to true, then back to false, and swipe to the field with VoiceOver on.

Placeholder:

  1. Render <TextInput label="Label" placeholder="Placeholder" supportingText="Supporting text" />.
  2. With VoiceOver on, swipe to the empty field, double tap to focus it and wait for the label to float.
  3. Swipe right once, then left back to the field.

Speak Hints:

  1. Turn off Settings, Accessibility, VoiceOver, Verbosity, Speak Hints.
  2. Render <TextInput label="Label" placeholder="Placeholder" supportingText="Supporting text" /> and swipe to the field.

Preview

Screenshots can be attached.

What have you tried so far?

Checked on 6.0.0-alpha.5 on a real iPhone; the placeholder one also on 6.0.0-alpha.4. The multiline field read the same before 6.0.0-alpha.4. Not checked on Android. The multiline label is a known issue in the 6.0.0-alpha.5 release notes.

Your Environment

software version
ios iOS 27.2.1 and 27.0.1 (iPhone 13 Pro, VoiceOver)
android n/a
react-native 0.88.1 (New Architecture)
react-native-paper 6.0.0-alpha.5 (main at 56434eb)
node n/a
npm or yarn n/a
expo sdk 58 (expo 58.0.23)
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