React Native version: 0.60
add an accessibilityLabel to an element
build your app
use a tool (we are using Appium) to read/interact with your accessibilityID on your Android app
your accessibility ID presents an additional coma and space
Describe what you expected to happen:
Expect same behavior than .59 version
to have accessibilityID = TestLabel
Snack, code example, or link to a repository:
accessibilityLabel={'TestLabel'}
onPress={() => this.onPressLogin()}
hierarchy={ButtonHierarchy.Secondary}
/>
Any update ? I am having the same issue. In my projects I used AccessibilityLabel for automated tests. After update all tests get failure.
Hello,
Unfortunately still didn't get any support :(
Regards
On Fri, Jul 26, 2019, 21:13 Cássio Seffrin notifications@github.com wrote:
Any update ? I am having the same issue. In my projects I used
AccessibilityLabel for automated tests. After update all tests get failure.—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/facebook/react-native/issues/25581?email_source=notifications&email_token=AK3D55NLB5VUNKGIJ6QBZMDQBNLFRA5CNFSM4H7XQYPKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD25S55Q#issuecomment-515583734,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AK3D55LAVVPFJ3UI5IU7OHLQBNLFRANCNFSM4H7XQYPA
.
It doesn't matter if you inspect the element with Appium or just with the Android Studio Layout inspector (because Appium translates the the views to XML), the , is being added to each accessibilityLabel, see the image below.
I've also been trying to find the code in RN that is responsible for the translation in Android to translate the accessibilityLabel to content-desc, but I couldn't find it. If someone can point me to that I can try to fix it with a PR

It looks like this is the suspect PR that broke things for us: https://github.com/facebook/react-native/commit/1aeac1c
And this line where it's appending the comma even though it may not be necessary: https://github.com/facebook/react-native/blob/1aeac1c62528004d994200664368dc85fba1795d/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManager.java#L163
@FutureGUIs
Thanks for finding this, I made a remark in the PR and asked for the background of this change
Seems it's been fixed with https://github.com/facebook/react-native/commit/812abfd and the fix was released with 0.60.5. I think it might could be closed now?
I just give a try with 0.60.5 and I still have that coma after the accessibility label I will clean everyting and update the status asap
0.60.5 fixed issue for me.
Same on my side It is working again. Thanks for that!!!
Updated my app to 0.60.5 and it works, @kelset, I think this issue can be closed now
git add .
git commit -m 'update v0.60'
react-native upgrade
These steps above have solved the issue, Thks!
Most helpful comment
Any update ? I am having the same issue. In my projects I used AccessibilityLabel for automated tests. After update all tests get failure.