<?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: Raxy</title>
    <description>The latest articles on DEV Community by Raxy (@elraxxxy).</description>
    <link>https://dev.to/elraxxxy</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%2F4235553%2Fd91a566f-0857-4d2d-b782-f360873f7840.png</url>
      <title>DEV Community: Raxy</title>
      <link>https://dev.to/elraxxxy</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/elraxxxy"/>
    <language>en</language>
    <item>
      <title>What validators miss when a coding agent writes your HTML</title>
      <dc:creator>Raxy</dc:creator>
      <pubDate>Mon, 09 Nov 2026 16:56:43 +0000</pubDate>
      <link>https://dev.to/elraxxxy/what-validators-miss-when-a-coding-agent-writes-your-html-43ni</link>
      <guid>https://dev.to/elraxxxy/what-validators-miss-when-a-coding-agent-writes-your-html-43ni</guid>
      <description>&lt;p&gt;Ask a coding agent for a "Save" button and you sometimes get this:&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;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"btn"&lt;/span&gt; &lt;span class="na"&gt;onclick=&lt;/span&gt;&lt;span class="s"&gt;"save()"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Save&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run it through the Nu HTML Checker: valid. Run it through axe-core: no violations. Ship it.&lt;/p&gt;

&lt;p&gt;Now press Tab. Nothing focuses it. Press Enter: nothing happens. A keyboard user, or anyone on a screen reader, cannot use your Save button, and both of the tools you trusted said it was fine.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why the validators pass it
&lt;/h2&gt;

&lt;p&gt;A &lt;code&gt;&amp;lt;div onclick&amp;gt;&lt;/code&gt; is well-formed HTML. Nu checks that the markup is valid, and a div is valid. axe checks the rendered page against a set of known accessibility failures, and a plain div with a click handler does not reliably match a rule it can detect, because axe cannot know the div was &lt;em&gt;meant&lt;/em&gt; to be a button.&lt;/p&gt;

&lt;p&gt;That is the gap: the mistake is choosing the wrong element, and that choice happens before anything gets validated. No validator run afterwards can recover the intent.&lt;/p&gt;

&lt;p&gt;I wrote 9 small before/after examples: a clickable div, a div "modal", a stack of divs used as a list, and so on. 5 of the 9 broken versions pass &lt;strong&gt;both&lt;/strong&gt; Nu and axe. The validators catch the other 4 (a missing alt, a bad heading order, a missing label, a stray tabindex), but they are blind to the element-choice ones.&lt;/p&gt;

&lt;h2&gt;
  
  
  Measuring it
&lt;/h2&gt;

&lt;p&gt;I built a skill called divorce that does two things: it pushes the agent to use the native element first (&lt;code&gt;&amp;lt;button&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;dialog&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;details&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;ul&amp;gt;&lt;/code&gt;), and then it checks the output with Nu and axe and reports pass / fail / not_measured from a script, not from the model.&lt;/p&gt;

&lt;p&gt;To see whether the nudge changes anything, I ran the same agent on 8 small UI tasks, 5 runs each: 80 generated pages, half with the skill and half without, and measured every page afterwards.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;metric&lt;/th&gt;
&lt;th&gt;change (with vs without)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;HTML lines&lt;/td&gt;
&lt;td&gt;-29%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;JavaScript lines&lt;/td&gt;
&lt;td&gt;-41%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ARIA attributes&lt;/td&gt;
&lt;td&gt;-33%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;axe violation nodes&lt;/td&gt;
&lt;td&gt;8.2 to 2.0 per run&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Two honest caveats:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;One number went the wrong way.&lt;/strong&gt; 3 of the 40 pages written with the skill had Nu validation errors, against 0 of 40 without. It is in the README next to the good numbers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The eval tool's own score gave both arms the same grade.&lt;/strong&gt; If I had trusted that score I would have concluded the skill did nothing. The difference only showed up when I measured the actual HTML, which is the whole point of this post.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It is one model on one machine with synthetic tasks, so read it as a direction, not a result. And fewer ARIA attributes is not automatically "more accessible": often the native element simply does not need the ARIA that a div reimplementation bolts on. You still have to test with a keyboard.&lt;/p&gt;

&lt;h2&gt;
  
  
  The takeaway
&lt;/h2&gt;

&lt;p&gt;If an agent writes your HTML, a green validator is necessary but not sufficient. The cheapest real test is still this: unplug the mouse and press Tab through the page. If you cannot reach a control, no tool was going to tell you.&lt;/p&gt;

&lt;p&gt;The skill is MIT, and the raw numbers and method are in the repo: &lt;a href="https://github.com/ElRaxy/divorce" rel="noopener noreferrer"&gt;https://github.com/ElRaxy/divorce&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>html</category>
      <category>a11y</category>
      <category>ai</category>
    </item>
  </channel>
</rss>
