From 507725c9359b7693535ac0d2f2a4acf67dfea2c1 Mon Sep 17 00:00:00 2001 From: Paul Bakaus Date: Fri, 24 Jul 2026 16:16:13 -0700 Subject: [PATCH] Harden detector against form.id shadowing and gradient/non-rendered false positives MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes three detector bugs that surfaced on real-world (Shopify) URL scans: #407 — DOM named-property shadowing crash. On a
with a named control like (every Shopify product form), HTMLFormElement's [LegacyOverrideBuiltIns] behavior makes `form.id` return the input element, not the id string, so `elId.startsWith(...)` throws and aborts the whole scan. Read the id via getAttribute whenever `el.id` is not a string, at all three sites: checkQuality (checks.mjs) and collectBrowserFindings + generateSelector (browser/injected/index.mjs). Regenerated the browser bundle. #408 — tiny-text / undersized-ui-text flagged non-rendered elements. On sites that set html{font-size:62.5%} the root computes to 10px, so + + + + + + + + +
Hidden display-none block of body text long enough to exceed twenty characters.
+ + +

Invisible visibility-hidden paragraph copy that is longer than the twenty char gate.

+ + +

This is real rendered body copy at 10px that is definitely long enough to flag.

+ + + + + + diff --git a/tests/fixtures/antipatterns/shadowed-form-id.html b/tests/fixtures/antipatterns/shadowed-form-id.html new file mode 100644 index 000000000..ccc1cf473 --- /dev/null +++ b/tests/fixtures/antipatterns/shadowed-form-id.html @@ -0,0 +1,50 @@ + + + + + +Shadowed form.id regression fixture + + + +
+

Impeccable Test Product

+

$49.00

+ + + + + + + + + + + +
+ + +