diff --git a/README.md b/README.md
index 8d67bcde..5d25e52b 100644
--- a/README.md
+++ b/README.md
@@ -197,6 +197,9 @@ const inputNode = getByLabelText('Username')
// For this case, you can provide a `selector` in the options:
const inputNode = getByLabelText('username', {selector: 'input'})
// and that would work
+// Note that will also work, but take
+// care because this is not a label that users can see on the page. So
+// the purpose of your input should be obvious for those users.
```
> Note: This method will throw an error if it cannot find the node. If you don't
@@ -712,12 +715,10 @@ light-weight, simple, and understandable.
Thanks goes to these people ([emoji key][emojis]):
-
| [
Kent C. Dodds](https://kentcdodds.com)
[๐ป](https://github.com/kentcdodds/react-testing-library/commits?author=kentcdodds "Code") [๐](https://github.com/kentcdodds/react-testing-library/commits?author=kentcdodds "Documentation") [๐](#infra-kentcdodds "Infrastructure (Hosting, Build-Tools, etc)") [โ ๏ธ](https://github.com/kentcdodds/react-testing-library/commits?author=kentcdodds "Tests") | [
Ryan Castner](http://audiolion.github.io)
[๐](https://github.com/kentcdodds/react-testing-library/commits?author=audiolion "Documentation") | [
Daniel Sandiego](https://www.dnlsandiego.com)
[๐ป](https://github.com/kentcdodds/react-testing-library/commits?author=dnlsandiego "Code") | [
Paweล Mikoลajczyk](https://github.com/Miklet)
[๐ป](https://github.com/kentcdodds/react-testing-library/commits?author=Miklet "Code") | [
Alejandro รรกรฑez Ortiz](http://co.linkedin.com/in/alejandronanez/)
[๐](https://github.com/kentcdodds/react-testing-library/commits?author=alejandronanez "Documentation") | [
Matt Parrish](https://github.com/pbomb)
[๐](https://github.com/kentcdodds/react-testing-library/issues?q=author%3Apbomb "Bug reports") [๐ป](https://github.com/kentcdodds/react-testing-library/commits?author=pbomb "Code") [๐](https://github.com/kentcdodds/react-testing-library/commits?author=pbomb "Documentation") [โ ๏ธ](https://github.com/kentcdodds/react-testing-library/commits?author=pbomb "Tests") | [
Justin Hall](https://github.com/wKovacs64)
[๐ฆ](#platform-wKovacs64 "Packaging/porting to new platform") |
| :---: | :---: | :---: | :---: | :---: | :---: | :---: |
| [
Anto Aravinth](https://github.com/antoaravinth)
[๐ป](https://github.com/kentcdodds/react-testing-library/commits?author=antoaravinth "Code") [โ ๏ธ](https://github.com/kentcdodds/react-testing-library/commits?author=antoaravinth "Tests") [๐](https://github.com/kentcdodds/react-testing-library/commits?author=antoaravinth "Documentation") | [
Jonah Moses](https://github.com/JonahMoses)
[๐](https://github.com/kentcdodds/react-testing-library/commits?author=JonahMoses "Documentation") | [
ลukasz Gandecki](http://team.thebrain.pro)
[๐ป](https://github.com/kentcdodds/react-testing-library/commits?author=lgandecki "Code") [โ ๏ธ](https://github.com/kentcdodds/react-testing-library/commits?author=lgandecki "Tests") [๐](https://github.com/kentcdodds/react-testing-library/commits?author=lgandecki "Documentation") | [
Ivan Babak](https://sompylasar.github.io)
[๐](https://github.com/kentcdodds/react-testing-library/issues?q=author%3Asompylasar "Bug reports") [๐ค](#ideas-sompylasar "Ideas, Planning, & Feedback") | [
Jesse Day](https://github.com/jday3)
[๐ป](https://github.com/kentcdodds/react-testing-library/commits?author=jday3 "Code") |
-
This project follows the [all-contributors][all-contributors] specification.
diff --git a/src/__tests__/element-queries.js b/src/__tests__/element-queries.js
index 43326413..f8fd4830 100644
--- a/src/__tests__/element-queries.js
+++ b/src/__tests__/element-queries.js
@@ -74,6 +74,12 @@ test('totally empty label', () => {
expect(() => getByLabelText('')).toThrowErrorMatchingSnapshot()
})
+test('getByLabelText with aria-label', () => {
+ // not recommended normally, but supported for completeness
+ const {queryByLabelText} = render()
+ expect(queryByLabelText('bat')).toBeInTheDOM()
+})
+
test('get element by its alt text', () => {
const {getByAltText} = render(