Accesible Label on TextInput

Offen
#4,914 2 Kommentare 0 Reaktionen 1 zugewiesene Person Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

@azizbecha arbeitet bereits daran.

Seit 10.5.2026.

Bewertung

Dieses Issue wurde noch nicht bewertet.

Beschreibung

feature request

My Problem:
Currently, there is no streamlined way to provide a custom accessibility label specifically for the TextInput label or to override how screen readers announce "required" fields.

When a label uses a visual indicator like an asterisk (e.g., E-Mail *), VoiceOver reads it literally as "E-Mail Star" or "E-Mail Asterisk". This is confusing for users; the screen reader should ideally announce the semantic intent: "E-Mail, required."

Suggested solution:
I propose adding an accessibilityLabel (or labelAccessibilityLabel) prop to the TextInput component.

Behavior: If provided, this string would be used by the screen reader to identify the field, allowing developers to pass "E-Mail, required" while keeping the visual label as "E-Mail *".

Implementation: This prop should map directly to the underlying native accessibility labels (accessibilityLabel on React Native or aria-label on Web).

Alternatives you've considered
I have attempted several workarounds with limited success:

Custom Label Component: Passing a custom Text component with accessibilityLabel and accessible={true}.

Visually Hidden Text (SR-Only): Wrapping two components in a View—one visually hidden for screen readers containing the "Required" text, and one visible to sighted users with importantForAccessibility="no-hide-descendants".

Vorherrschende Sprache
TypeScript
Sterne
14.5k
Forks
2.3k
Ø Merge
3 T. 14 Std.
Gemergte PRs (30 T.)
12

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus callstack/react-native-paper

Alle Issues in callstack/react-native-paper

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.