Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/queries/about.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ possible. With this in mind, we recommend this order of priority:
experience of interacting with these attributes varies greatly across
browsers and assistive technology.
1. `getByAltText`: If your element is one which supports `alt` text (`img`,
`area`, and `input`), then you can use this to find that element.
`area`, `input`, and any custom element), then you can use this to find that element.
1. `getByTitle`: The title attribute is not consistently read by
screenreaders, and is not visible by default for sighted users
1. **Test IDs**
Expand Down
2 changes: 1 addition & 1 deletion docs/queries/byalttext.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ getByAltText(
```

This will return the element (normally an `<img>`) that has the given `alt`
text. Note that it only supports elements which accept an `alt` attribute:
text. Note that it only supports elements which accept an `alt` attribute or [custom elements](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements) (since we can't know if a custom elements implements `alt` or not):
[`<img>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img),
[`<input>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input),
and [`<area>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/area)
Expand Down