Skip to content

Feature: *ByLabelText to support accessibilityLabelledBy #1183

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
mdjastrzebski opened this issue Oct 17, 2022 · 4 comments
Closed

Feature: *ByLabelText to support accessibilityLabelledBy #1183

mdjastrzebski opened this issue Oct 17, 2022 · 4 comments
Labels

Comments

@mdjastrzebski
Copy link
Member

Describe the Feature

Currently when using *ByLabelText it only gets the label value from accessibilityLabel props. The goal of this request is to get it also from control referred by accessibilityLabelledBy prop if present. This props refers to other view using its nativeID identifier.

Possible Implementations

  • expand current *ByLabelText predict to analyse both accessibilityLabel and text content of view referenced by accessibilityLabelledBy.
  • in the initial implementation we could assume that target view is Text, as most natural type for labels. Later we could use existing getNodeByText function to get its text.
@pafry7
Copy link
Contributor

pafry7 commented Oct 19, 2022

Hey @mdjastrzebski, I would like to work on this one.

@mdjastrzebski
Copy link
Member Author

Go ahead @pafry7 !

@AugustinLF
Copy link
Collaborator

in the initial implementation we could assume that target view is Text, as most natural type for labels. Later we could use existing getNodeByText function to get its text.

Please do that in the same, I don't think it'd make things really more complicated, and it could lead to a confusing error if we don't.

@mdjastrzebski
Copy link
Member Author

Resolved by #1191

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants