-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Description
Describe the feature you'd like:
For many apps the labels of elements are subject to the most potential change and volatility.
In many cases makes much more sense to reference by id f.ex when developing i18n apps.
Suggested implementation:
getByTestId a shortcut to container.querySelector([data-testid="${yourId}"])
Simply add getById a shortcut to container.querySelector([id="${yourId}"])
Teachability, Documentation, Adoption, Migration Strategy:
Provide whatever docs to recommend it in some cases while not in others. I generally disagree with using text labels to reference HTML items as they are the most volatile in any app so it defeats the purpose IMO (+20 years web dev experience). But whatever rocks your boat.
Cheers.
tiborsaas
Metadata
Metadata
Assignees
Labels
No labels