<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: ClearPatch</title>
    <description>The latest articles on DEV Community by ClearPatch (@clearpatch).</description>
    <link>https://dev.to/clearpatch</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4267729%2F67afa4bc-00df-47cf-b4de-021d3fc39ca1.png</url>
      <title>DEV Community: ClearPatch</title>
      <link>https://dev.to/clearpatch</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/clearpatch"/>
    <language>en</language>
    <item>
      <title>Why uninstalling a Shopify app leaves dead scripts in theme.liquid (and how to patch Draft .zip themes safely)</title>
      <dc:creator>ClearPatch</dc:creator>
      <pubDate>Thu, 26 Nov 2026 21:43:43 +0000</pubDate>
      <link>https://dev.to/clearpatch/why-uninstalling-a-shopify-app-leaves-dead-scripts-in-themeliquid-and-how-to-patch-draft-zip-16jc</link>
      <guid>https://dev.to/clearpatch/why-uninstalling-a-shopify-app-leaves-dead-scripts-in-themeliquid-and-how-to-patch-draft-zip-16jc</guid>
      <description>&lt;p&gt;If you have ever uninstalled four or five apps from a Shopify store, re-ran PageSpeed Insights, and watched mobile Total Blocking Time barely budge, your theme probably isn't at fault.&lt;/p&gt;

&lt;p&gt;The moment you click &lt;strong&gt;Uninstall&lt;/strong&gt; on an older review, popup, or analytics app in Shopify Admin, Shopify immediately revokes that app's API token. Any legacy &lt;code&gt;&amp;lt;script src="..."&amp;gt;&lt;/code&gt; tag or &lt;code&gt;{% render %}&lt;/code&gt; snippet injected directly into &lt;code&gt;layout/theme.liquid&lt;/code&gt; gets stranded behind because the vendor no longer has write permission to clean up after itself. Every mobile shopper still pays that main-thread parse and network cost on every page load.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight liquid"&gt;&lt;code&gt;&lt;span class="cp"&gt;{%&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;comment&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="cp"&gt;%}&lt;/span&gt;
  Common culprit in layout/theme.liquid after deleting legacy apps:
  The app is gone from Shopify Admin, but its blocking tag still fires on every visit.
&lt;span class="cp"&gt;{%&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;endcomment&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="cp"&gt;%}&lt;/span&gt;
&lt;span class="cp"&gt;{%&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;comment&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="cp"&gt;%}&lt;/span&gt; &lt;span class="nt"&gt;&amp;lt;script&lt;/span&gt; &lt;span class="na"&gt;src&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"https://cdn.old-popup-vendor.example/widget.min.js"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt; &lt;span class="cp"&gt;{%&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;endcomment&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="cp"&gt;%}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Why $50/mo "Accessibility Overlays" Make It Worse
&lt;/h2&gt;

&lt;p&gt;At the same time, merchants trying to pass &lt;strong&gt;WCAG 2.2 AA&lt;/strong&gt; and &lt;strong&gt;European Accessibility Act (&lt;code&gt;EN 301 549&lt;/code&gt;)&lt;/strong&gt; checks keep getting pitched JavaScript "accessibility overlay" widgets. Those widgets ship another &lt;code&gt;300KB+&lt;/code&gt; bundle onto the storefront without fixing the actual Liquid or DOM markup underneath:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Sub-24px tap targets:&lt;/strong&gt; Compact &lt;code&gt;16px&lt;/code&gt; color swatches and quantity steppers still fail WCAG 2.2 rule &lt;code&gt;2.5.8&lt;/code&gt; (&lt;code&gt;24x24px&lt;/code&gt; minimum target size).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Unlabeled icon controls:&lt;/strong&gt; SVG-only cart, search, and drawer close buttons still miss accessible &lt;code&gt;aria-label&lt;/code&gt; names.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Alpha-blended contrast failures:&lt;/strong&gt; Translucent sale pills over hero photography still fail &lt;code&gt;4.5:1&lt;/code&gt; computed RGBA contrast.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="cm"&gt;/* Scoped Shopify Custom CSS (&amp;lt;= 1,500 chars) fixes real DOM metrics with 0 runtime JS */&lt;/span&gt;
&lt;span class="nc"&gt;.product-form__input&lt;/span&gt; &lt;span class="nt"&gt;input&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nt"&gt;type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"radio"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nt"&gt;label&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="nc"&gt;.quantity__button&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;min-width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;24px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;min-height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;24px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nt"&gt;button&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nt"&gt;focus-visible&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="nt"&gt;a&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nt"&gt;focus-visible&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="nt"&gt;summary&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nt"&gt;focus-visible&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;outline&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;2px&lt;/span&gt; &lt;span class="n"&gt;solid&lt;/span&gt; &lt;span class="n"&gt;currentColor&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;outline-offset&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;2px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  A Safe 3-Step Workflow Before Touching Live Theme Code
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Duplicate or export into an Unpublished Draft first:&lt;/strong&gt; Never edit live &lt;code&gt;theme.liquid&lt;/code&gt; in production. Export your theme &lt;code&gt;.zip&lt;/code&gt; (or duplicate it in Shopify Admin) so every change can be tested via &lt;code&gt;?preview_theme_id&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Audit rendered DOM + third-party network requests:&lt;/strong&gt; Measure computed foreground/background RGBA contrast across parent alpha layers, check interactive bounding boxes against &lt;code&gt;24x24px&lt;/code&gt;, and flag script domains firing from uninstalled apps.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Comment out dead script tags + apply scoped CSS:&lt;/strong&gt; Comment out orphaned vendor tags inside the Draft copy and keep accessibility layout fixes inside a compact Custom CSS block instead of adding another third-party script.&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  Testing this automatically without handing over store logins
&lt;/h3&gt;

&lt;p&gt;I got tired of running those checks by hand and watching small store owners hand over Shopify collaborator access or pay $400+ just to wait two days for a PDF report, so we built &lt;strong&gt;&lt;a href="https://useclearpatch.com" rel="noopener noreferrer"&gt;ClearPatch&lt;/a&gt;&lt;/strong&gt; and took it live today.&lt;/p&gt;

&lt;p&gt;It runs a deterministic, zero-cookie 1-page scan right from the browser (checking leftover ghost scripts, WCAG 2.2 &lt;code&gt;24x24px&lt;/code&gt; tap targets, computed alpha contrast, and accidentally exposed client-bundle API keys like unmasked Supabase or Stripe tokens), and lets you drop in a Shopify theme &lt;code&gt;.zip&lt;/code&gt; to get back a patched &lt;strong&gt;Unpublished Draft &lt;code&gt;.zip&lt;/code&gt;&lt;/strong&gt; in seconds with zero store logins.&lt;/p&gt;

&lt;p&gt;If you maintain Dawn or OS 2.0 themes and want to throw a weird storefront URL at the free 1-page check on &lt;a href="https://useclearpatch.com" rel="noopener noreferrer"&gt;useclearpatch.com&lt;/a&gt;, let me know in the comments if any selector trips a false positive.&lt;/p&gt;

</description>
      <category>shopify</category>
      <category>webdev</category>
      <category>performance</category>
      <category>a11y</category>
    </item>
  </channel>
</rss>
