<?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: FrozonFreak</title>
    <description>The latest articles on DEV Community by FrozonFreak (@frozonfreak).</description>
    <link>https://dev.to/frozonfreak</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%2F4119175%2Fb0030d26-db2b-45c8-aaa9-c4ac40bdad48.png</url>
      <title>DEV Community: FrozonFreak</title>
      <link>https://dev.to/frozonfreak</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/frozonfreak"/>
    <language>en</language>
    <item>
      <title>Don't silently show outdated information (Web HIG tip #21)</title>
      <dc:creator>FrozonFreak</dc:creator>
      <pubDate>Thu, 26 Nov 2026 07:22:43 +0000</pubDate>
      <link>https://dev.to/frozonfreak/dont-silently-show-outdated-information-web-hig-tip-21-32ng</link>
      <guid>https://dev.to/frozonfreak/dont-silently-show-outdated-information-web-hig-tip-21-32ng</guid>
      <description>&lt;p&gt;Someone opens example.com/orders at lunch and sees "12 open orders." The figure came from an earlier fetch. There is no time, no stale label, and no way to refresh. They start following up with customers whose orders already shipped this morning.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Web HIG tip #21 (Quick #36):&lt;/strong&gt; Stale data must be labeled or refreshed — do not silently show outdated information.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why it matters
&lt;/h2&gt;

&lt;p&gt;A number with no freshness cue looks current even when it is not:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;People can act on a total, a stock level, or a status that has already changed&lt;/li&gt;
&lt;li&gt;A background refetch that never tells anyone it failed leaves the old figure looking authoritative&lt;/li&gt;
&lt;li&gt;Clearing the page to a blank or a spinner while a refresh is in flight can be worse than showing the last known data with a label&lt;/li&gt;
&lt;li&gt;"It feels live" is not a freshness state. The interface has to say, or it has to update&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://github.com/frozonfreak/webhig/blob/3bbd5a9dc2b67955c3147a4d9f673412d251f32d/HIG-QUICK.md" rel="noopener noreferrer"&gt;Quick #36&lt;/a&gt; is Quick-only guidance (no rule ID of its own). &lt;a href="https://github.com/frozonfreak/webhig/blob/3bbd5a9dc2b67955c3147a4d9f673412d251f32d/HIG.md#43-data-freshness--stale-states" rel="noopener noreferrer"&gt;§4.3, Data Freshness &amp;amp; Stale States&lt;/a&gt; requires dashboards and data-heavy views to handle explicit freshness states. Fresh data can be shown with no extra indicator. Stale data gets a staleness indicator, and a background refresh is permitted. A refresh in flight should be non-blocking and should preserve the existing data. If the refresh fails, retain the stale data, show an error indicator, and offer a retry. The HIG does not set a universal age threshold for "stale."&lt;/p&gt;

&lt;h2&gt;
  
  
  Before and after
&lt;/h2&gt;

&lt;p&gt;This heading states a total and gives no clue when it was last known to be true:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;section&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;Open orders&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;12&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/section&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Show when the figure was last successfully updated, or another clear staleness label, and let people refresh without wiping the current number. This is a freshness-label illustration, not a complete orders dashboard, and it is not a caching or polling recipe:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;section&lt;/span&gt; &lt;span class="na"&gt;aria-labelledby&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"orders-heading"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;h1&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"orders-heading"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Open orders&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;12&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;p&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"orders-freshness"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    Updated
    &lt;span class="nt"&gt;&amp;lt;time&lt;/span&gt; &lt;span class="na"&gt;datetime&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"2026-11-26T10:00:00+05:30"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;26 Nov 2026, 10:00&lt;span class="nt"&gt;&amp;lt;/time&amp;gt;&lt;/span&gt;.
    This figure may be out of date.
  &lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;p&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"orders-refresh-status"&lt;/span&gt; &lt;span class="na"&gt;role&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"status"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"button"&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"orders-refresh"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Refresh&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/section&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;script&amp;gt;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;button&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'orders-refresh'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;freshness&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'orders-freshness'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;refreshStatus&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'orders-refresh-status'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="c1"&gt;// Illustrative only: a working refresh would request https://example.com/orders&lt;/span&gt;
  &lt;span class="c1"&gt;// and keep the "12" on screen while that request is in flight.&lt;/span&gt;
  &lt;span class="n"&gt;button&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addEventListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'click'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;refreshStatus&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;textContent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'Refreshing…'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="n"&gt;button&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;disabled&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="n"&gt;button&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;textContent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'Refreshing…'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="c1"&gt;// On success, update the total, update the &amp;lt;time&amp;gt; value, and drop the&lt;/span&gt;
    &lt;span class="c1"&gt;// "may be out of date" sentence. Then restore the button and clear the status.&lt;/span&gt;
    &lt;span class="c1"&gt;// On failure, keep the total and the stale label, restore the button, and set:&lt;/span&gt;
    &lt;span class="c1"&gt;// refreshStatus.textContent = 'Could not refresh. The figure above may be out of date.';&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The timestamp is an example, not a required format. The &lt;code&gt;datetime&lt;/code&gt; value is a valid global date-and-time string for machines; people and screen readers typically get the visible text, so write that text in a form they can interpret, including a date when the time of day alone would be ambiguous. A relative phrase such as "2 minutes ago" also goes stale unless you keep it current, including if you generate it with &lt;code&gt;Intl.RelativeTimeFormat&lt;/code&gt;. The script does not perform a real request; a working refresh would request a URL such as &lt;a href="https://example.com/orders" rel="noopener noreferrer"&gt;https://example.com/orders&lt;/a&gt; and then either update the figure and timestamp (and remove the stale caveat) or, on failure, keep the last data, show an error, and leave retry available. That failure path is the Failed refresh row in §4.3.&lt;/p&gt;

&lt;p&gt;This snippet does not implement polling, HTTP cache rules, or a form-style pending state for the whole page. If the freshness or status text changes in place, put a short live region in the markup first — &lt;code&gt;role="status"&lt;/code&gt; is a polite live region — and update that existing region. Check the announcement with a screen reader your audience uses.&lt;/p&gt;

&lt;h2&gt;
  
  
  Do this instead
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Label stale or possibly stale data, or refresh it so the figure is current. Do not leave an unlabeled total looking live&lt;/li&gt;
&lt;li&gt;Show when the data was last successfully updated, or another clear staleness label, in a form people can interpret&lt;/li&gt;
&lt;li&gt;Keep the current figures on screen while a refresh is in flight, and use a non-blocking indicator&lt;/li&gt;
&lt;li&gt;If a refresh fails, retain the last data, say that the update failed, and offer a retry&lt;/li&gt;
&lt;li&gt;Freshly confirmed data does not need a stale indicator&lt;/li&gt;
&lt;li&gt;A silent background revalidation is not a substitute for a visible stale or failed state when people may still be looking at old numbers&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Quick check for your app
&lt;/h2&gt;

&lt;p&gt;On a test copy of a dashboard such as example.com/orders, load an older payload, or leave the view open and then fail the next refresh (go offline, or block the request). Confirm a time or stale label is visible, that refresh does not blank the existing figures, and that a failed refresh still shows the last numbers plus an error and a retry. If the freshness or status text updates in place, check it with a screen reader your audience uses. Suitable automated checks can flag a missing freshness label or a missing retry control; they cannot tell you the label is accurate or that the refresh path works. Pair them with a manual pass. A green suite is evidence for what it actually exercised, not proof that outdated figures are never shown as current.&lt;/p&gt;




&lt;p&gt;The Web HIG is an open set of guidelines for how the web should behave, not a component library. Design systems define how it looks. The Web HIG defines how it behaves.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;GitHub: &lt;a href="https://github.com/frozonfreak/webhig/discussions/39" rel="noopener noreferrer"&gt;https://github.com/frozonfreak/webhig/discussions/39&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Hashnode: &lt;a href="https://thewebhig.hashnode.dev/dont-silently-show-outdated-information-web-hig-tip-21" rel="noopener noreferrer"&gt;https://thewebhig.hashnode.dev/dont-silently-show-outdated-information-web-hig-tip-21&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Dev.to: &lt;a href="https://dev.to/frozonfreak/dont-silently-show-outdated-information-web-hig-tip-21-32ng"&gt;https://dev.to/frozonfreak/dont-silently-show-outdated-information-web-hig-tip-21-32ng&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Bluesky: &lt;a href="https://bsky.app/profile/sastha.bsky.social/post/3n375efbwsc2k" rel="noopener noreferrer"&gt;https://bsky.app/profile/sastha.bsky.social/post/3n375efbwsc2k&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ux</category>
      <category>webdev</category>
      <category>html</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Your AI agent marked the form accessible. It had only checked contrast.</title>
      <dc:creator>FrozonFreak</dc:creator>
      <pubDate>Thu, 26 Nov 2026 07:20:16 +0000</pubDate>
      <link>https://dev.to/frozonfreak/your-ai-agent-marked-the-form-accessible-it-had-only-checked-contrast-5aad</link>
      <guid>https://dev.to/frozonfreak/your-ai-agent-marked-the-form-accessible-it-had-only-checked-contrast-5aad</guid>
      <description>&lt;p&gt;Say you ask your AI agent to build a "request a visitor badge" form at example.com. The pull request comes back with a green line in the notes: "Accessibility: pass." The only check that ran was a contrast test on the button colours.&lt;/p&gt;

&lt;p&gt;A single automated check was treated as a result about the whole form.&lt;/p&gt;

&lt;p&gt;This is a fictional illustration of how Design Decision Method reports accessibility work, not a case study or a measured result. The product details below are invented for the example. It is also not a repeat of the broader &lt;a href="https://thewebhig.hashnode.dev/done-isn-t-a-test-result-how-your-ai-agent-should-hand-off-ui-work" rel="noopener noreferrer"&gt;handoff and evidence labels&lt;/a&gt; in step 6. This post is about a narrower mistake: turning one accessibility check into a claim the interface cannot support.&lt;/p&gt;

&lt;h2&gt;
  
  
  What you may report
&lt;/h2&gt;

&lt;p&gt;The docs (Release 2.2.4) already ask the agent, when it delivers the work, to label each result as proposed, heuristic review, automated check, manual test, or user research, and to say what it did not test.&lt;/p&gt;

&lt;p&gt;The procedure on the main branch is more specific about accessibility. Its checks are prompts, not the complete standard. It asks the agent to combine automated checks with manual keyboard testing and relevant assistive-technology pairs, to record what was not tested, and to distinguish those evidence levels. If a reference file cannot be opened, the procedure on the main branch says to say so and mark the affected checks as unverified, rather than claiming them.&lt;/p&gt;

&lt;p&gt;An honest note for the visitor-badge form might look like this:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Automated check:&lt;/strong&gt; Contrast on the text and button colours used. No failures found. This cannot support a claim about overall accessibility.&lt;br&gt;
&lt;strong&gt;Manual test:&lt;/strong&gt; The three fields and the submit control can be reached from the keyboard, in a logical order, with a visible focus. Tested once on a desktop keyboard. Not tested on a phone.&lt;br&gt;
&lt;strong&gt;Heuristic review:&lt;/strong&gt; Error text for a bad host email sits next to the field (the placeholder is &lt;a href="mailto:name@example.com"&gt;name@example.com&lt;/a&gt;). Markup only. Not tested with a screen reader.&lt;br&gt;
&lt;strong&gt;Proposed:&lt;/strong&gt; People complete a badge request without help. Not tested. No user research.&lt;br&gt;
&lt;strong&gt;Not tested:&lt;/strong&gt; screen reader, zoom and reflow, mobile keyboard, a native app — and web checks would not validate a native one.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Nothing in that note invents a measurement. Nothing in it claims that a standard was met.&lt;/p&gt;

&lt;h2&gt;
  
  
  What you may not claim
&lt;/h2&gt;

&lt;p&gt;The procedure on the main branch is direct about the limit. An automated check can support specific rule failures. It cannot support overall accessibility or usability. "Accessibility: pass" is the second kind of statement.&lt;/p&gt;

&lt;p&gt;When the project supplies no other standard, the procedure on the main branch uses WCAG 2.2 level AA as the default web design and verification target, and says a stronger project or legal requirement wins. That is a target to design toward. It is not a result you can report from a contrast check, and the procedure on the main branch tells the agent not to claim certification, or that a standard was met, without evidence for that claim. Flag a conflict with a stronger requirement instead of quietly lowering accessibility.&lt;/p&gt;

&lt;p&gt;The same limit applies across platforms. For native apps, the procedure on the main branch points to the platform's accessibility guidance and tools. Do not claim that web checks validate native accessibility. If example.com later needs an iOS version of the badge request, the contrast run on the website does not speak for that app.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why this matters
&lt;/h2&gt;

&lt;p&gt;Agents are good at running a checker and writing a confident summary. The dangerous part is the upgrade: from "these colours passed a contrast check" to "the form is accessible." Readers of the pull request cannot see the gap unless the note says what was actually tested.&lt;/p&gt;

&lt;p&gt;The docs (Release 2.2.4) already require that gap to be visible: say what you did not test. The procedure on the main branch fills in the accessibility detail — keyboard, assistive technology, native tools, and unverified checks — so the summary cannot outrun the evidence.&lt;/p&gt;

&lt;p&gt;The method does not claim this saves time. That has not been measured. It also does not guarantee an accessible interface. What it gives you is a report that stays inside what the checks can support.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;p&gt;Design Decision Method is a lightweight design decision workflow for developers building interfaces with AI agents. It follows the open Agent Skills format and is MIT licensed. Install paths for Claude Code, Cursor, Gemini CLI, and Codex are in the README.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://frozonfreak.github.io/DesignDecesionMethod/" rel="noopener noreferrer"&gt;Read the DDM docs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://raw.githubusercontent.com/frozonfreak/DesignDecesionMethod/main/references/accessibility.md" rel="noopener noreferrer"&gt;Accessibility baseline and verification&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://raw.githubusercontent.com/frozonfreak/DesignDecesionMethod/main/references/acceptance-and-validation.md" rel="noopener noreferrer"&gt;Acceptance and evidence labels&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://raw.githubusercontent.com/frozonfreak/DesignDecesionMethod/main/README.md" rel="noopener noreferrer"&gt;Repository README and install notes&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>ux</category>
      <category>webdev</category>
      <category>a11y</category>
    </item>
    <item>
      <title>Don't rely on color alone (Web HIG tip #20)</title>
      <dc:creator>FrozonFreak</dc:creator>
      <pubDate>Mon, 23 Nov 2026 07:18:50 +0000</pubDate>
      <link>https://dev.to/frozonfreak/dont-rely-on-color-alone-web-hig-tip-20-d9d</link>
      <guid>https://dev.to/frozonfreak/dont-rely-on-color-alone-web-hig-tip-20-d9d</guid>
      <description>&lt;p&gt;On example.com/orders, each row has a green or red dot next to the order number. Shipped is green. Delayed is red. There is no word, no icon, and no pattern. Someone who cannot tell those colors apart, or who hears the page instead of seeing it, cannot tell the two rows apart.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Web HIG tip #20 (Quick #60):&lt;/strong&gt; Never rely on color alone to communicate meaning — pair with icon, text, or pattern.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why it matters
&lt;/h2&gt;

&lt;p&gt;Color is a useful cue. It is a poor only cue:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A background color or fill is not exposed as an accessible name, so a color-only status can be silent to a screen reader&lt;/li&gt;
&lt;li&gt;Hue differences can be hard to see, including for people with color-vision deficiencies, in bright light, or on a monochrome or grayscale display&lt;/li&gt;
&lt;li&gt;Forced-colors and similar contrast settings can replace author background colors, which can erase a cue that lived only in a background. A color-only dot can vanish or become indistinguishable from the others. Text typically stays, in a system color&lt;/li&gt;
&lt;li&gt;A chart or filter that encodes meaning only as a swatch fails in the same way&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://github.com/frozonfreak/webhig/blob/40408569b6433965a32088a3e5a8951d46783bd8/HIG-QUICK.md" rel="noopener noreferrer"&gt;Quick #60&lt;/a&gt; is Quick-only guidance (no rule ID of its own). For errors, &lt;a href="https://github.com/frozonfreak/webhig/blob/40408569b6433965a32088a3e5a8951d46783bd8/HIG.md#25-error-ux-taxonomy" rel="noopener noreferrer"&gt;§2.5, Error UX Taxonomy&lt;/a&gt; is more specific: errors MUST NOT rely on color alone, and each error MUST include text and, where applicable, an icon or pattern. Required-field markers have a related Quick item (#55), which tip #4 already covered.&lt;/p&gt;

&lt;h2&gt;
  
  
  Before and after
&lt;/h2&gt;

&lt;p&gt;These table cells use fill color as the only status:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;table&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;tr&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;th&amp;gt;&lt;/span&gt;Order&lt;span class="nt"&gt;&amp;lt;/th&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;th&amp;gt;&lt;/span&gt;Status&lt;span class="nt"&gt;&amp;lt;/th&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/tr&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;tr&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;td&amp;gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;href&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"https://example.com/orders/1042"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;1042&lt;span class="nt"&gt;&amp;lt;/a&amp;gt;&amp;lt;/td&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;td&amp;gt;&amp;lt;span&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"dot dot-shipped"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/td&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/tr&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;tr&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;td&amp;gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;href&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"https://example.com/orders/1043"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;1043&lt;span class="nt"&gt;&amp;lt;/a&amp;gt;&amp;lt;/td&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;td&amp;gt;&amp;lt;span&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"dot dot-delayed"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/td&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/tr&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/table&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;style&amp;gt;&lt;/span&gt;
  &lt;span class="nc"&gt;.dot&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;inline-block&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.75rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nl"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.75rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nl"&gt;border-radius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="kt"&gt;%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="nc"&gt;.dot-shipped&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;green&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="nc"&gt;.dot-delayed&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;crimson&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/style&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Give the status a visible word. Keep color if it helps, and add a shape or pattern so the meaning does not depend on hue. This is a status-label illustration, not a complete orders table or a design system:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;table&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;tr&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;th&amp;gt;&lt;/span&gt;Order&lt;span class="nt"&gt;&amp;lt;/th&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;th&amp;gt;&lt;/span&gt;Status&lt;span class="nt"&gt;&amp;lt;/th&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/tr&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;tr&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;td&amp;gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;href&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"https://example.com/orders/1042"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;1042&lt;span class="nt"&gt;&amp;lt;/a&amp;gt;&amp;lt;/td&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;td&amp;gt;&amp;lt;span&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"status status-shipped"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Shipped&lt;span class="nt"&gt;&amp;lt;/span&amp;gt;&amp;lt;/td&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/tr&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;tr&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;td&amp;gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;href&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"https://example.com/orders/1043"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;1043&lt;span class="nt"&gt;&amp;lt;/a&amp;gt;&amp;lt;/td&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;td&amp;gt;&amp;lt;span&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"status status-delayed"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Delayed&lt;span class="nt"&gt;&amp;lt;/span&amp;gt;&amp;lt;/td&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/tr&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/table&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;style&amp;gt;&lt;/span&gt;
  &lt;span class="nc"&gt;.status&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;inline-block&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.15em&lt;/span&gt; &lt;span class="mf"&gt;0.5em&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;border-inline-start&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.35em&lt;/span&gt; &lt;span class="n"&gt;solid&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="nc"&gt;.status-shipped&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;border-inline-start-style&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;solid&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;green&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="nc"&gt;.status-delayed&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;border-inline-start-style&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;dashed&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;crimson&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/style&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The word "Shipped" or "Delayed" is what people read and what assistive technology can speak. The border style is a second non-color cue, not a substitute for the text. It is a modest visual backup; check that it still has enough contrast. In forced-colors, the border color is usually replaced, but a solid versus dashed style typically remains. A distinct icon shape can play that same visual backup role for sighted users, including people who cannot tell hues apart. If the icon is the only status, give it an accessible name, such as &lt;code&gt;alt&lt;/code&gt; on an &lt;code&gt;img&lt;/code&gt; or &lt;code&gt;role="img"&lt;/code&gt; with &lt;code&gt;aria-label&lt;/code&gt;. If the word is already there, mark the icon decorative, for example with &lt;code&gt;aria-hidden="true"&lt;/code&gt;. An unlabeled icon still leaves the status silent to a screen reader, even when the shape is clear on screen.&lt;/p&gt;

&lt;p&gt;This snippet does not set a contrast procedure, a palette, or a component library. Check the text and non-text contrast of your own colors in each supported scheme. Do not treat a passing contrast check as proof that the meaning is also clear without hue.&lt;/p&gt;

&lt;h2&gt;
  
  
  Do this instead
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Put the meaning in visible text whenever you can: "Shipped", "Delayed", "In stock", or a specific error message&lt;/li&gt;
&lt;li&gt;Use color in addition to that text, not instead of it&lt;/li&gt;
&lt;li&gt;If space is tight and you use an icon, give it an accessible name, or keep visible text and mark the icon decorative&lt;/li&gt;
&lt;li&gt;A pattern, shape, or distinct border can back up color; it does not replace a name&lt;/li&gt;
&lt;li&gt;In error states, include a text message. A red outline or a red border alone is not enough&lt;/li&gt;
&lt;li&gt;If you support forced-colors or a high-contrast setting, look at the same statuses there. Author background colors may be replaced; the text should still be there&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Quick check for your app
&lt;/h2&gt;

&lt;p&gt;Open a test copy of example.com/orders, or any view that uses status, filters, or errors. Turn the display to grayscale, or look at a screenshot in grayscale, and see whether shipped and delayed (or success and failure) are still distinguishable. Then move through the same view with a screen reader your audience uses, and confirm each status or error has a name. If forced-colors is in your supported matrix, check that path too. Suitable automated checks can flag some contrast issues or missing names; they cannot tell you that every color-coded chart, badge, or error still makes sense without hue. Pair them with a manual pass. A green suite is evidence for what it actually exercised, not proof that color is never the only cue.&lt;/p&gt;




&lt;p&gt;The Web HIG is an open set of guidelines for how the web should behave, not a component library. Design systems define how it looks. The Web HIG defines how it behaves.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;GitHub: &lt;a href="https://github.com/frozonfreak/webhig/discussions/38" rel="noopener noreferrer"&gt;https://github.com/frozonfreak/webhig/discussions/38&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Hashnode: &lt;a href="https://thewebhig.hashnode.dev/dont-rely-on-color-alone-web-hig-tip-20" rel="noopener noreferrer"&gt;https://thewebhig.hashnode.dev/dont-rely-on-color-alone-web-hig-tip-20&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Dev.to: &lt;a href="https://dev.to/frozonfreak/dont-rely-on-color-alone-web-hig-tip-20-d9d"&gt;https://dev.to/frozonfreak/dont-rely-on-color-alone-web-hig-tip-20-d9d&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Bluesky: &lt;a href="https://bsky.app/profile/sastha.bsky.social/post/3n2xlxqqcms26" rel="noopener noreferrer"&gt;https://bsky.app/profile/sastha.bsky.social/post/3n2xlxqqcms26&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>webdev</category>
      <category>css</category>
      <category>a11y</category>
      <category>html</category>
    </item>
    <item>
      <title>Don't validate complex fields on every keystroke (Web HIG tip #19)</title>
      <dc:creator>FrozonFreak</dc:creator>
      <pubDate>Wed, 18 Nov 2026 08:22:59 +0000</pubDate>
      <link>https://dev.to/frozonfreak/dont-validate-complex-fields-on-every-keystroke-web-hig-tip-19-kjo</link>
      <guid>https://dev.to/frozonfreak/dont-validate-complex-fields-on-every-keystroke-web-hig-tip-19-kjo</guid>
      <description>&lt;p&gt;Someone starts typing &lt;a href="mailto:name@example.com"&gt;name@example.com&lt;/a&gt; into the email field on example.com/account. At the first letter the field turns red and an error appears: "Enter a valid email." They have not finished the address. Each extra keystroke flickers the same message. The check is running on every input event.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Web HIG tip #19 (Quick #53):&lt;/strong&gt; Do not validate on every keystroke for complex fields — validate on blur or submit.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why it matters
&lt;/h2&gt;

&lt;p&gt;Email, phone, password, date and similar fields are incomplete for most of the time someone is typing. Checking them on every keystroke often means:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The first characters of a valid value look wrong, so the field starts shouting before the person has finished&lt;/li&gt;
&lt;li&gt;Keyboard and screen-reader users can get a stream of error updates while they are still editing&lt;/li&gt;
&lt;li&gt;A live hint, such as a character count or a password-requirement list, is not the same thing as marking the field invalid&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://github.com/frozonfreak/webhig/blob/40408569b6433965a32088a3e5a8951d46783bd8/HIG-QUICK.md" rel="noopener noreferrer"&gt;Quick #53&lt;/a&gt; is Quick-only guidance (no rule ID of its own). The same timing appears in &lt;a href="https://github.com/frozonfreak/webhig/blob/40408569b6433965a32088a3e5a8951d46783bd8/HIG.md#211-forms-contract" rel="noopener noreferrer"&gt;§2.11, Forms Contract&lt;/a&gt;, written for commerce checkout, application settings, and auth flows: field-level checks inline on blur, form-level checks on submit, and no validation before the user has interacted, unless the value was pre-filled.&lt;/p&gt;

&lt;h2&gt;
  
  
  Before and after
&lt;/h2&gt;

&lt;p&gt;This field reports an error on the first keystroke, while the address is still being typed:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;form&lt;/span&gt; &lt;span class="na"&gt;action&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"https://example.com/account"&lt;/span&gt; &lt;span class="na"&gt;method&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"post"&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"account"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;label&lt;/span&gt; &lt;span class="na"&gt;for&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"email"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Email&lt;span class="nt"&gt;&amp;lt;/label&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"email"&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"email"&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"email"&lt;/span&gt; &lt;span class="na"&gt;autocomplete&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"email"&lt;/span&gt; &lt;span class="na"&gt;required&lt;/span&gt;
         &lt;span class="na"&gt;aria-describedby&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"email-error"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;p&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"email-error"&lt;/span&gt; &lt;span class="na"&gt;hidden&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"submit"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Save&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/form&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;script&amp;gt;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;input&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'email'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;error&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'email-error'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="n"&gt;input&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addEventListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'input'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="n"&gt;input&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;validity&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;valid&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="n"&gt;error&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;hidden&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="n"&gt;error&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;textContent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'Enter a valid email.'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="n"&gt;error&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;hidden&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Wait until the person leaves the field, or until they submit, before showing that first invalid state. The form has &lt;code&gt;novalidate&lt;/code&gt; so the browser's native submit message does not replace the custom one; the script still reads &lt;code&gt;validity&lt;/code&gt;. This is a client-side illustration, not a complete account form, and it is not a substitute for server-side checks:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;form&lt;/span&gt; &lt;span class="na"&gt;action&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"https://example.com/account"&lt;/span&gt; &lt;span class="na"&gt;method&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"post"&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"account"&lt;/span&gt; &lt;span class="na"&gt;novalidate&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;label&lt;/span&gt; &lt;span class="na"&gt;for&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"email"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Email&lt;span class="nt"&gt;&amp;lt;/label&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"email"&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"email"&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"email"&lt;/span&gt; &lt;span class="na"&gt;autocomplete&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"email"&lt;/span&gt; &lt;span class="na"&gt;required&lt;/span&gt;
         &lt;span class="na"&gt;aria-describedby&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"email-error"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;p&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"email-error"&lt;/span&gt; &lt;span class="na"&gt;hidden&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"submit"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Save&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/form&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;script&amp;gt;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;form&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'account'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;input&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'email'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;error&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'email-error'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;showEmailError&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;show&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;show&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="n"&gt;error&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;hidden&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="n"&gt;error&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;textContent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'Enter a valid email.'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="n"&gt;input&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setAttribute&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'aria-invalid'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'true'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="n"&gt;error&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;hidden&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="n"&gt;error&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;textContent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;''&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="n"&gt;input&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;removeAttribute&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'aria-invalid'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;emailFailed&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;input&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;validity&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;valueMissing&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="n"&gt;input&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;validity&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;typeMismatch&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="n"&gt;input&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addEventListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'blur'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;input&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt; &lt;span class="o"&gt;!==&lt;/span&gt; &lt;span class="s1"&gt;''&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nf"&gt;emailFailed&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="nf"&gt;showEmailError&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addEventListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'submit'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;event&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;emailFailed&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="n"&gt;event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;preventDefault&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="nf"&gt;showEmailError&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="n"&gt;input&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;focus&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="n"&gt;input&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addEventListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'input'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="n"&gt;error&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;hidden&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nf"&gt;emailFailed&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="nf"&gt;showEmailError&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The script uses the browser's built-in &lt;code&gt;type="email"&lt;/code&gt; and &lt;code&gt;required&lt;/code&gt; checks. Those checks are not a complete definition of a valid address, and they are not identical in every browser. An empty email is valid unless the field is &lt;code&gt;required&lt;/code&gt;; a partial value such as &lt;code&gt;name&lt;/code&gt;, typed before &lt;code&gt;@example.com&lt;/code&gt;, already fails the syntax check. Native constraint validation also has its own timing: a message may appear on submit, and CSS &lt;code&gt;:invalid&lt;/code&gt; can match immediately — including an empty required field on page load, and that partial email while someone is still typing. If you style &lt;code&gt;:invalid&lt;/code&gt;, the field can look wrong before blur or submit. Prefer &lt;code&gt;:user-invalid&lt;/code&gt; for the invalid style. It is Baseline widely available (since May 2026; newly available in late 2023 with Chrome 119, Firefox 88, and Safari 16.5). It generally waits until the user has committed a change (blur or &lt;code&gt;change&lt;/code&gt; for a text or email field) or has tried to submit, not until the first keystroke. Once it matches, it typically stays matched while the value is still invalid, including as the person continues typing, until the value is valid or the form is reset. Exact timing can still differ by browser and control type, so do not treat it as a guaranteed match for Quick #53, and keep a fallback for older browsers.&lt;/p&gt;

&lt;p&gt;The last &lt;code&gt;input&lt;/code&gt; handler only clears an error that was already shown. That is not the first error on every keystroke. The blur handler also waits for a non-empty value, so an empty required field is shown on submit rather than when someone tabs through. A password-requirement list or a character count can also update as someone types, without marking the field invalid. This snippet does not implement an error summary, a pre-filled invalid value, or a framework form library. If a value arrives already invalid, §2.11 allows a check before further interaction.&lt;/p&gt;

&lt;h2&gt;
  
  
  Do this instead
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;For complex fields, run the first "this is invalid" check on blur or on submit, not on every &lt;code&gt;input&lt;/code&gt; event&lt;/li&gt;
&lt;li&gt;Keep help visible from the start when it helps people meet a requirement (for example password rules). That is guidance, not an error&lt;/li&gt;
&lt;li&gt;Once a field has already been marked invalid, you may update or clear the message as the person edits&lt;/li&gt;
&lt;li&gt;Don't style &lt;code&gt;:invalid&lt;/code&gt; as the invalid state: it matches immediately, including an empty required field on page load and a partial email while someone is still typing. Use &lt;code&gt;:user-invalid&lt;/code&gt; for that style, with a fallback for older browsers, and don't assume the exact moment it matches is identical everywhere. Styling &lt;code&gt;:required&lt;/code&gt; is fine when it only marks that the field is required, not that it is already wrong&lt;/li&gt;
&lt;li&gt;Preserve what the person typed. A failed check should not wipe the value&lt;/li&gt;
&lt;li&gt;Repeat the important checks on the server. This tip is about when the interface first talks, not about skipping validation&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Quick check for your app
&lt;/h2&gt;

&lt;p&gt;On a test copy of a form such as example.com/account, type a partial email, tab away, then submit with an empty or incomplete value. The first invalid message should appear on blur or submit, not on the first key. Confirm the error clears at a sensible time, and that a live hint does not behave like a stream of errors. Try it with the keyboard and with a screen reader your audience uses. Suitable automated checks can flag a missing error or a missing field association; they cannot tell you the timing feels right. Pair them with a manual pass on the browsers you support. A green suite is evidence for what it actually exercised, not proof that every field waits long enough.&lt;/p&gt;




&lt;p&gt;The Web HIG is an open set of guidelines for how the web should behave, not a component library. Design systems define how it looks. The Web HIG defines how it behaves.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;GitHub: &lt;a href="https://github.com/frozonfreak/webhig/discussions/37" rel="noopener noreferrer"&gt;https://github.com/frozonfreak/webhig/discussions/37&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Hashnode: &lt;a href="https://thewebhig.hashnode.dev/dont-validate-on-every-keystroke-web-hig-tip-19" rel="noopener noreferrer"&gt;https://thewebhig.hashnode.dev/dont-validate-on-every-keystroke-web-hig-tip-19&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Dev.to: &lt;a href="https://dev.to/frozonfreak/dont-validate-complex-fields-on-every-keystroke-web-hig-tip-19-kjo"&gt;https://dev.to/frozonfreak/dont-validate-complex-fields-on-every-keystroke-web-hig-tip-19-kjo&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Bluesky: &lt;a href="https://bsky.app/profile/sastha.bsky.social/post/3n2l4ym5olc2a" rel="noopener noreferrer"&gt;https://bsky.app/profile/sastha.bsky.social/post/3n2l4ym5olc2a&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>webdev</category>
      <category>html</category>
      <category>forms</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Your AI agent copied the web page onto iOS. Start from the platform.</title>
      <dc:creator>FrozonFreak</dc:creator>
      <pubDate>Wed, 18 Nov 2026 07:26:54 +0000</pubDate>
      <link>https://dev.to/frozonfreak/your-ai-agent-copied-the-web-page-onto-ios-start-from-the-platform-34a8</link>
      <guid>https://dev.to/frozonfreak/your-ai-agent-copied-the-web-page-onto-ios-start-from-the-platform-34a8</guid>
      <description>&lt;p&gt;Say you already have a web tool at example.com for logging a site visit, and you ask your AI agent for the iOS screen. The reply is the web page, transplanted: a left sidebar, hover-only extra actions, and a floating button copied from another platform. On a phone held in one hand, the sidebar is gone, and so are the actions that lived on hover.&lt;/p&gt;

&lt;p&gt;The agent copied a familiar surface onto the wrong platform.&lt;/p&gt;

&lt;p&gt;This is a fictional illustration of how Design Decision Method handles platform guidance, not a case study or a measured result. The product details below are invented for the example.&lt;/p&gt;

&lt;h2&gt;
  
  
  Start from the platform you are actually building
&lt;/h2&gt;

&lt;p&gt;The live docs already put the device in &lt;a href="https://thewebhig.hashnode.dev/your-ai-agent-invents-product-rules-make-it-establish-context-first" rel="noopener noreferrer"&gt;establish context&lt;/a&gt;. When choosing a visual system, they say to keep a system the project already has, and when it has none, to select from the platform. For other web work, the fallback is Material 3. Borrow an interaction pattern when it solves the task. Do not copy another organization's branding.&lt;/p&gt;

&lt;p&gt;The docs are plain that this is not a ranking: the procedure routes work across Material 3, platform guidelines, and a project's own rules, among other sources, and does not rank those sources or copy their branding.&lt;/p&gt;

&lt;p&gt;What the live introduction does not spell out is how that choice changes on iOS versus Android versus the web. That detail lives in the agent procedure.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the procedure actually selects
&lt;/h2&gt;

&lt;p&gt;If a suitable existing system, brand, or platform direction is already in place, the procedure says to retain and extend it. A new iOS screen is not automatic permission to invent a second identity.&lt;/p&gt;

&lt;p&gt;When there is no existing system, the procedure gives conditional rows, not a favourite:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;For a native Apple interface, use Apple's Human Interface Guidelines and system controls for the supported OS and SDK. Do not mandate the newest material or an OS upgrade.&lt;/li&gt;
&lt;li&gt;For Android or Compose, use Material 3, and only use Expressive options where the brief or project calls for them and the installed library supports them.&lt;/li&gt;
&lt;li&gt;For other web or cross-platform work, Material 3 is the fallback, with implementation support checked.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The routing guidance is just as direct for a native mobile screen: use the platform's guidance for navigation and controls. Avoid mimicking one platform's material on another.&lt;/p&gt;

&lt;p&gt;A short note for the example.com iOS screen might look like this:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Platform:&lt;/strong&gt; A native iOS screen, not a wrapped copy of the website.&lt;br&gt;
&lt;strong&gt;Keep:&lt;/strong&gt; The product's existing brand colour roles, if they already exist.&lt;br&gt;
&lt;strong&gt;Follow the platform:&lt;/strong&gt; System navigation and controls for the supported OS and SDK. Every action that existed on the web stays reachable without hover.&lt;br&gt;
&lt;strong&gt;Do not copy:&lt;/strong&gt; The web sidebar, hover-only overflow, or a floating action pattern brought over from another platform.&lt;br&gt;
&lt;strong&gt;Do not add:&lt;/strong&gt; A new visual material the brief did not ask for, or a required OS upgrade.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://thewebhig.hashnode.dev/your-ai-agent-added-a-feature-why-did-it-redesign-the-buttons" rel="noopener noreferrer"&gt;Choose the visual system&lt;/a&gt; still starts with what the project already has. Platform selection is the next question: which conventions this surface should actually follow.&lt;/p&gt;

&lt;h2&gt;
  
  
  Brand can travel. Chrome often should not.
&lt;/h2&gt;

&lt;p&gt;Choosing the visual system is separate from borrowing an interaction pattern. The procedure's visual-system reference adds a practical split: native platform conventions can coexist with brand typography and imagery when behaviour stays coherent. The site-visit log can keep its colours. It should not keep a sidebar that iOS does not use, or actions that disappear without a pointer.&lt;/p&gt;

&lt;p&gt;The same split runs the other way. A later Android screen should not be dressed in iOS chrome to look "consistent." A web page should not assume a gesture that only exists on a phone. Rebuild the pattern in the target stack — meaning, behaviour, focus, and feedback — instead of pasting another platform's markup.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://thewebhig.hashnode.dev/your-ai-agent-draws-a-pretty-layout-make-it-structure-the-view-first" rel="noopener noreferrer"&gt;Structure each view&lt;/a&gt; already asks the agent to adapt the layout to the device without dropping a capability the task needs. Hover-only actions on an iOS screen fail that test.&lt;/p&gt;

&lt;h2&gt;
  
  
  Keep it proportional
&lt;/h2&gt;

&lt;p&gt;Name the platform, keep a suitable existing brand, and write down the conventions you will not transplant. The method is a shared procedure, not mandatory for every small edit. It does not claim this saves time. That has not been measured. It also does not guarantee a better native screen. What it gives you is a place to catch a copied surface before it ships on the wrong platform.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;p&gt;Design Decision Method is a lightweight design decision workflow for developers building interfaces with AI agents. It follows the open Agent Skills format and is MIT licensed. Install paths for Claude Code, Cursor, Gemini CLI, and Codex are in the README.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://frozonfreak.github.io/DesignDecesionMethod/" rel="noopener noreferrer"&gt;Read the DDM docs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://raw.githubusercontent.com/frozonfreak/DesignDecesionMethod/main/references/visual-systems.md" rel="noopener noreferrer"&gt;Visual-system adoption checks&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://raw.githubusercontent.com/frozonfreak/DesignDecesionMethod/main/README.md" rel="noopener noreferrer"&gt;Repository README and install notes&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>ux</category>
      <category>webdev</category>
      <category>mobile</category>
    </item>
    <item>
      <title>You asked the agent to improve a screen. It started over.</title>
      <dc:creator>FrozonFreak</dc:creator>
      <pubDate>Mon, 16 Nov 2026 10:32:00 +0000</pubDate>
      <link>https://dev.to/frozonfreak/you-asked-the-agent-to-improve-a-screen-it-started-over-5f26</link>
      <guid>https://dev.to/frozonfreak/you-asked-the-agent-to-improve-a-screen-it-started-over-5f26</guid>
      <description>&lt;p&gt;Say you already have a "return borrowed equipment" screen at example.com, and you ask your AI agent to improve it. The reply is a new colour palette, a utilization chart, and a shop to buy replacements. The item name and due date are harder to find, and the return action moved.&lt;/p&gt;

&lt;p&gt;You asked for a review. You got a replacement.&lt;/p&gt;

&lt;p&gt;This is a fictional illustration of how Design Decision Method applies to an existing screen, not a case study or a measured result. The product details are invented for the example.&lt;/p&gt;

&lt;p&gt;The method is not only for new UI. The agent procedure says to use it when a task involves designing, reviewing, or implementing a screen.&lt;/p&gt;

&lt;h2&gt;
  
  
  Check the screen you already have
&lt;/h2&gt;

&lt;p&gt;The live docs ask the agent to read the brief and the product you already have, then name the audience, how often the task happens, what a mistake costs, and the device. Keep known separate from assumed, and do not invent rules or capabilities the product lacks.&lt;/p&gt;

&lt;p&gt;A short context note might look like this:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Audience:&lt;/strong&gt; Members who return a tool they already borrowed.&lt;br&gt;
&lt;strong&gt;Task / frequency:&lt;/strong&gt; Occasional.&lt;br&gt;
&lt;strong&gt;Cost of a mistake:&lt;/strong&gt; Medium — a failed return can leave a due date hanging or mark the wrong item back in.&lt;br&gt;
&lt;strong&gt;Device:&lt;/strong&gt; Phone first.&lt;br&gt;
&lt;strong&gt;Known:&lt;/strong&gt; The screen already shows the item, the due date, a condition note, and a return action. There is no shop, and no utilization dashboard.&lt;br&gt;
&lt;strong&gt;Assumed (marked):&lt;/strong&gt; Offline return was not requested, so none is designed.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That is &lt;a href="https://thewebhig.hashnode.dev/your-ai-agent-invents-product-rules-make-it-establish-context-first" rel="noopener noreferrer"&gt;establish context&lt;/a&gt; for a screen that already ships.&lt;/p&gt;

&lt;h2&gt;
  
  
  Keep the system the project has
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://thewebhig.hashnode.dev/your-ai-agent-added-a-feature-why-did-it-redesign-the-buttons" rel="noopener noreferrer"&gt;Choose the visual system&lt;/a&gt; starts the same way on a rework: keep a system the project already has. A request to "improve" the screen is not itself a brief for a new visual identity.&lt;/p&gt;

&lt;p&gt;The agent procedure adds a caution: inheriting a theme does not verify new focus, error, disabled, or asynchronous behaviour. If the change repairs an error state, record that it still needs a check.&lt;/p&gt;

&lt;h2&gt;
  
  
  Run the gate, then record the choices
&lt;/h2&gt;

&lt;p&gt;The docs say to skip the object map when the change does not depend on relationships, such as a restyle that leaves the structure alone. The agent procedure records that decision in one line:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Map: skipped&lt;/strong&gt; — the return view already exists. This change clarifies the due date and the error state; it does not add object types, routes, or navigation.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The consequential choice belongs in a &lt;a href="https://thewebhig.hashnode.dev/your-ai-agent-forgets-why-give-it-a-decision-record" rel="noopener noreferrer"&gt;decision record&lt;/a&gt;: keep the single-page return; put the item and due date first; keep the condition note visible at the point of return. The procedure says to present speculative additions — the chart and the shop — as optional, not as required work.&lt;/p&gt;

&lt;p&gt;For the review itself, the procedure asks the agent to label each finding keep, change, or defer:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Keep:&lt;/strong&gt; the existing components and tokens; the single return action.&lt;br&gt;
&lt;strong&gt;Change:&lt;/strong&gt; make the item and due date unmissable; keep the item identity visible if the return fails.&lt;br&gt;
&lt;strong&gt;Defer:&lt;/strong&gt; condition photos; any shop or dashboard.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;A small change gets a few lines. The method is a shared procedure, not mandatory for every typo fix.&lt;/p&gt;

&lt;h2&gt;
  
  
  Label the evidence
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://thewebhig.hashnode.dev/done-isn-t-a-test-result-how-your-ai-agent-should-hand-off-ui-work" rel="noopener noreferrer"&gt;Deliver and validate&lt;/a&gt; still applies. Deliver the updated screen, the decisions, and a short validation status, with each result labelled:&lt;/p&gt;

&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;Item and due date stay visible on a narrow viewport. &lt;em&gt;Heuristic review&lt;/em&gt; of the layout only.&lt;/li&gt;
&lt;li&gt;A failed return keeps the item identity on screen and offers retry. &lt;em&gt;Manual test&lt;/em&gt; in one phone-sized viewport.&lt;/li&gt;
&lt;li&gt;Contrast on the return action. &lt;em&gt;Automated check&lt;/em&gt; on the colours used — not a claim about the whole product.&lt;/li&gt;
&lt;li&gt;People complete a return without help. &lt;em&gt;Proposed.&lt;/em&gt; Not tested. No user research.
&lt;strong&gt;Not tested:&lt;/strong&gt; screen reader pass, the server's error responses, offline behaviour.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;p&gt;Nothing in that note invents a measurement. A mockup cannot establish task-completion rates.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why this matters
&lt;/h2&gt;

&lt;p&gt;"Improve it" is an easy prompt, and an easy way to lose decisions the current screen already got right. The review path lets you keep those decisions, change only what the brief requires, and defer the rest — with evidence labels instead of a confident "done."&lt;/p&gt;

&lt;p&gt;The method does not claim this saves time. That has not been measured. It also does not guarantee a better screen. What it gives you is a way to rework existing UI without starting over.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;p&gt;Design Decision Method is a lightweight design decision workflow for developers building interfaces with AI agents. It follows the open Agent Skills format and is MIT licensed. Install paths for Claude Code, Cursor, Gemini CLI, and Codex are in the README.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://frozonfreak.github.io/DesignDecesionMethod/" rel="noopener noreferrer"&gt;Read the DDM docs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://raw.githubusercontent.com/frozonfreak/DesignDecesionMethod/main/README.md" rel="noopener noreferrer"&gt;Repository README and install notes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://raw.githubusercontent.com/frozonfreak/DesignDecesionMethod/main/assets/design-record-template.md" rel="noopener noreferrer"&gt;Design record template&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>ux</category>
      <category>webdev</category>
      <category>review</category>
    </item>
    <item>
      <title>Tell screen readers when the content changes (Web HIG tip #18)</title>
      <dc:creator>FrozonFreak</dc:creator>
      <pubDate>Mon, 16 Nov 2026 06:38:52 +0000</pubDate>
      <link>https://dev.to/frozonfreak/tell-screen-readers-when-the-content-changes-web-hig-tip-18-3c84</link>
      <guid>https://dev.to/frozonfreak/tell-screen-readers-when-the-content-changes-web-hig-tip-18-3c84</guid>
      <description>&lt;p&gt;Someone filters orders on example.com/orders. The list updates in place: three shipped rows appear, and a heading now says "3 shipped orders." A screen reader user is still on the Status control and hears nothing, so they don't know the page changed. The results are visible. They were never announced.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Web HIG tip #18 (Quick #78):&lt;/strong&gt; Dynamic content updates must be announced to screen readers (&lt;code&gt;aria-live&lt;/code&gt; or focus management).&lt;/p&gt;

&lt;h2&gt;
  
  
  Why it matters
&lt;/h2&gt;

&lt;p&gt;An in-page update does not load a new document, so the screen reader does not announce a new page. Without a live-region update or a focus move:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;People using a screen reader can miss a filter, save, or cart change that happened elsewhere on the page&lt;/li&gt;
&lt;li&gt;Keyboard users can be left on the control they just used, with no cue that content below or beside it changed&lt;/li&gt;
&lt;li&gt;A visual toast or a badge is easy to miss if it is not also announced, or if focus never moves to it&lt;/li&gt;
&lt;li&gt;Announcing every keystroke while someone types a query can be just as unusable as announcing nothing&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://github.com/frozonfreak/webhig/blob/bcd6cf696f688acd77ed5018036aebd9927bcddc/HIG-QUICK.md" rel="noopener noreferrer"&gt;Quick #78&lt;/a&gt; is Quick-only guidance (no rule ID of its own). The HIG does not add a longer normative technique for this item. &lt;a href="https://github.com/frozonfreak/webhig/blob/bcd6cf696f688acd77ed5018036aebd9927bcddc/HIG.md#83-audit-outcomes-informative" rel="noopener noreferrer"&gt;§8.3&lt;/a&gt; notes that assistive-technology announcements stay manual: a passing automated check is not evidence that a screen reader spoke.&lt;/p&gt;

&lt;h2&gt;
  
  
  Before and after
&lt;/h2&gt;

&lt;p&gt;This in-page filter redraws the list and leaves the announcement to chance. JavaScript stops the navigation, so this is a same-document update, not a new page:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;form&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"order-filter"&lt;/span&gt; &lt;span class="na"&gt;action&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"https://example.com/orders"&lt;/span&gt; &lt;span class="na"&gt;method&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"get"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;label&lt;/span&gt; &lt;span class="na"&gt;for&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"status"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Status&lt;span class="nt"&gt;&amp;lt;/label&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;select&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"status"&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"status"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;option&lt;/span&gt; &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"shipped"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Shipped&lt;span class="nt"&gt;&amp;lt;/option&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/select&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"submit"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Filter&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/form&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"results"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;h2&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"results-heading"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Orders&lt;span class="nt"&gt;&amp;lt;/h2&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;ul&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;li&amp;gt;&lt;/span&gt;Order 1042 — shipped to name@example.com&lt;span class="nt"&gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/ul&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;script&amp;gt;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;form&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'order-filter'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;heading&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'results-heading'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addEventListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'submit'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;event&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;preventDefault&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="c1"&gt;// Fetch and render omitted: the heading and list update in place,&lt;/span&gt;
    &lt;span class="c1"&gt;// with no live region and no focus move.&lt;/span&gt;
    &lt;span class="n"&gt;heading&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;textContent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'3 shipped orders'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Keep a live region in the document before the update, then change its text when the results change. This is a same-document illustration, not a complete orders app. It does not cover a full navigation: a new document is usually announced as a new page.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;form&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"order-filter"&lt;/span&gt; &lt;span class="na"&gt;action&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"https://example.com/orders"&lt;/span&gt; &lt;span class="na"&gt;method&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"get"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;label&lt;/span&gt; &lt;span class="na"&gt;for&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"status"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Status&lt;span class="nt"&gt;&amp;lt;/label&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;select&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"status"&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"status"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;option&lt;/span&gt; &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"shipped"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Shipped&lt;span class="nt"&gt;&amp;lt;/option&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/select&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"submit"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Filter&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/form&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;p&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"results-status"&lt;/span&gt; &lt;span class="na"&gt;role&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"status"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"results"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;h2&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"results-heading"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Orders&lt;span class="nt"&gt;&amp;lt;/h2&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;ul&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;li&amp;gt;&lt;/span&gt;Order 1042 — shipped to name@example.com&lt;span class="nt"&gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/ul&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;script&amp;gt;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;form&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'order-filter'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;status&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'results-status'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;heading&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'results-heading'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addEventListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'submit'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;event&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;preventDefault&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="c1"&gt;// Fetch and render omitted: imagine the list now has three shipped orders.&lt;/span&gt;
    &lt;span class="n"&gt;heading&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;textContent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'3 shipped orders'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="n"&gt;status&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;textContent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'3 shipped orders.'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;role="status"&lt;/code&gt; is a polite live region (it also implies &lt;code&gt;aria-atomic="true"&lt;/code&gt;, so the whole message is read). Updating its text is not a promise that a given screen reader will speak, or when it will speak. If the update is a new view rather than a short status, moving focus to &lt;code&gt;results-heading&lt;/code&gt; can be the clearer path — that is the "or focus management" half of Quick #78. A heading is not focusable by default: add &lt;code&gt;tabindex="-1"&lt;/code&gt; so it can receive focus without joining the tab order. Do not combine a verbose live message and a focus move for the same change without checking that the pair is not noisy. This snippet does not implement fetching, errors, empty results, or a framework lifecycle. Setting the same status text again may not be announced; some implementations clear the region, then set the new text.&lt;/p&gt;

&lt;h2&gt;
  
  
  Do this instead
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Put the live region in the HTML (or create it once on startup) before you change its text. An empty &lt;code&gt;role="status"&lt;/code&gt; is a usual starting point&lt;/li&gt;
&lt;li&gt;Prefer a short, polite status for routine updates ("3 shipped orders."). Reserve assertive alerts for urgent messages; they can interrupt&lt;/li&gt;
&lt;li&gt;Keep the same information visible on the page. Don't announce a result that nobody can see&lt;/li&gt;
&lt;li&gt;Don't announce on every keystroke in a filter box; wait until the results actually change&lt;/li&gt;
&lt;li&gt;Don't put &lt;code&gt;aria-live&lt;/code&gt; on a large, frequently changing block such as the whole results list; announce a short status instead&lt;/li&gt;
&lt;li&gt;If the update replaces the main view, move focus to a sensible heading or container. Give a non-interactive target &lt;code&gt;tabindex="-1"&lt;/code&gt; so it can take focus without joining the tab order. A heading's name usually comes from its text; a generic container needs an accessible name&lt;/li&gt;
&lt;li&gt;Reuse one status region for successive updates rather than stacking new live regions&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Quick check for your app
&lt;/h2&gt;

&lt;p&gt;On a test copy of example.com/orders, run an in-page filter or save with a screen reader your audience uses, and with the keyboard alone. Confirm that the change is announced, or that focus moved to the new content, and that typing a query does not flood announcements. Suitable automated checks can flag a missing live region or a missing focus target; they cannot confirm that assistive technology spoke. Pair them with a manual check on the browsers and screen readers you support. A green suite is evidence for what it actually exercised, not proof that every update is announced.&lt;/p&gt;




&lt;p&gt;The Web HIG is an open set of guidelines for how the web should behave, not a component library. Design systems define how it looks. The Web HIG defines how it behaves.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;GitHub: &lt;a href="https://github.com/frozonfreak/webhig/discussions/36" rel="noopener noreferrer"&gt;https://github.com/frozonfreak/webhig/discussions/36&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Hashnode: &lt;a href="https://thewebhig.hashnode.dev/announce-dynamic-updates-web-hig-tip-18" rel="noopener noreferrer"&gt;https://thewebhig.hashnode.dev/announce-dynamic-updates-web-hig-tip-18&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Dev.to: &lt;a href="https://dev.to/frozonfreak/tell-screen-readers-when-the-content-changes-web-hig-tip-18-3c84"&gt;https://dev.to/frozonfreak/tell-screen-readers-when-the-content-changes-web-hig-tip-18-3c84&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Bluesky: &lt;a href="https://bsky.app/profile/sastha.bsky.social/post/3n2fwblpm4c2e" rel="noopener noreferrer"&gt;https://bsky.app/profile/sastha.bsky.social/post/3n2fwblpm4c2e&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>webdev</category>
      <category>a11y</category>
      <category>html</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Declare your color schemes before the first paint (Web HIG tip #17)</title>
      <dc:creator>FrozonFreak</dc:creator>
      <pubDate>Fri, 13 Nov 2026 06:11:42 +0000</pubDate>
      <link>https://dev.to/frozonfreak/declare-your-color-schemes-before-the-first-paint-web-hig-tip-17-42bl</link>
      <guid>https://dev.to/frozonfreak/declare-your-color-schemes-before-the-first-paint-web-hig-tip-17-42bl</guid>
      <description>&lt;p&gt;You open example.com on a phone that prefers dark mode. The page was authored as light, with no &lt;code&gt;color-scheme&lt;/code&gt; in the head or the first CSS. In the Safari 27.3 beta, with Adaptive Dark Mode turned on, Safari can repaint that light page as dark: colors and light gradients change, some SVG images and simple logos recolor, and some masks or blend effects can be turned off. Scripts that read the page's colors still get the authored values. The page never told the browser which schemes it supports.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Web HIG tip #17 (Quick #64):&lt;/strong&gt; Dark mode must re-verify contrast for every semantic token combination used. Declare supported color schemes in the document head or the initial CSS, before JavaScript. &lt;code&gt;light dark&lt;/code&gt; is the usual declaration when both schemes are supported. &lt;code&gt;light only&lt;/code&gt; is a narrow opt-out, not the default.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why it matters
&lt;/h2&gt;

&lt;p&gt;A missing declaration leaves the browser free to invent an appearance you did not author:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Safari Adaptive Dark Mode may transform a light page that does not declare schemes. Canvas stays as authored; CSS colors, gradients, and some images may not&lt;/li&gt;
&lt;li&gt;Script and computed styles keep the authored values, so the repaint is invisible to ordinary CSS checks and many automated contrast tools&lt;/li&gt;
&lt;li&gt;Text, focus, hover, SVG logos, transparent images, and canvas can look wrong while a lab check still reports the authored contrast&lt;/li&gt;
&lt;li&gt;A declaration added by JavaScript later still takes effect, but the first render may already have used the browser's default light canvas and controls. That is the flash you're trying to avoid. WebKit advises against waiting to inject it with script&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The full HIG covers this in &lt;a href="https://github.com/frozonfreak/webhig/blob/1ab8c28fdf2e1cf9a5a4e07e67afbea20a4bab70/HIG.md#supported-color-schemes" rel="noopener noreferrer"&gt;§3.1, Supported color schemes&lt;/a&gt;: pages that support light and dark appearances MUST declare those schemes in the initial document, before any JavaScript runs. In practice, that means the browser knows the schemes before it first renders the page. &lt;a href="https://github.com/frozonfreak/webhig/blob/1ab8c28fdf2e1cf9a5a4e07e67afbea20a4bab70/HIG-QUICK.md" rel="noopener noreferrer"&gt;Quick #64&lt;/a&gt; is Quick-only guidance (no rule ID of its own). The same section states that Safari's contrast aim after a transformation is not a substitute for checking the authored interface in each supported scheme, including focus, hover, and non-text UI.&lt;/p&gt;

&lt;h2&gt;
  
  
  Before and after
&lt;/h2&gt;

&lt;p&gt;This page has light and dark styles in &lt;code&gt;/styles.css&lt;/code&gt; but never declares its schemes. The browser keeps its own canvas, form controls and scrollbars on light defaults, and Safari's Adaptive Dark Mode has to analyse the page instead of being told:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;html&lt;/span&gt; &lt;span class="na"&gt;lang&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"en"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;title&amp;gt;&lt;/span&gt;Orders — example.com&lt;span class="nt"&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"stylesheet"&lt;/span&gt; &lt;span class="na"&gt;href&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"/styles.css"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;body&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;Orders&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Declare both schemes up front, in markup, in first-paint CSS, or both:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;html&lt;/span&gt; &lt;span class="na"&gt;lang&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"en"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"color-scheme"&lt;/span&gt; &lt;span class="na"&gt;content&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"light dark"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;title&amp;gt;&lt;/span&gt;Orders — example.com&lt;span class="nt"&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;style&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nt"&gt;root&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;color-scheme&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;light&lt;/span&gt; &lt;span class="n"&gt;dark&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/style&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"stylesheet"&lt;/span&gt; &lt;span class="na"&gt;href&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"/styles.css"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;body&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;Orders&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;light dark&lt;/code&gt; tells supporting browsers, including Safari Adaptive Dark Mode, that both appearances are intentional. Only declare &lt;code&gt;dark&lt;/code&gt; when you ship an authored dark appearance (&lt;code&gt;prefers-color-scheme&lt;/code&gt;, &lt;code&gt;light-dark()&lt;/code&gt; or an explicit theme). Otherwise the browser's dark canvas, form controls and system colors can clash with colors you authored for light. Then re-check contrast in that appearance. This snippet does not ship a theme switcher, token files, or a full dark palette.&lt;/p&gt;

&lt;h2&gt;
  
  
  Do this instead
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Put &lt;code&gt;&amp;lt;meta name="color-scheme" content="light dark"&amp;gt;&lt;/code&gt; in the document head, and/or &lt;code&gt;color-scheme: light dark&lt;/code&gt; on &lt;code&gt;:root&lt;/code&gt; (WebKit also accepts &lt;code&gt;body&lt;/code&gt;) in CSS that applies on first paint, such as a &lt;code&gt;&amp;lt;style&amp;gt;&lt;/code&gt; in the head, so the browser has it before the first render and before any theme script runs. Only the root element's scheme sets the page canvas, so prefer &lt;code&gt;:root&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Use &lt;code&gt;light dark&lt;/code&gt; when you support both. Use &lt;code&gt;light only&lt;/code&gt; (and the matching meta value) only when a surface must stay light; it is a narrow opt-out, not the default&lt;/li&gt;
&lt;li&gt;Do not rely on &lt;code&gt;light only&lt;/code&gt; as an opt-out until you've confirmed it works in each browser in your matrix. Browsers have parsed &lt;code&gt;only&lt;/code&gt; for years, and MDN notes Chrome's Auto Dark Theme respects it. But WebKit says Safari 27.3 beta 1's Adaptive Dark Mode did not support it, so it wasn't a working opt-out there&lt;/li&gt;
&lt;li&gt;Re-check contrast for text, focus, hover, and non-text UI in every scheme you declare. Measure authored colors; a browser repaint that computed styles cannot see is not that measurement&lt;/li&gt;
&lt;li&gt;When Safari is in your matrix, keep a visual record (screenshot or equivalent) of Adaptive Dark Mode cases. The HIG requires reviewers to capture these. Automated contrast on computed styles can stay green while the painted page fails&lt;/li&gt;
&lt;li&gt;If the product adds a theme control later, keep the document-level declaration honest about the schemes you actually support&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Quick check for your app
&lt;/h2&gt;

&lt;p&gt;Open example.com and a second key page at a phone width. View source or the Accessibility/Elements panel and confirm a &lt;code&gt;color-scheme&lt;/code&gt; meta tag or first-paint CSS declaration before any theme script. Toggle the OS appearance and, where you support Safari Adaptive Dark Mode, capture light pages with and without the declaration. Compare authored computed colors with what you see painted. Suitable automated checks can catch a missing declaration and authored contrast regressions; they do not prove how Adaptive Dark Mode paints. Pair them with a visual check on the browsers your audience uses.&lt;/p&gt;




&lt;p&gt;The Web HIG is an open set of guidelines for how the web should behave, not a component library. Design systems define how it looks. The Web HIG defines how it behaves.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;GitHub: &lt;a href="https://github.com/frozonfreak/webhig/discussions/35" rel="noopener noreferrer"&gt;https://github.com/frozonfreak/webhig/discussions/35&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Hashnode: &lt;a href="https://thewebhig.hashnode.dev/declare-supported-color-schemes-web-hig-tip-17" rel="noopener noreferrer"&gt;https://thewebhig.hashnode.dev/declare-supported-color-schemes-web-hig-tip-17&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Dev.to: &lt;a href="https://dev.to/frozonfreak/declare-your-color-schemes-before-the-first-paint-web-hig-tip-17-42bl"&gt;https://dev.to/frozonfreak/declare-your-color-schemes-before-the-first-paint-web-hig-tip-17-42bl&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Bluesky: &lt;a href="https://bsky.app/profile/sastha.bsky.social/post/3n26df6xrt22g" rel="noopener noreferrer"&gt;https://bsky.app/profile/sastha.bsky.social/post/3n26df6xrt22g&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>webdev</category>
      <category>css</category>
      <category>a11y</category>
      <category>html</category>
    </item>
    <item>
      <title>Your AI agent reused the wrong kind of screen. Name the experience purpose.</title>
      <dc:creator>FrozonFreak</dc:creator>
      <pubDate>Fri, 13 Nov 2026 06:07:54 +0000</pubDate>
      <link>https://dev.to/frozonfreak/your-ai-agent-reused-the-wrong-kind-of-screen-name-the-experience-purpose-53jh</link>
      <guid>https://dev.to/frozonfreak/your-ai-agent-reused-the-wrong-kind-of-screen-name-the-experience-purpose-53jh</guid>
      <description>&lt;p&gt;Say you ask your AI agent for a staff check-in screen at example.com. It returns a wide editorial layout, a large heading, and a single "Get started" button. You ask for a member briefing instead, and the next result is a dense table with bulk actions.&lt;/p&gt;

&lt;p&gt;The agent reused a familiar pattern from a different kind of work.&lt;/p&gt;

&lt;p&gt;Design Decision Method's agent procedure asks the agent to identify the experience purpose before it decides how a screen should look and behave. The live docs already use that idea in an illustration: a short request is not operational monitoring. The procedure is more specific. It names six purposes: operational work, reading and storytelling, exploration, evaluation and purchase, creation and editing, and participation and collaboration. Mixed-purpose products can use a different approach per flow.&lt;/p&gt;

&lt;p&gt;What follows are four short, fictional illustrations on example.com. They are not case studies, and they do not report measured results.&lt;/p&gt;

&lt;h2&gt;
  
  
  Operational work
&lt;/h2&gt;

&lt;p&gt;A staff tool for checking people into today's workshop. The job is to find a name, mark attendance, and undo a mistake.&lt;/p&gt;

&lt;p&gt;The procedure's purpose reference treats operational work as a heuristic, not a mandatory template. It points to stable placement, visible state, fast entry, and reversible actions. A magazine-style page that hides the current list is the wrong import. So is a decorative metric row that does not help someone complete the check-in.&lt;/p&gt;

&lt;h2&gt;
  
  
  Reading and storytelling
&lt;/h2&gt;

&lt;p&gt;A monthly member briefing: a short article with a clear reading order, headings, and a path into a longer report.&lt;/p&gt;

&lt;p&gt;Here the priorities shift. The reference talks about reading order, pacing, and routes into deeper content. The procedure also says that reading or exploration need not end in a transaction or a single primary button. A checkout-shaped page, or a dashboard of tiles, imports another domain's conventions. The briefing can simply be readable on a phone.&lt;/p&gt;

&lt;h2&gt;
  
  
  Evaluation and purchase
&lt;/h2&gt;

&lt;p&gt;A flow to buy a workshop ticket, with a date, a concession option, the total cost, and the cancellation terms.&lt;/p&gt;

&lt;p&gt;For evaluation and purchase, the reference asks for suitability, variations, availability, total cost, terms, and an informed commitment — plus a way to correct the order. A dense admin table that buries the price is not that job. Neither is a long story page that never states what the buyer is committing to. Acceptance in this flow is about an informed choice, not about finishing a staff task.&lt;/p&gt;

&lt;h2&gt;
  
  
  AI as a capability, not a new purpose
&lt;/h2&gt;

&lt;p&gt;example.com also has a small helper that drafts a workshop description. Because that AI feature already exists, the procedure says to apply AI checks only there: say what the helper can do and where it is limited, separate generating a draft from publishing it, and do not show fabricated confidence figures.&lt;/p&gt;

&lt;p&gt;If the product had no AI feature, the rule is simpler: do not add AI controls. The purpose reference is just as plain: treat AI as a capability within a purpose, not a reason to replace every interface with chat. The ticket flow should stay a ticket flow.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why this matters
&lt;/h2&gt;

&lt;p&gt;Agents are good at completing a pattern they have seen. They are less good at noticing that the pattern belongs to another job. The procedure warns against importing one domain's conventions into another — an operations dashboard for a site that needed a readable page, for example.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://thewebhig.hashnode.dev/your-ai-agent-invents-product-rules-make-it-establish-context-first" rel="noopener noreferrer"&gt;Establish context&lt;/a&gt; is where purpose belongs, alongside audience, frequency, mistake cost, and device. Later, &lt;a href="https://thewebhig.hashnode.dev/done-isn-t-a-test-result-how-your-ai-agent-should-hand-off-ui-work" rel="noopener noreferrer"&gt;deliver and validate&lt;/a&gt; asks for acceptance criteria matched to that purpose: task execution in the check-in tool, comprehension in the briefing, informed purchase in the ticket flow.&lt;/p&gt;

&lt;p&gt;The method does not claim this saves time. That has not been measured. It also does not guarantee a good result. What it gives you is a place to catch a borrowed layout before it hardens.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;p&gt;Design Decision Method is a lightweight design decision workflow for developers building interfaces with AI agents. It follows the open Agent Skills format and is MIT licensed. Install paths for Claude Code, Cursor, Gemini CLI, and Codex are in the README.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://frozonfreak.github.io/DesignDecesionMethod/" rel="noopener noreferrer"&gt;Read the DDM docs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://raw.githubusercontent.com/frozonfreak/DesignDecesionMethod/main/references/modern-design.md" rel="noopener noreferrer"&gt;Purpose-based presentation reference&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://raw.githubusercontent.com/frozonfreak/DesignDecesionMethod/main/README.md" rel="noopener noreferrer"&gt;Repository README and install notes&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>ux</category>
      <category>webdev</category>
      <category>product</category>
    </item>
    <item>
      <title>Six short notes before your AI agent builds a screen</title>
      <dc:creator>FrozonFreak</dc:creator>
      <pubDate>Mon, 09 Nov 2026 16:30:22 +0000</pubDate>
      <link>https://dev.to/frozonfreak/six-short-notes-before-your-ai-agent-builds-a-screen-2c1m</link>
      <guid>https://dev.to/frozonfreak/six-short-notes-before-your-ai-agent-builds-a-screen-2c1m</guid>
      <description>&lt;p&gt;You ask your AI agent for a small change: let someone snooze a reminder on example.com. Without a shared procedure, the reply can grow into controls nobody asked for.&lt;/p&gt;

&lt;p&gt;Design Decision Method is six steps. For a small change, the notes can stay short. This walkthrough takes one fictional feature through all six as light notes — not a case study, not a measured result, and not a claim about every agent.&lt;/p&gt;

&lt;p&gt;The product details below are invented for the illustration.&lt;/p&gt;

&lt;h2&gt;
  
  
  The brief
&lt;/h2&gt;

&lt;p&gt;example.com already has reminders with a title, a due time, and a done action. You want snooze on the existing reminder detail view: one hour, tomorrow morning, or a time the person picks. No new navigation. No new object types.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Establish context
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Audience:&lt;/strong&gt; People who already use reminders on their phone.&lt;br&gt;
&lt;strong&gt;Task / frequency:&lt;/strong&gt; Snooze an upcoming reminder; occasional.&lt;br&gt;
&lt;strong&gt;Cost of a mistake:&lt;/strong&gt; Medium — a bad snooze can make someone miss a follow-up.&lt;br&gt;
&lt;strong&gt;Device:&lt;/strong&gt; Phone first.&lt;br&gt;
&lt;strong&gt;Known:&lt;/strong&gt; Title, due time, and done already exist. There is no calendar product.&lt;br&gt;
&lt;strong&gt;Assumed (marked):&lt;/strong&gt; Quiet hours were not requested, so none are designed.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Enough for &lt;a href="https://thewebhig.hashnode.dev/your-ai-agent-invents-product-rules-make-it-establish-context-first" rel="noopener noreferrer"&gt;establish context&lt;/a&gt;: who it is for, how often it happens, what a mistake costs, and what the product already has.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Choose the visual system
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Keep the project's existing components and tokens. This change adds snooze actions; it does not introduce a new visual identity.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;One line is enough when a system already exists. &lt;a href="https://thewebhig.hashnode.dev/your-ai-agent-added-a-feature-why-did-it-redesign-the-buttons" rel="noopener noreferrer"&gt;Choose the visual system&lt;/a&gt; starts there.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Object map — run the gate
&lt;/h2&gt;

&lt;p&gt;The docs ask for a map when relationships would change the navigation, the routes, or the structure of the screen. Skip the map when the change does not depend on those relationships, such as a copy edit or a restyle that leaves the structure alone.&lt;/p&gt;

&lt;p&gt;The agent procedure records the gate in one line:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Map: skipped&lt;/strong&gt; — snooze adds actions on an existing reminder detail view. No new object types, no new routes, and navigation is unchanged.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;When relationships would reshape the screen, &lt;a href="https://thewebhig.hashnode.dev/when-should-your-ai-agent-map-objects-before-layout" rel="noopener noreferrer"&gt;map objects before layout&lt;/a&gt;. When they would not, do not invent a map for theatre.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Decision record
&lt;/h2&gt;

&lt;p&gt;One consequential choice:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Decision:&lt;/strong&gt; Three snooze presets (1 hour, tomorrow morning, pick a time). Presets first; custom time secondary.&lt;br&gt;
&lt;strong&gt;Frequency / familiarity:&lt;/strong&gt; Occasional; snooze is already familiar elsewhere.&lt;br&gt;
&lt;strong&gt;Error cost:&lt;/strong&gt; Medium if the new time is unclear.&lt;br&gt;
&lt;strong&gt;Device:&lt;/strong&gt; Phone.&lt;br&gt;
&lt;strong&gt;Why:&lt;/strong&gt; Presets cover common cases with less entry effort than opening a full picker every time.&lt;br&gt;
&lt;strong&gt;Assumption:&lt;/strong&gt; "Tomorrow morning" means 09:00 in the person's local timezone — marked, not smuggled in as an unmarked product rule.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;A &lt;a href="https://thewebhig.hashnode.dev/your-ai-agent-forgets-why-give-it-a-decision-record" rel="noopener noreferrer"&gt;decision record&lt;/a&gt; is for choices that are costly to undo, not for every spacing tweak.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Structure each view
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Purpose:&lt;/strong&gt; Delay one reminder without opening a separate settings flow.&lt;br&gt;
&lt;strong&gt;Information to decide:&lt;/strong&gt; Reminder title, current due time, and the new time.&lt;br&gt;
&lt;strong&gt;Actions:&lt;/strong&gt; Snooze 1 hour; until tomorrow morning; pick a time; cancel.&lt;br&gt;
&lt;strong&gt;States:&lt;/strong&gt; Loading while saving; error if save fails (keep the reminder identity visible); success shows the new time on the detail view.&lt;br&gt;
&lt;strong&gt;Device:&lt;/strong&gt; Presets and cancel stay available on a narrow screen.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://thewebhig.hashnode.dev/your-ai-agent-draws-a-pretty-layout-make-it-structure-the-view-first" rel="noopener noreferrer"&gt;Structure each view&lt;/a&gt; before the chrome.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Deliver and validate
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Delivered:&lt;/strong&gt; Snooze actions on reminder detail (code), plus the notes above.&lt;br&gt;
&lt;strong&gt;Acceptance / evidence:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Choosing "1 hour" updates the due time. &lt;em&gt;Manual test&lt;/em&gt; on one phone-sized viewport.&lt;/li&gt;
&lt;li&gt;Custom time rejects empty input and keeps the previous due time visible. &lt;em&gt;Heuristic review&lt;/em&gt; of the flow only.&lt;/li&gt;
&lt;li&gt;Contrast on the snooze actions. &lt;em&gt;Automated check&lt;/em&gt; on the colours used — not a claim about the whole product.&lt;/li&gt;
&lt;li&gt;People finish snooze without help. &lt;em&gt;Proposed.&lt;/em&gt; Not tested. No user research.
&lt;strong&gt;Not tested:&lt;/strong&gt; screen reader pass, offline behaviour, other timezones beyond the marked assumption.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://thewebhig.hashnode.dev/done-isn-t-a-test-result-how-your-ai-agent-should-hand-off-ui-work" rel="noopener noreferrer"&gt;Deliver and validate&lt;/a&gt; labels what each result rests on and says what was not tested. Nothing above invents a measurement.&lt;/p&gt;

&lt;h2&gt;
  
  
  Keep it light
&lt;/h2&gt;

&lt;p&gt;Six steps, still light: short context, a one-line visual keep, a skipped map with a reason, one decision, a compact view note, and an honest handoff. The method is a shared procedure, not mandatory for every small edit. It does not claim this saves time — that has not been measured. What it gives you is a trail of decisions the next prompt can reuse.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;p&gt;Design Decision Method is a lightweight design decision workflow for developers building interfaces with AI agents. It follows the open Agent Skills format and is MIT licensed. Install paths for Claude Code, Cursor, Gemini CLI, and Codex are in the README.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://frozonfreak.github.io/DesignDecesionMethod/" rel="noopener noreferrer"&gt;Read the DDM docs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://raw.githubusercontent.com/frozonfreak/DesignDecesionMethod/main/README.md" rel="noopener noreferrer"&gt;Repository README and install notes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://raw.githubusercontent.com/frozonfreak/DesignDecesionMethod/main/assets/design-record-template.md" rel="noopener noreferrer"&gt;Design record template&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>webdev</category>
      <category>ux</category>
      <category>ai</category>
      <category>agents</category>
    </item>
    <item>
      <title>Did Place order work? Show the pending state (Web HIG tip #16)</title>
      <dc:creator>FrozonFreak</dc:creator>
      <pubDate>Sun, 08 Nov 2026 09:50:26 +0000</pubDate>
      <link>https://dev.to/frozonfreak/did-place-order-work-show-the-pending-state-web-hig-tip-16-3f4</link>
      <guid>https://dev.to/frozonfreak/did-place-order-work-show-the-pending-state-web-hig-tip-16-3f4</guid>
      <description>&lt;p&gt;Someone taps &lt;strong&gt;Place order&lt;/strong&gt; on a slow connection. Nothing changes on screen. Did the tap register? Should they try again? A missing pending state leaves them guessing. If repeat requests reach an unprotected endpoint, that uncertainty can also become a duplicate order.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Web HIG tip #16 (Quick #45):&lt;/strong&gt; Server mutations must show pending UI immediately — disable submit, show spinner.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why it matters
&lt;/h2&gt;

&lt;p&gt;A request in flight is invisible unless the interface makes it visible. Without that signal:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;People can't tell a slow request from a tap that didn't register, so they tap again&lt;/li&gt;
&lt;li&gt;Each extra tap can become another order, payment, invite or post&lt;/li&gt;
&lt;li&gt;Keyboard users can face the same uncertainty; Enter can submit a form, depending on its controls and platform conventions&lt;/li&gt;
&lt;li&gt;If the page looks frozen, some people reload or leave halfway through&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The full HIG covers this in &lt;a href="https://github.com/frozonfreak/webhig/blob/1ab8c28fdf2e1cf9a5a4e07e67afbea20a4bab70/HIG.md#42-async-mutation--server-action-state-model" rel="noopener noreferrer"&gt;§4.2, Async Mutation &amp;amp; Server Action State Model&lt;/a&gt;: forms executing server mutations MUST supply immediate visual feedback without waiting for server response round-trips. &lt;a href="https://github.com/frozonfreak/webhig/blob/1ab8c28fdf2e1cf9a5a4e07e67afbea20a4bab70/HIG-QUICK.md" rel="noopener noreferrer"&gt;Quick #47&lt;/a&gt; adds that critical mutations should be idempotent. &lt;a href="https://github.com/frozonfreak/webhig/blob/1ab8c28fdf2e1cf9a5a4e07e67afbea20a4bab70/HIG.md#45-concurrency-conflict--idempotency" rel="noopener noreferrer"&gt;§4.5&lt;/a&gt; says important mutations SHOULD use idempotency keys at the product/API layer. That protects the intended effect of an operation when requests repeat; it does not guarantee a single network request.&lt;/p&gt;

&lt;h2&gt;
  
  
  Before and after
&lt;/h2&gt;

&lt;p&gt;This bare native POST form has no application-specific pending feedback. The browser may show navigation progress, but the button does not explain what is happening:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;form&lt;/span&gt; &lt;span class="na"&gt;action=&lt;/span&gt;&lt;span class="s"&gt;"https://example.com/orders"&lt;/span&gt; &lt;span class="na"&gt;method=&lt;/span&gt;&lt;span class="s"&gt;"post"&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"checkout"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"submit"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Place order&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/form&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here is a &lt;strong&gt;client-side pending-state illustration&lt;/strong&gt;, not a complete checkout. It keeps native POST navigation and assumes this is the form's only submission handler. It disables the single submit button and guards against later &lt;code&gt;submit&lt;/code&gt; events while pending:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;form&lt;/span&gt; &lt;span class="na"&gt;action=&lt;/span&gt;&lt;span class="s"&gt;"https://example.com/orders"&lt;/span&gt; &lt;span class="na"&gt;method=&lt;/span&gt;&lt;span class="s"&gt;"post"&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"checkout"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="c"&gt;&amp;lt;!-- Order fields and server-side security protections are omitted. --&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"submit"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;span&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"checkout-spinner"&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"spinner"&lt;/span&gt; &lt;span class="na"&gt;hidden&lt;/span&gt; &lt;span class="na"&gt;aria-hidden=&lt;/span&gt;&lt;span class="s"&gt;"true"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/span&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;span&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"checkout-label"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Place order&lt;span class="nt"&gt;&amp;lt;/span&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;p&lt;/span&gt; &lt;span class="na"&gt;role=&lt;/span&gt;&lt;span class="s"&gt;"status"&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"checkout-status"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/form&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;style&amp;gt;&lt;/span&gt;
  &lt;span class="nc"&gt;.spinner&lt;/span&gt;&lt;span class="nd"&gt;:not&lt;/span&gt;&lt;span class="o"&gt;([&lt;/span&gt;&lt;span class="nt"&gt;hidden&lt;/span&gt;&lt;span class="o"&gt;])&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;inline-block&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0.8em&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0.8em&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;border&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;2px&lt;/span&gt; &lt;span class="nb"&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="py"&gt;border-inline-end-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;transparent&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;border-radius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;50%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;animation&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;spin&lt;/span&gt; &lt;span class="m"&gt;1s&lt;/span&gt; &lt;span class="nb"&gt;linear&lt;/span&gt; &lt;span class="nb"&gt;infinite&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="k"&gt;@keyframes&lt;/span&gt; &lt;span class="n"&gt;spin&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nt"&gt;to&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;transform&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;rotate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;360deg&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="k"&gt;@media&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;prefers-reduced-motion&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;reduce&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nc"&gt;.spinner&lt;/span&gt;&lt;span class="nd"&gt;:not&lt;/span&gt;&lt;span class="o"&gt;([&lt;/span&gt;&lt;span class="nt"&gt;hidden&lt;/span&gt;&lt;span class="o"&gt;])&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;animation&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;none&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/style&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;script&amp;gt;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;form&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;checkout&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;button&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;querySelector&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;button[type="submit"]&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;label&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;checkout-label&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;spinner&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;checkout-spinner&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;status&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;checkout-status&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;submitting&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;resetPending&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;submitting&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nx"&gt;button&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;disabled&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nx"&gt;label&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;textContent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Place order&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nx"&gt;spinner&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;hidden&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nx"&gt;status&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;textContent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;''&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="nf"&gt;resetPending&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="nx"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addEventListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;submit&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;defaultPrevented&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;submitting&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;preventDefault&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
      &lt;span class="k"&gt;return&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="nx"&gt;submitting&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nx"&gt;button&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;disabled&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nx"&gt;label&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;textContent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Placing order…&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nx"&gt;spinner&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;hidden&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nx"&gt;status&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;textContent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Placing your order…&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="c1"&gt;// Let this first submission continue as a native POST navigation.&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;

  &lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addEventListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;pageshow&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;persisted&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="nf"&gt;resetPending&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The handler updates the label, spinner and status text synchronously, before waiting for a response. A fast navigation may replace the page before that feedback is painted or announced. &lt;code&gt;role="status"&lt;/code&gt; is a polite live region, not a promise that a screen reader will speak before navigation.&lt;/p&gt;

&lt;p&gt;The guard covers only later &lt;code&gt;submit&lt;/code&gt; events on this page while its flag is set. A direct &lt;code&gt;form.submit()&lt;/code&gt; call bypasses that event. Other tabs, reloads and retries remain outside its scope. The &lt;code&gt;pageshow&lt;/code&gt; handler resets the UI when this document returns from the back/forward cache; it does not establish whether an order succeeded.&lt;/p&gt;

&lt;p&gt;This snippet does &lt;strong&gt;not&lt;/strong&gt; handle a blocked or cancelled navigation, an in-page request failure, or a successful order response. A real flow needs outcome and recovery UI, preserved input, and server-side validation and security protections. Do not drop this handler into a framework-managed form without adapting it to that form's lifecycle.&lt;/p&gt;

&lt;p&gt;A hidden input named &lt;code&gt;idempotency_key&lt;/code&gt; would not solve duplication by itself. The server must implement deduplication, including concurrent requests, and bind a key to the same intended operation and authorised caller. Reuse that key for retries of that operation, not unrelated new orders; define payload checks and expiry. If a response is lost, do not assume the order failed. Check its outcome before starting another order. Those server and recovery pieces are outside this example.&lt;/p&gt;

&lt;h2&gt;
  
  
  Do this instead
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Update pending feedback in the submission handler, without waiting for the network: disable the submit trigger, show an inline pending indicator, and keep a meaningful label such as "Saving…" or "Sending…"&lt;/li&gt;
&lt;li&gt;Keep the label meaningful. A spinner alone tells people something is happening, not what&lt;/li&gt;
&lt;li&gt;Show a clear result. For in-page requests, leave pending state when the outcome is known; on a recoverable failure, restore usable controls and preserve the input&lt;/li&gt;
&lt;li&gt;For native navigation, provide a usable result or error page and a safe route back. A connection failure can leave the outcome unknown: offer a way to check it rather than blindly retrying&lt;/li&gt;
&lt;li&gt;Don't rely on the disabled button alone. Important mutations need server-side repeat-request protection; a key only helps when the endpoint actually enforces it&lt;/li&gt;
&lt;li&gt;If your framework exposes submission state, use its documented pending and recovery lifecycle, and test that feedback does not wait for the server response&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Quick check for your app
&lt;/h2&gt;

&lt;p&gt;Use a test environment, not a real payment or production invite. Slow down the response and check that the label and pending indicator update without waiting for it. Try repeated clicks and, where supported, Enter submission. Inspect the network, but also verify the server-side result: deliberately repeated requests for the same operation should not create duplicate orders. Test concurrent requests too.&lt;/p&gt;

&lt;p&gt;Exercise validation failures, lost responses, recoverable errors, Back navigation and a retry of the same operation. Check keyboard use, reduced motion and screen-reader feedback; for native navigation, inspect the destination page as well as the pending state. Suitable automated browser and server tests can catch these problems. Pair them with manual checks on the browsers and assistive technology your audience uses. A green suite is evidence for what it actually exercised, not proof that every failure path works.&lt;/p&gt;




&lt;p&gt;The Web HIG is an open set of guidelines for how the web should behave, not a component library. Design systems define how it looks. The Web HIG defines how it behaves.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;GitHub: &lt;a href="https://github.com/frozonfreak/webhig/discussions/33" rel="noopener noreferrer"&gt;https://github.com/frozonfreak/webhig/discussions/33&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Hashnode: &lt;a href="https://thewebhig.hashnode.dev/show-pending-on-submit-web-hig-tip-16" rel="noopener noreferrer"&gt;https://thewebhig.hashnode.dev/show-pending-on-submit-web-hig-tip-16&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Dev.to: &lt;a href="https://dev.to/frozonfreak/did-place-order-work-show-the-pending-state-web-hig-tip-16-3f4"&gt;https://dev.to/frozonfreak/did-place-order-work-show-the-pending-state-web-hig-tip-16-3f4&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Bluesky: &lt;a href="https://bsky.app/profile/sastha.bsky.social/post/3mzs5erm5m22f" rel="noopener noreferrer"&gt;https://bsky.app/profile/sastha.bsky.social/post/3mzs5erm5m22f&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>webdev</category>
      <category>ux</category>
      <category>javascript</category>
      <category>forms</category>
    </item>
    <item>
      <title>Your AI agent added a feature. Why did it redesign the buttons?</title>
      <dc:creator>FrozonFreak</dc:creator>
      <pubDate>Sun, 08 Nov 2026 09:50:00 +0000</pubDate>
      <link>https://dev.to/frozonfreak/your-ai-agent-added-a-feature-why-did-it-redesign-the-buttons-5h7o</link>
      <guid>https://dev.to/frozonfreak/your-ai-agent-added-a-feature-why-did-it-redesign-the-buttons-5h7o</guid>
      <description>&lt;p&gt;You ask your AI agent to add an invoice filter to an existing product. The new screen comes back with pill-shaped buttons, a different type scale, and a new accent colour. The rest of the product still uses square buttons and the original tokens.&lt;/p&gt;

&lt;p&gt;You wanted a filter. You got a second visual direction.&lt;/p&gt;

&lt;p&gt;That is the problem this illustration starts with, not a claim about every agent. Design Decision Method's second step, choose the visual system, gives the agent a place to check what already exists before proposing something else.&lt;/p&gt;

&lt;h2&gt;
  
  
  Keep the system the project has
&lt;/h2&gt;

&lt;p&gt;The live docs put the starting point plainly: keep a system the project already has. When it has none, select from the platform.&lt;/p&gt;

&lt;p&gt;The agent procedure adds an important qualification: retain and extend a &lt;strong&gt;suitable&lt;/strong&gt; existing system, brand, or platform direction, and verify its actual tokens, components, and supported versions. If the brief explicitly requests a different direction, assess that request first, including accessibility and platform constraints, migration scope, and consequential conflicts.&lt;/p&gt;

&lt;p&gt;So this is not a rule against redesign. It is a rule against treating an ordinary feature request as permission to redesign.&lt;/p&gt;

&lt;h2&gt;
  
  
  A worked example: invoice filters on example.com
&lt;/h2&gt;

&lt;p&gt;Imagine a small invoicing product at example.com. It already has an in-house component library, named colour roles, and a documented type scale. You ask for a filter that lets customers show unpaid invoices.&lt;/p&gt;

&lt;p&gt;This is a fictional illustration, not a case study or a measured result. The product details and the following note are invented for the example.&lt;/p&gt;

&lt;p&gt;Before building, the agent's note could read:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Existing direction:&lt;/strong&gt; Keep the product's in-house system. This request adds filtering, not a new visual identity.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Reuse:&lt;/strong&gt; Use the existing button and select components, the established text styles, and the project's colour roles. Check their definitions and supported states rather than recreating them from a screenshot.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Interaction need:&lt;/strong&gt; Let someone choose an invoice status and clear the filter. If outside guidance helps with that interaction, adapt the behaviour into the existing components rather than importing another visual identity.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Gap:&lt;/strong&gt; If a needed state is missing from the component library, flag it and propose an extension. Do not silently introduce a second button family.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Now the review has something concrete to compare against. Did the implementation use the existing components? Is a new style an intentional extension or an unexplained replacement? A polished screenshot alone cannot answer those questions.&lt;/p&gt;

&lt;h2&gt;
  
  
  An interaction pattern is not a brand
&lt;/h2&gt;

&lt;p&gt;Choosing the visual system and borrowing an interaction pattern are separate decisions in DDM.&lt;/p&gt;

&lt;p&gt;A filtering pattern might help organise choices. That does not mean the page needs the source system's colours, typography, or branding. The procedure says to borrow patterns when they solve the task, not to mix competing visual identities on one surface.&lt;/p&gt;

&lt;p&gt;In the invoice example, an outside pattern would need a specific reason to be used. It is not a reason to replace the product's visual language. The question is what the interaction helps someone do, then how to express it within the system already chosen.&lt;/p&gt;

&lt;h2&gt;
  
  
  What if there is no system?
&lt;/h2&gt;

&lt;p&gt;Then the platform matters. DDM's procedure gives selection rules rather than asking the agent to pick a favourite. For other web or cross-platform work with no system, it names Material 3 as the fallback, with implementation support checked.&lt;/p&gt;

&lt;p&gt;That is a conditional fallback, not a ranking of design systems or an instruction to replace an existing one. The procedure also recognises documented bespoke or editorial direction. Use the applicable row, and check what the project's stack actually supports.&lt;/p&gt;

&lt;p&gt;The accompanying reference asks the agent to inspect tokens, components, screenshots, and installed dependencies. Those are clues to investigate, not substitutes for understanding the project's visual decisions.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;p&gt;Choose the visual system is step 2 of DDM's six-step workflow. For your next feature request, ask the agent to identify the existing system, what it will reuse, and any gaps before it proposes new styling.&lt;/p&gt;

&lt;p&gt;Design Decision Method is a lightweight design decision workflow for developers building interfaces with AI agents. It follows the open Agent Skills format and is MIT licensed. The README documents installation for Claude Code, Cursor, Gemini CLI, and Codex.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://frozonfreak.github.io/DesignDecesionMethod/" rel="noopener noreferrer"&gt;Read the DDM docs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://raw.githubusercontent.com/frozonfreak/DesignDecesionMethod/main/README.md" rel="noopener noreferrer"&gt;Read the repository README and installation notes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://raw.githubusercontent.com/frozonfreak/DesignDecesionMethod/main/references/visual-systems.md" rel="noopener noreferrer"&gt;Read the visual-system adoption checks&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>ux</category>
      <category>webdev</category>
      <category>frontend</category>
    </item>
  </channel>
</rss>
