Closed zaicevas closed 1 year ago
You're right. This must get fixed. Are you able to submit a pull?
This comes from @testing-library/dom. I believe it's because this function doesn't handle aria-label
as a label. I'm not sure if it's a bug, or if it has a deeper accessibility reason, but the issue should be filed/fixed there.
Bug Report 🐛
Suggesting
getByText
overgetByLabelText
. As far as I understand,getByLabelText
is of higher priority thangetByText
, according to https://testing-library.com/docs/queries/about/#priorityTo Reproduce ✔️
Expected behavior 🤔
getByLabelText
is suggestedYour Environment 💻