material-components / material-components/material-components-android

[TextInputLayout] HelperText and Talkback compatibility; able to turn off its accessbility on demand

Offen
#4,512 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

feature request Widget: TextField
Vorherrschende Sprache
Java
Sterne
17.4k
Forks
3.2k
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

Is your feature request related to a problem? Please describe.
When a TextInputLayout has helperText enabled set to true and appropriate texts assigned to the attribute, Talkback reads aloud the helperText on each character input and deletion. When I have it showing, talkback highlights the entire textinputlayout, only reading the helperText but not reading the actual hint nor input of the textinputedittext until an additional swipe to navigate to the field is executed. I've tried making a custom AccessbilityDelegate to work around these default behavior, but I've come across scenario as well where I cannot make the helper text non-accessible like I would on a view element with View.importantForAccessibility attribute.

Describe the solution you'd like
I like the accessbilitydelegate idea I had so I'm keeping it; but to simulate a better talkback experience, I opted to removing helperText entirely when talkback is enabled and using a custom textview for similar effect, but I can switch off its accessibility and add its description to the custom accessibilitydelegate for the textinputlayout. Naturally, this created a few unsavory conditions I had to make to balance between non-talkback and talkback modes; same conditons if not more for error handling.

We also happily accept pull requests.

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne mit dem Accessibility-Verhalten von TextInputLayout's helperText und dem im Issue beschriebenen benutzerdefinierten AccessibilityDelegate; untersuche, wie TextInputEditText und der TalkBack-Fokus zugänglich gemacht werden. Die Arbeit ist abgeschlossen, wenn Aufrufer steuern können, ob helperText bei Bedarf zugänglich ist, während ein angemessener Zugriff auf den hint und die Eingabe erhalten bleibt und das Verhalten in TalkBack-Szenarien überprüft ist.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
android, java
Bereich
accessibility, mobile
Issue-Typ
Feature
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

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