Repository navigation
fix(text-input): keep the hidden placeholder empty - #5199
Conversation
|
Found potential problems with the pull request:
|
|
/review |
Apex Sentinel · ✅ Approve · review of
|
| Command | What it does |
|---|---|
@apex-sentinel-staging note <context> |
Adds context; Sentinel re-checks the cited code |
@apex-sentinel-staging pivot <why> |
Says the finding is wrong; Sentinel re-checks the cited code |
@apex-sentinel-staging like |
Marks the finding as useful |
@apex-sentinel-staging dislike <why> |
Marks it as not useful, so it is not raised again |
On this conversation, comment @apex-sentinel-staging review to run a full review once again.
Doberjohn
left a comment
There was a problem hiding this comment.
Thanks, the fix works on iOS, Android and web. Two things show up only with this change: a flash on focus (inline), and on Android the floating label reads "Labe" for about 0.7 s. Could you also trim the description under 1000 characters?
a891e95 to
4dcd88c
Compare
While the label rests over an empty field, the placeholder was ' '. A blank is read as the field's text: TalkBack announced an empty "Email" field as "Space, edit box" and dropped its label, and iOS reported the blank as the field's value. The hidden placeholder is now empty. Only iOS multiline fields keep ' ', which keeps their placeholder updating (react-native#31573), the reason the space was added. Follows callstack#5111, which made the empty field reachable (callstack#5197).
4dcd88c to
438fda5
Compare
|
Rebased on #5111, which fixed the reachability part of #5197, so this PR is now only the hidden placeholder: TalkBack still read the ' ' as “Space” instead of the label. I couldn’t reproduce the “Labe” label on Android after the rebase (it shows in full in every frame), so it likely came from the removed opacity change. Description is now under 1000 characters. |
Motivation
After #5111 an empty labelled
TextInputis reachable again, but its hidden placeholder is' ', and a blank is read as the field's text: TalkBack says "Space, Edit box", not the label, and iOS reports a blank value. The hidden placeholder is now empty; only iOS multiline keeps' '(react/react-native#31573).Related issue
Follows #5111 (#5197).
Screenshots / Videos
Test plan
On an empty
<TextInput label="Email" placeholder="[email protected]" />: TalkBack reads "Email, Edit box"; focusing shows the placeholder once the label floats.