dequelabs / dequelabs/axe-core
Question about object-alt issue when used with NodeJs & JSDOM
- Dominant language
- JavaScript
- Stars
- 7.5k
- Forks
- 933
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 17
Description
### Product
axe-core
### Question
I'm using axe-core with NodeJS and JSDOM (see [this issue](https://github.com/dequelabs/axe-core/issues/3408) for more background) and noticed an issue when running `object-alt`. I get the error `TypeError: range.getClientRects is not a function - feature unsupported in your environment. Skipping object-alt rule.` I assume this is from my environment being a virtual DOM.
I looked up where this was happening and found [object-is-loaded-matches.js](https://github.com/dequelabs/axe-core/blob/cb51be4e3ed69e8e8b3725cab5ad1a4671f64c0c/lib/rules/object-is-loaded-matches.js) which was added in Oct 2022 and seems to only be used for `object-alt`. There seems to be a param documented for a virtual node (currently line 10) but I don't see one being provided or used. Is there some way this could be fixed to allow me to run this rule on a virtual DOM like JSDOM, or am I not doing something I need to on my end to run this correctly?
Recreated with the example violative code found at https://dequeuniversity.com/rules/axe/4.7/object-alt.
Thanks in advance for any context or help you can provide!
Contributor guide
Assessment
This issue has not been assessed yet.