-
Notifications
You must be signed in to change notification settings - Fork 466
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
'getByRole' doesn't find a table with a name specified by <caption> #570
Comments
@eps1lon |
This likely needs a fix in https://github.com/eps1lon/dom-accessibility-api. Would be great to have a test in https://github.com/eps1lon/dom-accessibility-api/blob/master/sources/__tests__/accessible-name.js and then fix it. I suspect that I didn't consider |
@eps1lon Thanks for the insights, I will try to work on the |
Feel free to open PR once you get stuck. It's easier to discuss issues with actual code. If you have a test but are stuck with the implementation somebody else can fix the issue based on your test. |
@Tolsee I've put up a fix for that since a similar fix was merged yesterday. |
🎉 This issue has been resolved in version 7.5.7 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Cool! Thank you all! |
Hello everyone and thanks for the work done.
I'm having what i consider an error when trying to locate a
<table>
with a<caption>
inside.@testing-library/dom
version: "6.16.0"--
@testing-library/react
: "9.5.0";--
@types/jest
: "24.9.1";-- with env
jest-environment-jsdom-sixteen
: "^1.0.3";-- node: v12.16.3
Relevant code or config:
A sample test:
my 'package.json' file
What I did:
With the configuration and code above, i ran
npm test
.What happened:
As output for this specific test, i had:
Reproduction:
This repository reproduces the problem (forked from
dom-testing-library-template
).Problem description:
As described in WAI-ARIA Authoring Practices 1.1:
Suggested solution:
'getByRole' should consider
<caption>
as name if it exists inside table and "the table element does not have aria-label or aria-labelledby".The text was updated successfully, but these errors were encountered: