-
Notifications
You must be signed in to change notification settings - Fork 83
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
[BUG]: Spurious "Form control element <input> has no associated label" error #2103
Comments
@wkeese can you please also post your HTML test case? thanks |
I already did, but here it is again:
Yes, 3.1.78.
No error in Firefox, only Node.
My config settings are:
That's also what I tested on Firefox: Cross reference:
|
@wkeese I just wanted to confirm you used an HTML fragment to test. I did a quick test and I didn't get the error on the element. The results were the same in Chrome, Firefox, and NodeJs. Need more investigation on this. |
When I run the Chrome and Firefox Checker in the devtools extension, I do not see any errors flagged on the testcase. Node boilerplate for scanning local files |
Guys, I'm not claiming that accessibility-checker fails for every single theoretical test case, I'm saying that it fails for the test case I gave in this ticket description. Was that unclear? Or are just trying to prove that accessibility-checker works in other cases? Here's another way to reproduce the problem. Follow these instructions exactly and you should see the problem: git clone git@github.com:wkeese/accessibility-checker-tests.git
cd accessibility-checker-tests
npm install
npx jest label.test.js
@shunguoy - The original test was using RTL, but I reduced it to the exact test I wrote in the initial description. Did you try using the exact test case I gave?
Yes, that's what I see too. It only fails in Node. |
@wkeese yes, I used your test case in the Node test and didn't get the same error. |
@shunguoy - Hmm, can you try these commands and post the output here? git clone git@github.com:wkeese/accessibility-checker-tests.git
cd accessibility-checker-tests
npm install
npx jest label.test.js |
@wkeese seems I don't have permission to your test repo. |
@shunguoy - Hmm, free github accounts are public by definition, but try this instead to check it out:
|
@wkeese I can duplicate the error using your test package. The only difference to me is that you use Jsdom in your test. I am not sure if that is the cause of the error. |
Great!
I agree, that's a working theory. I ran a few JSDOM tests like Out of curiosity... are you implying that https://github.com/IBMa/equal-access/tree/master/accessibility-checker (aka "Accessibility checker for Node") sometimes uses Puppeteer, and scans for errors using headless Chrome? Or something like that? In any case, it's supposed to work using standard JSDOM, as shown by https://github.com/IBMa/equal-access/tree/master/accessibility-checker/boilerplates/jest and https://github.com/IBMa/equal-access/tree/master/accessibility-checker/boilerplates/jest-customRS. |
Our tests focus on Chrome, Firefox, and Edge which most of our customers use. We also use Puppeteer (a sort of embedded Chrome) for automated tests. The browsers do have differences that affect accessibility test results. |
@shunguoy - But I didn't ask about your tests, I asked how https://github.com/IBMa/equal-access/tree/master/accessibility-checker (aka "Accessibility checker for Node") runs internally. Does https://github.com/IBMa/equal-access/tree/master/accessibility-checker (aka "Accessibility checker for Node") run completely within Node? Or does it sometimes use Puppeteer, and scan for errors using headless Chrome? Or something like that? |
@wkeese our NodeJS test uses Puppeteer. |
Even in this case? If so, something must be getting corrupted in the HTML page sent to Puppeteer. Also, this problem started recently. It was working on accessibility-checker version 3.1.76 one month ago, but now it fails, both on accessibility-checker 3.1.76 (the same version as before) and 3.1.78. So something changed outside of accessibility-checker, like the ruleset or some other dependency. |
See Tom's responses in related [internal] slack thread dated Nov 27 |
Project
accessibility-checker for Node
Browser
No response
Operating system
MacOS
Description
I get a spurious error when running from Node:
It works when run from Chrome.
Version tested:
Steps to reproduce
cd boilerplates/jest
npm install
Update basic.test.js as:
Output will include
Version tested:
The text was updated successfully, but these errors were encountered: