Skip to content

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

Merged

Conversation

PaquitoSoft
Copy link
Contributor

@PaquitoSoft PaquitoSoft commented Apr 4, 2022

Copy link
Member

@eps1lon eps1lon left a 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

@PaquitoSoft
Copy link
Contributor Author

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

@eps1lon thanks for the guidance.

I created the new section in this commit: 2eb9777

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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From a spellchecker:

Suggested change
`aria-describedby` attribute is used to describe the elements content.
`aria-describedby` attribute is used to describe the element's content.

or

Suggested change
`aria-describedby` attribute is used to describe the elements content.
`aria-describedby` attribute is used to describe the content of the element.

Copy link
Contributor Author

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

</body>
```

You can query an specific element like this
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
You can query an specific element like this
You can query the specific element like this

Copy link
Contributor Author

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)

@eps1lon eps1lon merged commit 1af023f into testing-library:main Apr 5, 2022
@PaquitoSoft PaquitoSoft deleted the pr/role-filter-description-docs branch April 5, 2022 13:29
@timdeschryver
Copy link
Member

@all-contributors please add @PaquitoSoft for docs

@allcontributors
Copy link
Contributor

@timdeschryver

I've put up a pull request to add @PaquitoSoft! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants