Skip to content
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

HTMLCollection.forEach is not a function #3228

Closed
bradfrosty opened this issue Oct 21, 2021 · 1 comment
Closed

HTMLCollection.forEach is not a function #3228

bradfrosty opened this issue Oct 21, 2021 · 1 comment

Comments

@bradfrosty
Copy link

bradfrosty commented Oct 21, 2021

Product: axe-core

Expectation: Element.children does not use forEach directly

Actual: Element.children is relying on incorrect polyfill (fixed in core-js here)

Offending code is here

Motivation: This will eventually be broken when core-js is upgraded for axe-core via Babel


axe-core version: 4.3.3
axe-webdriver, extension or other integration version: n/a

Browser and Assistive Technology versions

For Tooling issues:
- Node version: 16
- Platform: Mac

Additional info

There are a few other references to children.forEach from the internal VirtualNode class. These treat children as actual arrays, and not the "array-like" HTMLCollection.

@dylanb
Copy link
Contributor

dylanb commented Oct 21, 2021

VirtualNode is not a Node, it has a proper array for children as can be seen in the constructor

@dylanb dylanb closed this as completed Oct 21, 2021
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

No branches or pull requests

2 participants