<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>accessibility on Retro Dispatch</title><link>https://phantompixeldev.github.io/hugo-theme-retrocss/tags/accessibility/</link><description>Recent content in accessibility on Retro Dispatch</description><generator>Hugo</generator><language>en-us</language><copyright>© 2026 Retro Dispatch</copyright><lastBuildDate>Fri, 21 Aug 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://phantompixeldev.github.io/hugo-theme-retrocss/tags/accessibility/index.xml" rel="self" type="application/rss+xml"/><item><title>Why your div is not a button</title><link>https://phantompixeldev.github.io/hugo-theme-retrocss/posts/why-your-div-is-not-a-button/</link><pubDate>Fri, 21 Aug 2026 00:00:00 +0000</pubDate><guid>https://phantompixeldev.github.io/hugo-theme-retrocss/posts/why-your-div-is-not-a-button/</guid><description>&lt;p&gt;A &lt;code&gt;div&lt;/code&gt; with a click handler looks like a button and behaves like nothing.&lt;/p&gt;
&lt;h2 id="what-you-lose"&gt;
 What you lose
 &lt;a class="heading-anchor" href="#what-you-lose" aria-label="Link to What you lose"&gt;&lt;span aria-hidden="true"&gt;#&lt;/span&gt;&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;Tab order. Enter and Space. The implicit &lt;code&gt;button&lt;/code&gt; role. The disabled state.
Form submission. Focus visibility. Every one of those is a line of code you now
own, and a line you will forget on the next component.&lt;/p&gt;
&lt;h2 id="what-it-costs-to-get-back"&gt;
 What it costs to get back
 &lt;a class="heading-anchor" href="#what-it-costs-to-get-back" aria-label="Link to What it costs to get back"&gt;&lt;span aria-hidden="true"&gt;#&lt;/span&gt;&lt;/a&gt;
&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma retro-code"&gt;&lt;code class="language-html" data-lang="html"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&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;&amp;#34;button&amp;#34;&lt;/span&gt; &lt;span class="na"&gt;tabindex&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;0&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="na"&gt;onkeydown&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;if (event.key === &amp;#39;Enter&amp;#39; || event.key === &amp;#39; &amp;#39;) this.click()&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; Save
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;That is the &lt;em&gt;minimum&lt;/em&gt;, and it still does not report a disabled state, still does
not submit a form, and still needs &lt;code&gt;event.preventDefault()&lt;/code&gt; so Space does not
scroll the page.&lt;/p&gt;</description></item><item><title>Sign-in forms that behave when the network does not</title><link>https://phantompixeldev.github.io/hugo-theme-retrocss/posts/auth-forms-that-behave/</link><pubDate>Sat, 18 Jul 2026 00:00:00 +0000</pubDate><guid>https://phantompixeldev.github.io/hugo-theme-retrocss/posts/auth-forms-that-behave/</guid><description>&lt;p&gt;The happy path of a sign-in form is four elements. Everything else is the
interesting part.&lt;/p&gt;
&lt;h2 id="the-states-worth-building"&gt;
 The states worth building
 &lt;a class="heading-anchor" href="#the-states-worth-building" aria-label="Link to The states worth building"&gt;&lt;span aria-hidden="true"&gt;#&lt;/span&gt;&lt;/a&gt;
&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Pending&lt;/strong&gt; — the button is busy, not disabled-and-silent.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Rejected&lt;/strong&gt; — the message is next to the field, not in a toast that vanished.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Rate-limited&lt;/strong&gt; — say how long, not &amp;ldquo;try again later&amp;rdquo;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Offline&lt;/strong&gt; — the form should still hold what was typed.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="the-password-toggle"&gt;
 The password toggle
 &lt;a class="heading-anchor" href="#the-password-toggle" aria-label="Link to The password toggle"&gt;&lt;span aria-hidden="true"&gt;#&lt;/span&gt;&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;Make it a real &lt;code&gt;button&lt;/code&gt; with &lt;code&gt;aria-pressed&lt;/code&gt;, keep the field type in sync, and
never place it where it covers the text it reveals.&lt;/p&gt;</description></item></channel></rss>