Repository navigation
Description
Summary
Content inside <noscript> is treated as live DOM. A browser with scripting enabled parses <noscript> content as raw text (HTML Standard, the noscript element), so none of these resources load. Seven rules still report them.
Tracking snippets put a fallback pixel and iframe in <noscript>: Meta Pixel, GTM, TikTok and others. On a typical shop, every page gets these findings for markup that never runs.
Reproduce
Tested with v0.0.99 (darwin-arm64).
- Save as
noscript.html:
<!doctype html>
<html lang="en"><head>
<meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
<title>noscript fallback</title>
<link rel="stylesheet" href="/style.css">
<noscript><link rel="stylesheet" href="/noscript.css"></noscript>
</head><body>
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-XXXX" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<noscript><img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=1&ev=PageView&noscript=1"></noscript>
<noscript><script src="https://example.com/tracker.js?noscript=true"></script></noscript>
<h1>Test</h1></body></html>- Control page
control.html: the same file without the four<noscript>blocks. - Serve both:
python3 -m http.server 8090 - Run:
squirrel audit http://127.0.0.1:8090/noscript.html --http -m 1 -f json, then the same forcontrol.html
Actual
Reported for noscript.html and not for control.html:
| Rule | Message | Item |
|---|---|---|
a11y/frame-title |
1 iframe(s) without title attribute | iframe (www.googletagmanager.com) |
security/third-party-cookies |
2 known tracking domain(s) detected | www.facebook.com (pixel), www.googletagmanager.com (iframe) |
security/sri |
1 cross-origin resource without Subresource Integrity | https://example.com/tracker.js?noscript=true |
images/alt-text |
1 image(s) missing alt text | https://www.facebook.com/tr?id=1&ev=PageView&noscript=1 |
images/responsive-size |
1 small image(s) may be serving oversized files | tr (1x1, no srcset) |
perf/lcp-hints |
1 likely-LCP image loaded without preload | (the 1x1 pixel is the only image) |
perf/critical-request-chains |
2 critical request chain(s) found | CSS: /noscript.css, CSS: /style.css (control: only /style.css) |
Expected
Rules that describe what a browser loads or renders ignore <noscript> content, the same way a browser with scripting enabled does. Then noscript.html gets the same result as control.html.
Whether a rule should evaluate no-JS fallback content on purpose is your call. That would be a separate check, though, not the default.
Related: #424 (module scripts, fixed in #428) also came from rules counting resources that a browser does not load.
Activity
nc9 commentedon Oct 1, 2026
Thanks again for another clean repro. You're right: with scripting on,
<noscript>content is raw text, so those fallback pixels and iframes never load. We're fixing it once at the engine level so every rule that reads the DOM skips noscript content, rather than patching the seven rules one by one. Your snippet is the regression fixture, and a real iframe without a title outside noscript still fires. It lands with #435 in the next release.fix(rules): skip <noscript> content where rules describe what loads #434
fix(rules): noscript content, implicit ARIA roles and CSP host wildca…