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

"TypeError: Assignment to constant variable" when testing some URLs #321

Open
malcomio opened this issue Dec 19, 2024 · 1 comment
Open

Comments

@malcomio
Copy link

Steps to reproduce

  1. install the bookmarklet
  2. visit one of the following URLs:
    1. https://www.transizionedigitale.it/
    2. https://www.neso.energy/
  3. click the bookmarklet

Expected result

The sniffer should run and report any issues

Actual result

The test does not complete
Errors in console:

Uncaught TypeError: Assignment to constant variable.
    at Object.testNullAltText (HTMLCS.js:24:223570)
    at Object.addNullAltTextResults (HTMLCS.js:24:222007)
    at Object.process (HTMLCS.js:24:221802)
    at m (HTMLCS.js:24:288483)
    at c (HTMLCS.js:24:288090)
    at Object.run (HTMLCS.js:24:287448)
    at HTMLCS.js:24:286284
    at HTMLCS.js:24:286545
    at h (HTMLCS.js:24:289153)
    at HTMLCS.js:24:289131

Originally raised as pa11y/pa11y#709

@malcomio
Copy link
Author

Using a debug version, the output is as follows:

HTMLCS.js:2758  Uncaught TypeError: Assignment to constant variable.
    at Object.testNullAltText (HTMLCS.js:2758:18)
    at Object.addNullAltTextResults (HTMLCS.js:2711:27)
    at Object.process (HTMLCS.js:2698:18)
    at _processSniffs (HTMLCS.js:5414:23)
    at _run (HTMLCS.js:5387:17)
    at Object.run (HTMLCS.js:5338:13)
    at HTMLCS.js:5259:24
    at HTMLCS.js:5282:22
    at _registerSniffs (HTMLCS.js:5465:22)
    at HTMLCS.js:5470:13

malcomio added a commit to malcomio/HTML_CodeSniffer that referenced this issue Dec 19, 2024
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

1 participant