-
Notifications
You must be signed in to change notification settings - Fork 723
docs: queryByRole new description option #1035
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: queryByRole new description option #1035
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's just create a new section for description
. name
will later have their own.
This ensures readers don't get overwhelmed with context when they just want to read about either one option
docs/queries/byrole.mdx
Outdated
don't have an accessible name but they do have a description.<br /> This would | ||
be the case for elements with | ||
[alertdialog](https://www.w3.org/TR/wai-aria-1.1/#alertdialog) role, where the | ||
`aria-describedby` attribute is used to describe the elements content. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From a spellchecker:
`aria-describedby` attribute is used to describe the elements content. | |
`aria-describedby` attribute is used to describe the element's content. |
or
`aria-describedby` attribute is used to describe the elements content. | |
`aria-describedby` attribute is used to describe the content of the element. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the catch 👍
Updated in this commit: 9da0a15
docs/queries/byrole.mdx
Outdated
</body> | ||
``` | ||
|
||
You can query an specific element like this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can query an specific element like this | |
You can query the specific element like this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this case, I think the right wording would be
You can query a specific element like this
since we want the user know he can select any specific element of those which have the same role.
Do you think we should actually use "the" instead?
(updated in this commit: 9da0a15)
@all-contributors please add @PaquitoSoft for docs |
I've put up a pull request to add @PaquitoSoft! 🎉 |
Docs for testing-library/dom-testing-library#1120