React Native, when to use accessibilityLabel and accessibilityLabelledBy

22 views Asked by At

So I have a lock symbol next to my input for passwords. My question is do I just apply the accessbility feature to the input zone? I assume so because I don't want redundency, but I'm also not sure if it's required to label the lock symbol as well.

My second question, do I use accessbilityLabel or accessibilityLabelledBy? Label is good for interactive elements, such as the input box, however LabelledBy is good for when another element already served as the visual label, I assume the input box with its name.

If I use LabelledBy, would I apply it to both the lock symbol & text zone?

I've tried looking around, but couldn't find something for my answer.

0

There are 0 answers