Comments (3)
Hello! My team uses Appium for e2e tests, which does accessibility label lookups to find elements. On Android, this translates to looking up elements by their content description.
We've been unable to grab react-native-navigation tabs by their testID, because the content description contains other accessibility text:
Would you accept a PR setting the content description of the tabs to their testID instead of what they are now?
Hey @talenfisher,
Today we are using tags for test ids, Appuim can use tags when using Espresso only, but, in order to use contentDescription
you may consider apps that use contentDescription
for its intended usage, and prevent clash with values of such attribute.
My suggestion is to plan a way to switch contentDescription
based on the environment, test or production, which can be even generic for each view. wdyt?
from ahbottomnavigation.
My suggestion is to plan a way to switch
contentDescription
based on the environment, test or production
I like that - good call.
which can be even generic for each view. wdyt?
By this, do you mean relying on a property passed down through react-native-navigation to determine whether contentDescription or viewtag should be used for the testID? I'm not sure I'd want to do this for each individual tab. However, if it's just a single property that decides this for every tab in the bottom navigation, I think that is definitely preferable.
from ahbottomnavigation.
yup, on android for each view you can call setContentDescription
and that simulates the accessibility id, but, I found it troublesome, see this old discussion, it might give you a basic idea of what issues you may face, especially using TextViews
, EditTexts
and other non-image views.
from ahbottomnavigation.
Related Issues (2)
- jCenter issue HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ahbottomnavigation.