Skip to content

Rules treat <noscript> content as live DOM (frame-title, sri, alt-text, lcp-hints, critical-request-chains, ...) #434

Closed

Description

@deniskern

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).

  1. 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>
  1. Control page control.html: the same file without the four <noscript> blocks.
  2. Serve both: python3 -m http.server 8090
  3. Run: squirrel audit http://127.0.0.1:8090/noscript.html --http -m 1 -f json, then the same for control.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

  1. added
    bug
    P1
    size: M
    rules
    on Oct 1, 2026
  2. nc9 commented on Oct 1, 2026

    @nc9
    Contributor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1bugrulessize: M

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions