Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat(ByRole): Allow filter by disabled state #1231

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

Open
eps1lon wants to merge 2 commits into testing-library:main
base: main
Choose a base branch
Loading
from eps1lon:feat/byrole-disabled

Conversation

Copy link
Member

@eps1lon eps1lon commented Mar 9, 2023
edited
Loading

Copy link

netlify bot commented Mar 9, 2023
edited
Loading

Deploy Preview for testing-library ready!

Name Link
🔨 Latest commit 3268d1a
🔍 Latest deploy log https://app.netlify.com/sites/testing-library/deploys/6409b14f18e644000857d53c
😎 Deploy Preview https://deploy-preview-1231--testing-library.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

<body>
<section>
<button disabled>Login</button>
<div role="alert" aria-disabled="false">Failed to login</button>
Copy link
Member

@MatanBobi MatanBobi Mar 10, 2023

Choose a reason for hiding this comment

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

Having the aria-disabled here seems a bit confusing to me.
Are we also filtering by aria-disabled or just by the disabled attribute? I think that we should explain it here so people will have a clear understanding.

Copy link
Member Author

Choose a reason for hiding this comment

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

We're filtering by things that are disabled according to the a11y tree. This applies to every filter option in ByRole.

This here includes examples.

How would you explain it do avoid confusions?

Copy link
Member

@MatanBobi MatanBobi Mar 25, 2023

Choose a reason for hiding this comment

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

</body>
```

you can get the "Login" button by calling
Copy link
Member

@MatanBobi MatanBobi Mar 25, 2023

Choose a reason for hiding this comment

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

Suggested change
you can get the "Login" button by calling
You can get the "Login" button by calling`getByRole('button', { disabled: true })` and the alert by calling `getByRole('alert', { disabled: false })`.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@MatanBobi MatanBobi MatanBobi left review comments

@timdeschryver timdeschryver timdeschryver approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /