-
Notifications
You must be signed in to change notification settings - Fork 469
Closed
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is neededneeds discussionWe need to discuss this to come up with a good solutionWe need to discuss this to come up with a good solution
Description
Describe the feature you'd like:
The aria-labelledby
attribute doesn't require the labeling element to be a <label>
tag, but dom-testing-lib only searches for label
s in queryByLabelText
.
I'd like to add a way to query for anything by ARIA label, which would allow doing things like selecting a card item by its heading text and then doing scoped queries for related elements like an "edit" button.
This would largely replace the need for workarounds like getByText
-> .$closest()
parent testid.
Suggested implementation:
Describe alternatives you've considered:
Teachability, Documentation, Adoption, Migration Strategy:
ajsaraujo
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is neededneeds discussionWe need to discuss this to come up with a good solutionWe need to discuss this to come up with a good solution