<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet type="text/css" href="https://www.aaron-gustafson.com/c/feed.min.css" ?><feed xmlns="http://www.w3.org/2005/Atom"
      xmlns:amg="https://www.aaron-gustafson.com.com/amg-dtd/"><title>Aaron Gustafson: Content tagged web design</title><subtitle>The latest 20 posts and links tagged web design.</subtitle><id>https://www.aaron-gustafson.com</id><link href="https://www.aaron-gustafson.com/feeds/web-design.xml" rel="self"/><link href="https://www.aaron-gustafson.com"/><author><name>Aaron Gustafson</name><uri>https://www.aaron-gustafson.com</uri></author><updated>2026-11-09T18:42:04Z</updated><entry><id>https://www.aaron-gustafson.com/notebook/system-colors-need-to-work-together/</id><title type="html"><![CDATA[✍🏻 System Colors Need to Work Together]]></title><link href="https://www.aaron-gustafson.com/notebook/system-colors-need-to-work-together/" rel="alternate" type="text/html" /><published>2026-11-09T18:42:04Z</published><content type="html" xml:base="https://www.aaron-gustafson.com"><![CDATA[<p>While testing out <a href="/notebook/theme-switching-made-easy/">a recent web component</a>, I discovered the demo I’d built made active buttons totally inaccessible, but only on Android in dark mode. I was baffled because I intentionally use system colors in all my web components and their demos. In the browsers I’d been testing, the pair looked great in both dark and light themes, but over on my phone it was a different story.</p><p>In Chrome’s dark mode on Android, <code>HighlightText</code> is a mid-tone grey. <code>Highlight</code> is a mid-tone blue. The contrast was abysmal—a mere 1.98:1, failing all five contrast thresholds in the Web Content Accessibility Guidelines (WCAG). I wish I could say it was the first time I’d stumbled on this kind of issue. A week or so earlier, a user <a href="https://github.com/aarongustafson/tabbed-interface/issues/8">reported similar trouble in my tabbed interface demo with Windows in forced-color mode</a>. I’d mistakenly thought forced-color mode was the primary issue. It wasn’t.</p><p>In both cases, I’d expected colors named for foreground and background roles to work together. Apparently, that was asking too much.</p><p>These experiences prompted me to build the <a href="https://aarongustafson.github.io/system-color-study/">System Color Study</a>: a resource for comparing browser-provided colors and their intended pairings across browsers, operating systems, and preferences. I’m using it to inform my component work; I hope it’ll help you too.</p><h2 id="names-clearly-aren%E2%80%99t-enough-to-go-on" tabindex="-1"><a class="header-anchor" href="#names-clearly-aren%E2%80%99t-enough-to-go-on" aria-hidden="true">#</a> Names clearly aren’t enough to go on</h2><p><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Values/system-color">CSS system colors</a> describe jobs rather than particular hues. <code>Canvas</code> is a page background; <code>CanvasText</code> is text on that background. <code>ButtonText</code> goes with <code>ButtonFace</code>, <code>FieldText</code> with <code>Field</code>, and <code>HighlightText</code> with <code>Highlight</code>. The browser supplies the actual color value based on the operating system and user preferences.</p><p>That’s appealing when you’re building reusable components. Rather than having to define a palette, you can use colors intended for the roles you need, with room for people’s preferences. It also allows you to create UIs that feel less opinionated and more like part of the web platform. Sadly, as my examples illustrate, the names alone don’t tell you whether someone will be able to read the result.</p><h2 id="looking-at-colors-together" tabindex="-1"><a class="header-anchor" href="#looking-at-colors-together" aria-hidden="true">#</a> Looking at colors together</h2><p>The study presents saved observations across light, dark, forced-color, and more-contrast settings. Its individual-color table shows resolved sRGB hex values, so you can compare a keyword across environments. This table lets you see how the color varies across the recorded environments without having to test each one yourself.</p><p>To really understand where all the jagged edges are, we need to compare what happens when we combine these colors, not just their values in isolation.</p><p>The paired examples table puts each explicit foreground on its intended background, with “Normal” and “Large” text examples and an SVG face icon drawn in the foreground color. This lets you see how the pairs work (or don’t) across myriad browser, OS, and preference combinations.</p><p>Next to each pairing is a column containing its contrast ratio and results against five WCAG contrast thresholds: normal-text AA, normal-text AAA, large-text AA, large-text AAA, and non-text. To make scanning the table a little easier, these contrast cells have a green background if all five thresholds pass, an amber background if some pass, and a red one if all five fail. The SVG face is smiling, neutral, or frowning based on these results too.</p><p>A few additional notes:</p><ul><li>Cells with <code>N/A</code> indicate that the system color keyword is unsupported in that browser/OS combination.</li><li>Semi-transparent colors are measured over the recorded <code>Canvas</code> value; putting them against another color—system or otherwise—may change the contrast.</li></ul><h2 id="using-the-evidence" tabindex="-1"><a class="header-anchor" href="#using-the-evidence" aria-hidden="true">#</a> Using the evidence</h2><p>While building my web components, I’m using the study to check which intended pairs hold up, rather than trusting their names. You can use it the same way for components or entire websites: find the roles you need, inspect their pairings, then test them in your UI.</p><p>At the end of the study, I’ve included a list of color recommendations based on the data I currently have. To show up in this list, a pair must pass normal-text AA in <strong>every recorded observation</strong>, checked separately across ordinary light, ordinary dark, forced-color, and more-contrast groups, with at least one observation in each. That doesn’t mean these color pairings are guaranteed to work, but it should give you an understanding of which pairs are safer to use. As always: be sure to test.</p><h2 id="a-request-for-browser-and-os-implementers" tabindex="-1"><a class="header-anchor" href="#a-request-for-browser-and-os-implementers" aria-hidden="true">#</a> A request for browser and OS implementers</h2><p>I’d like browser and operating-system teams to use these observations as reproducible starting points to correct their system color implementations too. All modern system color keywords should be consistently supported, and intended foreground/background pairs should be accessible by default.</p><p>Proper contrast is crucial in forced-color modes. Forced colors are an accessibility feature people use to make interfaces more usable for them. If a default palette supplies text and background colors that are difficult to read together, you’re undermining the very purpose of that color mode.</p><p>Here’s my wish list of fixes. I plan to reach out to these teams, but if you want to hit them up on social media too, it might help make these fixes a priority:</p><ul><li><strong>Chrome:</strong><code>HighlightText</code> on <code>Highlight</code> (Android dark; Windows light); <code>ActiveText</code> on <code>Canvas</code> (Android, iPadOS, and macOS light); <code>AccentColorText</code> on <code>AccentColor</code> (macOS and Windows, including Windows Contrast themes). Also support both accent-color keywords on Android.</li><li><strong>Edge:</strong><code>HighlightText</code> on <code>Highlight</code> (Android dark; Windows light); <code>ActiveText</code> on <code>Canvas</code> (Android light; macOS increased-contrast light); <code>AccentColorText</code> on <code>AccentColor</code> (macOS and Windows, including Windows Contrast themes). Also support both accent-color keywords on Android.</li><li><strong>Firefox:</strong><code>HighlightText</code> on <code>Highlight</code> (Android light; macOS light/dark and the recorded forced-color light configuration; Windows light); <code>SelectedItemText</code> on <code>SelectedItem</code> (macOS and Windows light); <code>ActiveText</code> on <code>Canvas</code> (Windows Aquatic, Desert, Dusk, and Night sky Contrast themes).</li><li><strong>Safari:</strong><code>ActiveText</code> on <code>Canvas</code> (macOS and iPadOS light).</li></ul><p>I’m not asking every platform to adopt identical hues. I’m asking for the colors supplied for complementary roles to work together, without requiring authors to guess which browser’s defaults need repairing.</p><h2 id="add-your-browser-to-the-study" tabindex="-1"><a class="header-anchor" href="#add-your-browser-to-the-study" aria-hidden="true">#</a> Add your browser to the study</h2><p>If you read through the study and don’t see your browser/OS combo or preferences represented, please consider taking a snapshot of your system colors and submitting it. You can read through the <a href="https://aarongustafson.github.io/system-color-study/protocol.html">capture protocol</a> if you like, or <a href="https://aarongustafson.github.io/system-color-study/test.html">jump straight to the data capture page</a> I set up.</p><p>The process is straightforward:</p><ol><li><strong>Verify the metadata.</strong> Check the recorded browser and OS versions against their About screens. Correct inferred values and remove any “verify” placeholders. If forced colors are active, name the theme. Use Notes to describe any customizations you have in place.</li><li><strong>Capture the colors.</strong> “Capture light and dark system colors” creates <strong>one snapshot</strong> containing both requested CSS schemes. Download the JSON or use Copy JSON, and review it before submitting.</li><li><strong>Submit the snapshot.</strong> Choose “Submit this snapshot on GitHub” to file an issue against the project with your capture data. Paste the full JSON into the dedicated field, and confirm you’ve reviewed the metadata.</li></ol><p>If you want to contribute additional evidence, switch browsers or devices, or change an OS preference, then capture again. Submit all snapshots separately. I’m not capturing any telemetry or automatically uploading anything; you can review the captured data and decide whether you want to share it.</p><p><a href="https://github.com/aarongustafson/system-color-study">The study’s repository</a> contains the complete study source and methodology. Please <a href="https://aarongustafson.github.io/system-color-study/">check out the study</a> and consider contributing an observation, especially from environments I haven’t recorded, such as Linux distributions. I’d love for us to have even more evidence regarding the accessibility of the colors we (and our customers) rely on.</p>]]></content><amg:twitter><![CDATA[I expected paired system colors to work together. I was wrong. To help others avoid my mistake, I built a system color study you can explore and contribute to.]]></amg:twitter><amg:summary><![CDATA[<p>While testing out <a href="/notebook/theme-switching-made-easy/">a recent web component</a>, I discovered the demo I’d built made active buttons totally inaccessible, but only on Android in dark mode. I was baffled because I intentionally use system colors in all my web components and their demos. In the browsers I’d been testing, the pair looked great in both dark and light themes, but over on my phone it was a different story.</p><p>In Chrome’s dark mode on Android, <code>HighlightText</code> is a mid-tone grey. <code>Highlight</code> is a mid-tone blue. The contrast was abysmal—a mere 1.98:1, failing all five contrast thresholds in the Web Content Accessibility Guidelines (WCAG). I wish I could say it was the first time I’d stumbled on this kind of issue. A week or so earlier, a user <a href="https://github.com/aarongustafson/tabbed-interface/issues/8">reported similar trouble in my tabbed interface demo with Windows in forced-color mode</a>. I’d mistakenly thought forced-color mode was the primary issue. It wasn’t.</p><p>In both cases, I’d expected colors named for foreground and background roles to work together. Apparently, that was asking too much.</p><p>These experiences prompted me to build the <a href="https://aarongustafson.github.io/system-color-study/">System Color Study</a>: a resource for comparing browser-provided colors and their intended pairings across browsers, operating systems, and preferences. I’m using it to inform my component work; I hope it’ll help you too.</p>]]></amg:summary><summary type="html"><![CDATA[<p>While testing out <a href="/notebook/theme-switching-made-easy/">a recent web component</a>, I discovered the demo I’d built made active buttons totally inaccessible, but only on Android in dark mode. I was baffled because I intentionally use system colors in all my web components and their demos. In the browsers I’d been testing, the pair looked great in both dark and light themes, but over on my phone it was a different story.</p><p>In Chrome’s dark mode on Android, <code>HighlightText</code> is a mid-tone grey. <code>Highlight</code> is a mid-tone blue. The contrast was abysmal—a mere 1.98:1, failing all five contrast thresholds in the Web Content Accessibility Guidelines (WCAG). I wish I could say it was the first time I’d stumbled on this kind of issue. A week or so earlier, a user <a href="https://github.com/aarongustafson/tabbed-interface/issues/8">reported similar trouble in my tabbed interface demo with Windows in forced-color mode</a>. I’d mistakenly thought forced-color mode was the primary issue. It wasn’t.</p><p>In both cases, I’d expected colors named for foreground and background roles to work together. Apparently, that was asking too much.</p><p>These experiences prompted me to build the <a href="https://aarongustafson.github.io/system-color-study/">System Color Study</a>: a resource for comparing browser-provided colors and their intended pairings across browsers, operating systems, and preferences. I’m using it to inform my component work; I hope it’ll help you too.</p>]]></summary><category term="accessibility" /><category term="CSS" /><category term="web components" /><category term="web design" /><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://www.aaron-gustafson.com/i/share-cards/system-colors-need-to-work-together.jpg" /></entry><entry><id>https://www.aaron-gustafson.com/notebook/i-changed-my-mind-about-css-variables/</id><title type="html"><![CDATA[✍🏻 I’ve Changed My Mind About CSS Variables]]></title><link href="https://www.aaron-gustafson.com/notebook/i-changed-my-mind-about-css-variables/" rel="alternate" type="text/html" /><published>2026-10-19T16:48:33Z</published><content type="html" xml:base="https://www.aaron-gustafson.com"><![CDATA[<p>A while back, Eric Meyer emailed to ask about <a href="/notebook/css-variables-are-a-bad-idea/">my old post arguing that CSS variables were a bad idea</a>. Did I still feel that way?</p><p>No. I’ve changed my mind.</p><p>These days, I use CSS custom properties—the feature we often call “CSS variables”—quite a lot. To adapt interfaces to people’s preferences. To pass theme colors to JavaScript-driven interfaces. To theme many of the web components I build. I also discuss them quite a bit in my forthcoming course on progressive enhancement. At this point, that old headline no longer applies.</p><p>I’ve added a brief note to the original post, but I thought it best to explain the change in more detail. Hence this post.</p><p>My change of heart came not just because browser support improved, but because I realized I’d been too focused on custom properties as Sass variable replacements.</p><h2 id="my-original-concerns" tabindex="-1"><a class="header-anchor" href="#my-original-concerns" aria-hidden="true">#</a> My original concerns</h2><p>At the time of my original post, published in November 2014, browser support was extremely limited. The example I included used custom properties to store foreground and background colors:</p><pre class="language-css" tabindex="0"><code class="language-css"><span class="token selector">:root</span><span class="token punctuation">{</span><span class="token property">–foreground-color</span><span class="token punctuation">:</span> #333<span class="token punctuation">;</span><span class="token property">–background-color</span><span class="token punctuation">:</span> #fff<span class="token punctuation">;</span><span class="token punctuation">}</span><span class="token selector">body</span><span class="token punctuation">{</span><span class="token property">background</span><span class="token punctuation">:</span><span class="token function">var</span><span class="token punctuation">(</span>–background-color<span class="token punctuation">)</span><span class="token punctuation">;</span><span class="token property">color</span><span class="token punctuation">:</span><span class="token function">var</span><span class="token punctuation">(</span>–foreground-color<span class="token punctuation">)</span><span class="token punctuation">;</span><span class="token punctuation">}</span></code></pre><p>I was concerned that browsers without support would lose those color declarations. To give those browsers the intended colors too, we’d need to write old-school color values first:</p><pre class="language-css" tabindex="0"><code class="language-css"><span class="token selector">:root</span><span class="token punctuation">{</span><span class="token property">–color-foreground</span><span class="token punctuation">:</span> #333<span class="token punctuation">;</span><span class="token property">–color-background</span><span class="token punctuation">:</span> #fff<span class="token punctuation">;</span><span class="token punctuation">}</span><span class="token selector">body</span><span class="token punctuation">{</span><span class="token property">background</span><span class="token punctuation">:</span> #fff<span class="token punctuation">;</span><span class="token property">background</span><span class="token punctuation">:</span><span class="token function">var</span><span class="token punctuation">(</span>–color-background<span class="token punctuation">)</span><span class="token punctuation">;</span><span class="token property">color</span><span class="token punctuation">:</span> #333<span class="token punctuation">;</span><span class="token property">color</span><span class="token punctuation">:</span><span class="token function">var</span><span class="token punctuation">(</span>–color-foreground<span class="token punctuation">)</span><span class="token punctuation">;</span><span class="token punctuation">}</span></code></pre><p>I compared that with Sass, which could substitute the values during compilation, yielding universally understandable CSS:</p><pre class="language-scss" tabindex="0"><code class="language-scss"><span class="token property"><span class="token variable">$color-background</span></span><span class="token punctuation">:</span> #fff<span class="token punctuation">;</span><span class="token property"><span class="token variable">$color-foreground</span></span><span class="token punctuation">:</span> #333<span class="token punctuation">;</span><span class="token selector">body </span><span class="token punctuation">{</span><span class="token property">background</span><span class="token punctuation">:</span><span class="token variable">$color-background</span><span class="token punctuation">;</span><span class="token comment">/* background: #fff; <em>/</span><span class="token property">color</span><span class="token punctuation">:</span><span class="token variable">$color-foreground</span><span class="token punctuation">;</span><span class="token comment">/</em> color: #333; */</span><span class="token punctuation">}</span></code></pre><p>If we only need to replace a name with a fixed value, doing that before sending the stylesheet was (and remains) perfectly reasonable.</p><p>But I went further. I treated the necessity of fallback declarations as a flaw and used it to dismiss custom properties altogether. I shouldn’t have.</p><p>The uncomfortable irony is that I’ve advocated for authoring a usable baseline followed by an enhancement in CSS for years. Some degree of repetition is often required to make that work. I shouldn’t have dismissed custom properties just because a preprocessor let me avoid the redundancy.</p><p>In that piece, I also speculated about the performance cost of custom props without bringing receipts. Browsers do have to resolve their values, but I had no proof this would cause a meaningful performance problem.</p><h2 id="what-i-missed" tabindex="-1"><a class="header-anchor" href="#what-i-missed" aria-hidden="true">#</a> What I missed</h2><p>I’ll admit I had a very simplistic view of custom properties. It was largely informed by my immersion in Sass at the time. I didn’t take the time to dig into <a href="https://developer.mozilla.org/docs/Web/CSS/Guides/Cascading_variables/Using_custom_properties">the more powerful aspects of custom properties</a>. Custom properties participate in the cascade. They inherit by default too. Their values can differ across elements or change in response to media queries and changes in the document.</p><p>That power becomes apparent in an example like this:</p><pre class="language-css" tabindex="0"><code class="language-css"><span class="token selector">:root</span><span class="token punctuation">{</span><span class="token property">–notice-background</span><span class="token punctuation">:</span> #eee<span class="token punctuation">;</span><span class="token property">–notice-foreground</span><span class="token punctuation">:</span> #222<span class="token punctuation">;</span><span class="token punctuation">}</span><span class="token atrule"><span class="token rule">@media</span><span class="token punctuation">(</span><span class="token property">prefers-color-scheme</span><span class="token punctuation">:</span> dark<span class="token punctuation">)</span></span><span class="token punctuation">{</span><span class="token selector">:root</span><span class="token punctuation">{</span><span class="token property">–notice-background</span><span class="token punctuation">:</span> #222<span class="token punctuation">;</span><span class="token property">–notice-foreground</span><span class="token punctuation">:</span> #eee<span class="token punctuation">;</span><span class="token punctuation">}</span><span class="token punctuation">}</span><span class="token selector">.notice</span><span class="token punctuation">{</span><span class="token property">background-color</span><span class="token punctuation">:</span> #eee<span class="token punctuation">;</span><span class="token property">background-color</span><span class="token punctuation">:</span><span class="token function">var</span><span class="token punctuation">(</span>–notice-background<span class="token punctuation">,</span> #eee<span class="token punctuation">)</span><span class="token punctuation">;</span><span class="token property">color</span><span class="token punctuation">:</span> #222<span class="token punctuation">;</span><span class="token property">color</span><span class="token punctuation">:</span><span class="token function">var</span><span class="token punctuation">(</span>–notice-foreground<span class="token punctuation">,</span> #222<span class="token punctuation">)</span><span class="token punctuation">;</span><span class="token punctuation">}</span><span class="token selector">.notice–warning</span><span class="token punctuation">{</span><span class="token property">–notice-background</span><span class="token punctuation">:</span> #ffe08a<span class="token punctuation">;</span><span class="token property">–notice-foreground</span><span class="token punctuation">:</span> #222<span class="token punctuation">;</span><span class="token punctuation">}</span></code></pre><p>Here, ordinary notices change their theme based on a user’s color-scheme preference. A warning notice, however, gets its own colors without changing the declarations that use them. Descendants can inherit those custom properties and use them too.</p><p>A Sass variable, in contrast, is static. It doesn’t respond to that context at all. A custom property does. We can generate preference-aware styles with Sass, of course, but compiled variables and browser-resolved custom properties are worlds apart.</p><p>I didn’t understand how powerful custom properties are when I wrote the original post. I was squinting at them through Sass’s pink-tinted glasses.</p><h2 id="theming-through-and-through" tabindex="-1"><a class="header-anchor" href="#theming-through-and-through" aria-hidden="true">#</a> Theming through and through</h2><p>One project that made the value of custom props much clearer to me was a <code>&lt;canvas&gt;</code>-based audio visualizer I was working on. It looked fine while I was using dark mode. When I switched to the light theme, however, the visualization disappeared against its background. As my son would say: “That’s buns.”</p><p>I’m almost always in dark mode, so that’s what I’d been testing in. I’d totally neglected to give it a look in light mode. Yikes.</p><p>I was already using custom props to handle site-wide theming, so rather than maintain a second set of theme colors in JavaScript, I opted to read the values CSS had resolved:</p><pre class="language-js" tabindex="0"><code class="language-js"><span class="token keyword">const</span> theme <span class="token operator">=</span><span class="token punctuation">{</span><span class="token punctuation">}</span><span class="token punctuation">;</span><span class="token keyword">function</span><span class="token function">importTheme</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">{</span><span class="token keyword">const</span> styles <span class="token operator">=</span> window<span class="token punctuation">.</span><span class="token function">getComputedStyle</span><span class="token punctuation">(</span>document<span class="token punctuation">.</span>documentElement<span class="token punctuation">)</span><span class="token punctuation">;</span>theme<span class="token punctuation">.</span>foreground <span class="token operator">=</span>styles<span class="token punctuation">.</span><span class="token function">getPropertyValue</span><span class="token punctuation">(</span><span class="token string">“–color-foreground”</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">trim</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token operator">||</span><span class="token string">“black”</span><span class="token punctuation">;</span>theme<span class="token punctuation">.</span>background <span class="token operator">=</span>styles<span class="token punctuation">.</span><span class="token function">getPropertyValue</span><span class="token punctuation">(</span><span class="token string">“–color-background”</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">trim</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token operator">||</span><span class="token string">“white”</span><span class="token punctuation">;</span><span class="token punctuation">}</span><span class="token function">importTheme</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span></code></pre><p>The drawing code could use those values for its strokes and fills. Then a listener could refresh the theme values when the user’s color-scheme preference changed:</p><pre class="language-js" tabindex="0"><code class="language-js"><span class="token keyword">const</span> preference <span class="token operator">=</span> window<span class="token punctuation">.</span><span class="token function">matchMedia</span><span class="token punctuation">(</span><span class="token string">“(prefers-color-scheme: dark)”</span><span class="token punctuation">)</span><span class="token punctuation">;</span>preference<span class="token punctuation">.</span><span class="token function">addEventListener</span><span class="token punctuation">(</span><span class="token string">“change”</span><span class="token punctuation">,</span> importTheme<span class="token punctuation">)</span><span class="token punctuation">;</span></code></pre><p>When the theme changes, the next draw uses the updated colors. A graphic that isn’t being continuously redrawn would also need to be repainted, of course, but for an audio visualizer it was perfect.</p><p>I covered the setup in <a href="/notebook/passing-your-css-theme-to-canvas/">“Passing Your CSS Theme to <code>canvas</code>”</a>. The key benefit of this approach is that CSS remains responsible for resolving the theme, while JavaScript can focus on managing the drawing. Clean separation.</p><h2 id="styling-components" tabindex="-1"><a class="header-anchor" href="#styling-components" aria-hidden="true">#</a> Styling components</h2><p>If you’ve been following my work for a while, you’ve probably seen <a href="/web-components/">my growing list of web components</a>. I use custom properties in them quite often. My <a href="/notebook/fullscreen-video-and-iframes-made-easy/"><code>&lt;fullscreen-control&gt;</code> component</a>, for instance, adds a “fullscreen” button to a wrapped <code>&lt;video&gt;</code> or <code>&lt;iframe&gt;</code>. Authors can adjust the button’s position through custom props:</p><pre class="language-css" tabindex="0"><code class="language-css"><span class="token selector">fullscreen-control</span><span class="token punctuation">{</span><span class="token property">–fullscreen-control-button-inset-block-start</span><span class="token punctuation">:</span> 1rem<span class="token punctuation">;</span><span class="token property">–fullscreen-control-button-inset-inline-end</span><span class="token punctuation">:</span> 1rem<span class="token punctuation">;</span><span class="token punctuation">}</span></code></pre><p>Those values control the button’s position. No need to crack open the JavaScript to move it. And because the positioning uses logical properties, the offsets follow the writing mode rather than assuming a particular physical corner.</p><p>Similarly, <a href="/notebook/visual-validation-feedback-for-form-fields/"><code>&lt;form-validation-list&gt;</code></a> exposes custom properties for icon size, matched and unmatched colors, and similar design choices. That makes it relatively straightforward to adapt the component to a site’s design without touching the component’s behavior.</p><p>In both cases, custom properties provide a simple way to alter the look and feel of the component directly from within a stylesheet, where design decisions belong.</p><h2 id="fallback%2C-carefully" tabindex="-1"><a class="header-anchor" href="#fallback%2C-carefully" aria-hidden="true">#</a> Fallback, carefully</h2><p>Even though I complained about them at the time, I don’t want to gloss over the importance of fallbacks for custom properties. Used properly, they help make our designs robust and progressively enhanced.</p><h3 id="when-the-browser-doesn%E2%80%99t-support-custom-properties" tabindex="-1"><a class="header-anchor" href="#when-the-browser-doesn%E2%80%99t-support-custom-properties" aria-hidden="true">#</a> When the browser doesn’t support custom properties</h3><p>Take the following, for example:</p><pre class="language-css" tabindex="0"><code class="language-css"><span class="token selector">:root</span><span class="token punctuation">{</span><span class="token property">–flow-space</span><span class="token punctuation">:</span> 1em<span class="token punctuation">;</span><span class="token punctuation">}</span><span class="token selector">.flow &gt; * + *</span><span class="token punctuation">{</span><span class="token property">margin-block-start</span><span class="token punctuation">:</span> 1em<span class="token punctuation">;</span><span class="token property">margin-block-start</span><span class="token punctuation">:</span><span class="token function">var</span><span class="token punctuation">(</span>–flow-space<span class="token punctuation">)</span><span class="token punctuation">;</span><span class="token punctuation">}</span><span class="token selector">.compact</span><span class="token punctuation">{</span><span class="token property">–flow-space</span><span class="token punctuation">:</span> 0.75em<span class="token punctuation">;</span><span class="token punctuation">}</span></code></pre><p>In this code sample, the second rule (<code>.flow &gt; * + * {}</code>) establishes space between adjacent children in two steps: first, it sets a block-start margin using a standard value (<code>1em</code>), then it overrides that value using a custom property (<code>var(–flow-space)</code>).</p><p>Browsers that understand custom properties use the value of <code>–flow-space</code> because that declaration comes later in the rule. Browsers that don’t understand <code>var()</code> ignore that declaration, following the rules of fault tolerance. They apply the earlier <code>1em</code> declaration instead.<sup class="footnote-ref"><a href="#fn1" id="fnref1">1</a></sup></p><p>The <code>.compact</code> rule overrides the inherited spacing value, so a flow container in a compact region can use tighter spacing without a different margin rule.</p><h3 id="when-the-custom-property-is-missing" tabindex="-1"><a class="header-anchor" href="#when-the-custom-property-is-missing" aria-hidden="true">#</a> When the custom property is missing</h3><p>The second argument in <code>var()</code> handles a different situation:</p><pre class="language-css" tabindex="0"><code class="language-css"><span class="token selector">.flow &gt; * + *</span><span class="token punctuation">{</span><span class="token property">margin-block-start</span><span class="token punctuation">:</span> 1em<span class="token punctuation">;</span><span class="token property">margin-block-start</span><span class="token punctuation">:</span><span class="token function">var</span><span class="token punctuation">(</span>–flow-space<span class="token punctuation">,</span> 1em<span class="token punctuation">)</span><span class="token punctuation">;</span><span class="token punctuation">}</span></code></pre><p>In a browser that supports custom properties, it provides a backup value the browser can use when the referenced property is missing or resolves to the <a href="https://developer.mozilla.org/docs/Glossary/guaranteed_invalid_value"><em>guaranteed-invalid value</em></a>. To test this, you could remove the <code>–flow-space</code> assignment from <code>:root</code> and—if no other assignment applied or was inherited—the fallback argument would supply <code>1em</code>.</p><p>It’s important to note that this situation is different from a value being unacceptable for a given property. The fallback argument doesn’t check whether the custom prop’s value is a valid size or color.</p><p>I’ll illustrate that with a silly example:</p><pre class="language-css" tabindex="0"><code class="language-css"><span class="token selector">.notice</span><span class="token punctuation">{</span><span class="token property">–notice-color</span><span class="token punctuation">:</span> 20px<span class="token punctuation">;</span><span class="token property">color</span><span class="token punctuation">:</span> #333<span class="token punctuation">;</span><span class="token property">color</span><span class="token punctuation">:</span><span class="token function">var</span><span class="token punctuation">(</span>–notice-color<span class="token punctuation">,</span> #333<span class="token punctuation">)</span><span class="token punctuation">;</span><span class="token punctuation">}</span></code></pre><p>In a browser that supports <code>var()</code>, the earlier color declaration (<code>color: #333</code>) isn’t used. The custom property (<code>–notice-color</code>) exists, and <code>20px</code> is a valid value for an unregistered custom property<sup class="footnote-ref"><a href="#fn2" id="fnref2">2</a></sup>, so the fallback argument isn’t used either. Unfortunately, after substitution, the winning declaration is <code>color: 20px</code>, and <code>20px</code> is not a valid color value.</p><p>In this scenario, you might expect the browser to fall back to the previous <code>color</code> declaration. It doesn’t.</p><p>This is an example of an <a href="https://developer.mozilla.org/docs/Web/CSS/Guides/Cascading_variables/Using_custom_properties#invalid_custom_properties">invalid-at-computed-value-time</a> failure. The browser stores the <code>20px</code> value for <code>–notice-color</code> with no problem. The problem only becomes apparent when that value is used as a color, after the cascade has selected the declaration. At that point, it’s too late to ignore the declaration during parsing, as the browser would with a literal <code>color: 20px</code>. Instead, the element <em>inherits</em> its <code>color</code> from its parent. For non-inherited properties like <code>background-color</code>, the browser uses the <em>initial</em> value instead.</p><p>The browser won’t rewrite the custom property. It won’t go back through the earlier declarations looking for a replacement either.</p><p>That was a contrived example. Here’s a more realistic one.</p><h3 id="when-the-value-requires-a-newer-feature" tabindex="-1"><a class="header-anchor" href="#when-the-value-requires-a-newer-feature" aria-hidden="true">#</a> When the value requires a newer feature</h3><p>Just because a browser supports custom properties doesn’t mean every value we assign to one will work. Imagine you want to use a newer color function in a custom property:</p><pre class="language-css" tabindex="0"><code class="language-css"><span class="token selector">:root</span><span class="token punctuation">{</span><span class="token property">–button-background</span><span class="token punctuation">:</span><span class="token function">color-mix</span><span class="token punctuation">(</span>in oklab<span class="token punctuation">,</span> #e200ff<span class="token punctuation">,</span> black 65%<span class="token punctuation">)</span><span class="token punctuation">;</span><span class="token punctuation">}</span><span class="token selector">button</span><span class="token punctuation">{</span><span class="token property">background-color</span><span class="token punctuation">:</span> #222<span class="token punctuation">;</span><span class="token property">background-color</span><span class="token punctuation">:</span><span class="token function">var</span><span class="token punctuation">(</span>–button-background<span class="token punctuation">,</span> #222<span class="token punctuation">)</span><span class="token punctuation">;</span><span class="token punctuation">}</span></code></pre><p>A browser that supports custom properties but doesn’t know what <code>color-mix()</code> means will still retain the custom property’s value as a sequence of tokens. The failure comes later, when it tries to use that value as a background color. Neither the preceding declaration nor the fallback argument can save you; the background becomes transparent, its initial value.</p><p>To retain a known-good value while using <code>color-mix()</code> as an enhancement, we can test for support before assigning it:</p><pre class="language-css" tabindex="0"><code class="language-css"><span class="token selector">:root</span><span class="token punctuation">{</span><span class="token property">–button-background</span><span class="token punctuation">:</span> #222<span class="token punctuation">;</span><span class="token punctuation">}</span><span class="token atrule"><span class="token rule">@supports</span><span class="token punctuation">(</span><span class="token property">color</span><span class="token punctuation">:</span><span class="token function">color-mix</span><span class="token punctuation">(</span>in oklab<span class="token punctuation">,</span> red<span class="token punctuation">,</span> red<span class="token punctuation">)</span><span class="token punctuation">)</span></span><span class="token punctuation">{</span><span class="token selector">:root</span><span class="token punctuation">{</span><span class="token property">–button-background</span><span class="token punctuation">:</span><span class="token function">color-mix</span><span class="token punctuation">(</span>in oklab<span class="token punctuation">,</span> #e200ff<span class="token punctuation">,</span> black 65%<span class="token punctuation">)</span><span class="token punctuation">;</span><span class="token punctuation">}</span><span class="token punctuation">}</span><span class="token selector">button</span><span class="token punctuation">{</span><span class="token property">background-color</span><span class="token punctuation">:</span> #222<span class="token punctuation">;</span><span class="token property">background-color</span><span class="token punctuation">:</span><span class="token function">var</span><span class="token punctuation">(</span>–button-background<span class="token punctuation">,</span> #222<span class="token punctuation">)</span><span class="token punctuation">;</span><span class="token property">color</span><span class="token punctuation">:</span> #fff<span class="token punctuation">;</span><span class="token punctuation">}</span></code></pre><p>The <code>@supports</code> block checks whether the browser accepts <code>color-mix()</code> in the <code>oklab</code> color space, without tying it to a particular palette or background. Mixing red with itself is a terse way to test the syntax. We can then group multiple enhanced custom-property assignments inside that same block. If you’re using other color spaces or newer color syntax, place each in its own <code>@supports</code> block to ensure maximum compatibility.</p><p>In this example, the known-good value (<code>#222</code>) remains unless the support test passes. Browsers without custom-property support still have the literal background declaration too.</p><p><em>Note: When enhancing this way, it’s critical that we test each potential color combination to ensure accessible contrast levels.</em></p><hr><p>Fallbacks aren’t mandatory. Sometimes an inherited value or the browser’s default provides a reasonable baseline experience. It’s good to know we have these options, though, and a modest amount of redundancy when it matters is a small price to pay.</p><h2 id="where-that-leaves-me" tabindex="-1"><a class="header-anchor" href="#where-that-leaves-me" aria-hidden="true">#</a> Where that leaves me</h2><p>Eric’s question was a useful nudge to revisit an opinion I’d left sitting on the Web long after my own work had moved on.</p><p>I still stand by the central concern in that original post: people should have a usable experience when a particular enhancement isn’t available. The difference is that now I’ve got plenty of ways to use custom properties in service of that goal. They let me respond to preferences, adapt components, and share dynamic styles between CSS and JavaScript.</p><p>If you’re deciding between a preprocessor variable and a custom property, consider when the value needs to be resolved and what needs to influence it. If it needs to respond to the person using the page or the rendering context, a custom property resolved in the browser can be genuinely useful. Just be sure to check what happens when the value—or the enhancement consuming it—isn’t available.</p><p>That’s the question I should have spent more time on in 2014.</p><hr class="footnotes-sep"><section class="footnotes"><h4 class="hidden">Footnotes</h4><ol class="footnotes-list"><li id="fn1" class="footnote-item"><p>This assumes the browser also supports <code>margin-block-start</code>; a browser that doesn’t will ignore both declarations. <a href="#fnref1" class="footnote-backref">↩︎</a></p></li><li id="fn2" class="footnote-item"><p>You can register a custom property with <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/At-rules/@property"><code>@property</code></a>, defining its syntax, inheritance behavior, and an initial value. Assigning a value using syntax like <code>–foo: bar;</code> doesn’t register it. The examples in this post use unregistered custom properties. <a href="#fnref2" class="footnote-backref">↩︎</a></p></li></ol></section>]]></content><amg:twitter><![CDATA[Back in 2014, I decried CSS variables, but my perspective has largely changed. Here’s what I missed, how I use them now, and why fallbacks still matter.]]></amg:twitter><amg:summary><![CDATA[<p>A while back, Eric Meyer emailed to ask about <a href="/notebook/css-variables-are-a-bad-idea/">my old post arguing that CSS variables were a bad idea</a>. Did I still feel that way?</p><p>No. I’ve changed my mind.</p>]]></amg:summary><summary type="html"><![CDATA[<p>A while back, Eric Meyer emailed to ask about <a href="/notebook/css-variables-are-a-bad-idea/">my old post arguing that CSS variables were a bad idea</a>. Did I still feel that way?</p><p>No. I’ve changed my mind.</p>]]></summary><category term="CSS" /><category term="progressive enhancement" /><category term="accessibility" /><category term="web components" /><category term="web design" /><category term="web development" /><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://www.aaron-gustafson.com/i/share-cards/i-changed-my-mind-about-css-variables.jpg" /></entry><entry><id>https://www.aaron-gustafson.com/notebook/links/why-we-teach-our-students-progressive-enhancement/</id><title type="html"><![CDATA[🔗 Why we teach our students progressive enhancement]]></title><link href="https://www.aaron-gustafson.com/notebook/links/why-we-teach-our-students-progressive-enhancement/" rel="alternate" type="text/html" /><link href="https://cydstumpel.nl/why-we-teach-our-students-progressive-enhancement/" rel="related" type="text/html" /><published>2026-02-06T19:10:02Z</published><content type="html" xml:base="https://www.aaron-gustafson.com"><![CDATA[<p>Excellent post and primer on progressive enhancement. I particularly love this framing:</p><blockquote><p>progressive enhancement is not about preventing failure, it’s about defining what must always work.</p></blockquote><p>I also want one of those ”Wat als de JavaScript uit staat?“ stickers.</p>]]></content><amg:twitter><![CDATA[“[P]rogressive enhancement is not about preventing failure, it’s about defining what must always work.”]]></amg:twitter><category term="progressive enhancement" /><category term="web development" /><category term="web design" /></entry><entry><id>https://www.aaron-gustafson.com/publications/books/learning-web-design-sixth-edition/</id><title type="html"><![CDATA[📗 Learning Web Design]]></title><link href="https://www.oreilly.com/library/view/learning-web-design/9781098137670/" rel="alternate" type="text/html" /><published>2025-05-01T00:00:00Z</published><content type="html" xml:base="https://www.aaron-gustafson.com"><![CDATA[<p>Do you want to build web pages but have no prior experience? This friendly guide is the perfect place to start. You’ll begin at square one, learning how the web and web pages work, and then steadily build from there. By the end of the book, you’ll have the skills to create a simple site with multicolumn pages that adapt for mobile devices.</p>]]></content><category term="accessibility" /><category term="CSS" /><category term="HTML" /><category term="JavaScript" /><category term="progressive enhancement" /><category term="responsive web design" /><category term="web design" /><category term="web development" /><category term="web standards" /></entry><entry><id>https://www.aaron-gustafson.com/notebook/on-crowdstrike-dependencies-and-building-robust-products-on-the-web/</id><title type="html"><![CDATA[✍🏻 On CrowdStrike, dependencies, and building robust products on the web]]></title><link href="https://www.aaron-gustafson.com/notebook/on-crowdstrike-dependencies-and-building-robust-products-on-the-web/" rel="alternate" type="text/html" /><published>2024-07-25T17:20:26Z</published><content type="html" xml:base="https://www.aaron-gustafson.com"><![CDATA[<p>I have no opinion on CrowdStrike as a company or service. I’ve never used their products. In fact, prior to <a href="https://wikipedia.org/wiki/2024_CrowdStrike_incident">the incident last week</a>, I had only a passing familiarity with their name — likely from headlines in the tech press I’d scrolled past at some point in time. I now have a vague understanding of what they do, but that’s only based on what I learned about <a href="https://www.crowdstrike.com/wp-content/uploads/2024/07/CrowdStrike-PIR-Executive-Summary.pdf">the cause of the incident</a>. In reflecting on this unfortunate incident, I can’t help but think of the lesson it holds for web designers and developers.</p><p>The incident was caused when a bug in CrowdStrike’s code made it out into production. The results were catastrophic: It caused roughly 8.5 million servers to crash. Hospitals weren’t able to serve the people that needed them. Airline passengers were stranded. People couldn’t access their money in banks. Folks in distress could not get the emergency services they needed. On top of that, the financial fallout is estimated to be somewhere around US$10 billion.</p><p>Bugs happen. I’d hate to be the person who was responsible for that particular bug (or the people in the quality assurance team that should have caught it), but the reality is that none of us who write code write <em>perfect</em> code. We all make mistakes and sometimes those mistakes make it into production. Other times, the code we write works perfectly during development and testing, but causes an unexpected issue in production. Sometimes only in very specific “edge case” circumstances that we didn’t have the foresight to consider.</p><p>Which brings me to the lesson I took away from the CrowdStrike incident: minimize the impact dependencies can have on your customers’ ability to complete critical tasks. In other words, <a href="https://www.smashingmagazine.com/2016/05/developing-dependency-awareness/">develop dependency awareness</a>.</p><p>The web is a hostile operating environment. Sometimes network connections are slow to resolve or time out completely, which may cause issues with your JavaScript, may result in broken images or videos, or could make it so your user never receives your CSS. Sometimes 3rd party scripts ship bugs that can hose your site completely. Sometimes a customer’s browser plugin can wreak havoc on your site by adjusting markup or injecting code. If any (or all) of those things were to happen, could your customers still accomplish their key tasks? Could they even understand your site at all?</p><p>This is why it’s so critical to start with a fully-functional website that relies only on semantic, accessible HTML and regular ol’ links and form submissions. They aren’t sexy, but they’re solid. Then <em>progressively enhance</em> that experience to improve things when the CSS is downloaded. And improve some more when your JavaScript executes properly. Build an awareness for the kinds of dependencies you have in your code so you can ensure there is always a fallback.</p><p>When I think about building robust websites like this, I often think of the Chrysler Imperial. The 1964-1966 model is one of the few cars that has been outright banned from entering demolition derby events. It is just too well built. It just takes the hits and keeps on driving. We should aspire to that kind of resilience in the websites we build.</p><p>Bugs happen. Can your site withstand them? Or will you let the failure of a single dependency (a.k.a., site fragility) ruin your customers’ day?</p><p><a href="https://www.youtube.com/watch?v=-9GGDOUDLhc&amp;start=7&amp;end=17">https://www.youtube.com/watch?v=-9GGDOUDLhc&amp;start=7&amp;end=17</a></p>]]></content><amg:twitter><![CDATA[The #CrowdStrike meltdown last week should be a cautionary tale for #WebDesigners and #WebDevleopers.]]></amg:twitter><amg:summary><![CDATA[<p>I have no opinion on CrowdStrike as a company or service. I’ve never used their products. In fact, prior to <a href="https://wikipedia.org/wiki/2024_CrowdStrike_incident">the incident last week</a>, I had only a passing familiarity with their name — likely from headlines in the tech press I’d scrolled past at some point in time. I now have a vague understanding of what they do, but that’s only based on what I learned about <a href="https://www.crowdstrike.com/wp-content/uploads/2024/07/CrowdStrike-PIR-Executive-Summary.pdf">the cause of the incident</a>. In reflecting on this unfortunate incident, I can’t help but think of the lesson it holds for web designers and developers.</p>]]></amg:summary><summary type="html"><![CDATA[<p>I have no opinion on CrowdStrike as a company or service. I’ve never used their products. In fact, prior to <a href="https://wikipedia.org/wiki/2024_CrowdStrike_incident">the incident last week</a>, I had only a passing familiarity with their name — likely from headlines in the tech press I’d scrolled past at some point in time. I now have a vague understanding of what they do, but that’s only based on what I learned about <a href="https://www.crowdstrike.com/wp-content/uploads/2024/07/CrowdStrike-PIR-Executive-Summary.pdf">the cause of the incident</a>. In reflecting on this unfortunate incident, I can’t help but think of the lesson it holds for web designers and developers.</p>]]></summary><category term="progressive enhancement" /><category term="hazards" /><category term="CSS" /><category term="JavaScript" /><category term="web design" /><category term="web development" /><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://www.aaron-gustafson.com/i/share-cards/on-crowdstrike-dependencies-and-building-robust-products-on-the-web.jpg" /></entry><entry><id>https://www.aaron-gustafson.com/notebook/links/the-quiet-pervasive-devaluation-of-frontend/</id><title type="html"><![CDATA[🔗 The quiet, pervasive devaluation of frontend]]></title><link href="https://www.aaron-gustafson.com/notebook/links/the-quiet-pervasive-devaluation-of-frontend/" rel="alternate" type="text/html" /><link href="https://joshcollinsworth.com/blog/devaluing-frontend" rel="related" type="text/html" /><published>2024-03-20T23:07:35Z</published><content type="html" xml:base="https://www.aaron-gustafson.com"><![CDATA[<p>While not exactly novel, this post from Josh Collinsworth is a fantastic meditation on devaluation of front-end engineering work.</p><blockquote><p>Writing CSS seems to be regarded much like taking notes in a meeting, complete with the implicit sexism and devaluation of the note taker’s importance in the room.</p><p>Though critical to the project, frontend work will quite often be disregarded by those who consider it beneath them (usually men, and usually only tacitly, never explicitly). It’s not serious enough; not important enough; not real enough. Too squishy. Like soft skills.</p><p>Yes, of course, it’s important. It’s work that somebody needs to do, certainly. But probably not the important people, whose valuable attention is focused on other, bigger, more important problems.</p></blockquote><p>It’s been this way for a long time. This attitude doesn’t exist on every team, but it’s pervasive throughout our industry.</p>]]></content><amg:twitter><![CDATA[While not exactly novel, this post from Josh Collinsworth is a fantastic meditation on devaluation of front-end engineering work.]]></amg:twitter><category term="industry" /><category term="web design" /></entry><entry><id>https://www.aaron-gustafson.com/appearances/podcasts/2023-08-28-building-resilient-web-apps-progressive-enhancement-unveiled/</id><title type="html"><![CDATA[🎧 Building Resilient Web Apps: Progressive Enhancement Unveiled]]></title><link href="https://www.youtube.com/watch?v=-ZqsLwWM7YE" rel="alternate" type="text/html" /><published>2023-08-28T00:00:00Z</published><content type="html" xml:base="https://www.aaron-gustafson.com"><![CDATA[<p>Let’s delve into the world of progressive enhancement for web applications. From dissecting common pitfalls to offering invaluable tips, we unravel the art of building robust and inclusive web experiences.</p>]]></content><category term="progressive enhancement" /><category term="accessibility" /><category term="JavaScript" /><category term="progressive web apps" /><category term="web design" /><category term="web development" /></entry><entry><id>https://www.aaron-gustafson.com/notebook/please-size-your-inline-svgs/</id><title type="html"><![CDATA[✍🏻 Please size your inline SVGs]]></title><link href="https://www.aaron-gustafson.com/notebook/please-size-your-inline-svgs/" rel="alternate" type="text/html" /><published>2023-08-21T21:11:09Z</published><content type="html" xml:base="https://www.aaron-gustafson.com"><![CDATA[<p>While it is a bit of an edge case, every now and then I’ll hit a site—yes, even a high profile one—and the CSS will fail to load for some reason. When this happens, inevitably every inline SVG resource on the page will grow to fill the entire width of my viewport, making for a <em>really</em> awkward experience.</p><h2 id="what%E2%80%99s-the-issue%3F" tabindex="-1"><a class="header-anchor" href="#what%E2%80%99s-the-issue%3F" aria-hidden="true">#</a> What’s the issue?</h2><p>Not to pick on anyone in particular, but consider <a href="https://presentations.aaron-gustafson.com/uygzjR/progressive-enhancement-where-do-i-begin#saVRzdC">this example from a recent talk I gave</a>:</p><figure id="2023-08-21-01"><p><img src="https://www.aaron-gustafson.com/i/posts/2023-08-21/01.png" alt="" width="696" height="481"></p><figcaption>The U.S. Transportation Safety Administration’s TSA PreCheck® landing page, with CSS applied.</figcaption></figure><p>When CSS fails to load, however, check out what happens:</p><figure id="2023-08-21-02"><p><img src="https://www.aaron-gustafson.com/i/posts/2023-08-21/02.png" alt="" width="696" height="481"></p><figcaption>The U.S. Transportation Safety Administration’s TSA PreCheck® landing page, without CSS applied. Note the <strong>huge</strong> SVG.</figcaption></figure><p>Yeah, that’s an inline SVG. You see, without any explicit dimensions set, the SVG will naturally grow to become as large as possible. Chances are you’re constraining that growth in CSS somewhere, but when your CSS fails to apply for any reason, every inline SVG on your site will swell like <a href="https://roalddahl.fandom.com/wiki/Violet_Beauregarde">Violet Beauregarde after eating Willy Wonka’s “three-course dinner” chewing gum</a>.</p><h2 id="how-do-we-solve-this%3F" tabindex="-1"><a class="header-anchor" href="#how-do-we-solve-this%3F" aria-hidden="true">#</a> How do we solve this?</h2><p>Thankfully, this is a pretty easy situation to avoid: just set an explicit <code>width</code> and <code>height</code>. To use an example from this site, instead of saying</p><pre class="language-html" tabindex="0"><code class="language-html"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>svg</span><span class="token attr-name">viewBox</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">“</span>0 0 38 48<span class="token punctuation">”</span></span><span class="token attr-name">version</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">“</span>1.1<span class="token punctuation">”</span></span><span class="token attr-name">xmlns</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">“</span><a href="http://www.w3.org/2000/svg">http://www.w3.org/2000/svg</a><span class="token punctuation">”</span></span><span class="token punctuation">&gt;</span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>svg</span><span class="token punctuation">&gt;</span></span></code></pre><p>You can explicitly set the <code>width</code> and <code>height</code> in the <code>&lt;svg&gt;</code> element like this:</p><pre class="language-html" tabindex="0"><code class="language-html"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>svg</span><span class="token attr-name">width</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">“</span>38<span class="token punctuation">”</span></span><span class="token attr-name">height</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">“</span>48<span class="token punctuation">”</span></span><span class="token attr-name">viewBox</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">“</span>0 0 38 48<span class="token punctuation">”</span></span><span class="token attr-name">version</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">“</span>1.1<span class="token punctuation">”</span></span><span class="token attr-name">xmlns</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">“</span><a href="http://www.w3.org/2000/svg">http://www.w3.org/2000/svg</a><span class="token punctuation">”</span></span><span class="token punctuation">&gt;</span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>svg</span><span class="token punctuation">&gt;</span></span></code></pre><p>What you set these values to will likely vary depending on how the icon is being used. In a pinch, you could also pull the values directly from the <code>viewbox</code> value. And using that value, you could even make the inline values dynamic within your template, reading in the <code>viewbox</code> values and tweaking them to a ratio specific to the context.</p><p>Setting the SVG’s dimensions inline like this doesn’t restrict their flexibility either. You can still use CSS to override these inline values and set the SVG to whatever size you wish:</p><pre class="language-css" tabindex="0"><code class="language-css"><span class="token selector">svg</span><span class="token punctuation">{</span><span class="token property">inline-size</span><span class="token punctuation">:</span> 200px<span class="token punctuation">;</span><span class="token property">block-size</span><span class="token punctuation">:</span> 200px<span class="token punctuation">;</span><span class="token punctuation">}</span></code></pre><p>I’ve thrown together a quick comparison over on CodePen so you can see the three different states:</p><figure id="2023-08-21-03"><iframe class="codepen" height="500" style="width:100%;" scrolling="no" title="CodePen Embed" src="https://codepen.io/anon/embed/JjwoLME?height=500&theme-id=dark&default-tab=result" frameborder="0" loading="lazy" allowtransparency="true" allowfullscreen="true"><p><a href="https://codepen.io/aarongustafson/pen/JjwoLME" target="_blank" rel="noopener">See the Pen</a></p></iframe></figure><p>And now that you know, please, please, <em>please</em> take a few minutes to make this small, simple change to your websites. While not a catastrophic issue, taking care to control how your sites render in the worst of circumstances goes a long way to demonstrating thoughtful consideration of your users.</p><hr><p><strong>Update:</strong> For more in-depth info on this topic (and scenarios where CSS isn’t applied to your SVGs), be sure to check out <a href="https://www.sarasoueidan.com/blog/svg-style-inheritance-and-fousvg/">this piece from Sara Soueidan</a>.</p>]]></content><amg:twitter><![CDATA[#ProTip: If you don’t explicitly set the dimensions of your inline SVGs, they’ll render full width when your CSS isn’t applied properly.]]></amg:twitter><amg:summary><![CDATA[<p>While it is a bit of an edge case, every now and then I’ll hit a site—yes, even a high profile one—and the CSS will fail to load for some reason. When this happens, inevitably every inline SVG resource on the page will grow to fill the entire width of my viewport, making for a <em>really</em> awkward experience.</p>]]></amg:summary><summary type="html"><![CDATA[<p>While it is a bit of an edge case, every now and then I’ll hit a site—yes, even a high profile one—and the CSS will fail to load for some reason. When this happens, inevitably every inline SVG resource on the page will grow to fill the entire width of my viewport, making for a <em>really</em> awkward experience.</p>]]></summary><category term="CSS" /><category term="design" /><category term="HTML" /><category term="SVG" /><category term="web design" /><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://www.aaron-gustafson.com/i/share-cards/please-size-your-inline-svgs.jpg" /></entry><entry><id>https://www.aaron-gustafson.com/notebook/design-for-developers/</id><title type="html"><![CDATA[✍🏻 Design for Developers]]></title><link href="https://www.aaron-gustafson.com/notebook/design-for-developers/" rel="alternate" type="text/html" /><published>2023-07-18T16:19:37Z</published><content type="html" xml:base="https://www.aaron-gustafson.com"><![CDATA[<p>One of my favorite web designers, <a href="https://stephaniestimac.com/">Stephanie Stimac</a>, asked me to write the foreword for her amazing new book, <a href="http://mng.bz/zXqB"><cite>Design for Developers</cite></a>. With her permission, and Manning’s, I’m reprinting it here.</p><blockquote><p>I’ve worked on the web for a long time. When I say a long time, I mean a long time. As in <em>my first browser was on the command line</em> old. As in <em>my first back-end development was a CGI script</em> old. With my nearly three decades of building dozens upon dozens of projects for the web, the one skill I’ve found most valuable is the ability to bridge the gaps between the worlds of design, user experience, and development.</p><p>Each of these fields attract practitioners from different education and/or hobbyist backgrounds. This can be a point of tension, as folks in each camp tend to see their own field as having the greatest influence on a web project’s success. The reality is that web exists in the nexus of these fields, relying equally on what each of these practices bring to the table. I have found that the most valuable people in any web project are those that understand enough of each field to be able to operate in that nexus, ensuring each team is communicating effectively with the other teams and that everyone is working together toward a shared goal.</p><p>Which brings me to Stephanie Stimac’s <cite>Design for Developers</cite>. This book is an invaluable resource for developers looking to level up in their understanding of what it takes to build for the web today. It provides a crash course in design and user experience in a way that will both improve your fluency with these topics and give you the necessary skills to become productive in these spaces as well. Beyond that superficial perspective, however, this book provides the foundation for leveling up your career and becoming the person who thrives in the space between design, user experience, and development.</p><p>Stephanie is the perfect person to provide you with these insights as well. Not only is she an excellent communicator, she also has years of working experience as a designer, developer, user experience practitioner, and an educator. She’s even worked behind the scenes on web browsers and the web standards they implement, giving her an incredible depth of understanding when it comes to the web and the tools we rely on to build it.</p><p>Whether you’re a longtime developer looking to grow a new branch on your skill tree or you’re starting out and looking to get a solid foundation in what it takes to build for the web, <cite>Design for Developers</cite> is sure to provide you with a wealth of knowledge to help you on your way.</p></blockquote>]]></content><amg:twitter><![CDATA[One of my favorite web designers, @seaotta, asked me to write the foreword for her amazing new book, Design for Developers. With her permission, and Manning’s, I’ve reprinted it on my site.]]></amg:twitter><amg:summary><![CDATA[<p>One of my favorite web designers, <a href="https://stephaniestimac.com/">Stephanie Stimac</a>, asked me to write the foreword for her amazing new book, <a href="http://mng.bz/zXqB"><cite>Design for Developers</cite></a>. With her permission, and Manning’s, I’m reprinting it here.</p>]]></amg:summary><summary type="html"><![CDATA[<p>One of my favorite web designers, <a href="https://stephaniestimac.com/">Stephanie Stimac</a>, asked me to write the foreword for her amazing new book, <a href="http://mng.bz/zXqB"><cite>Design for Developers</cite></a>. With her permission, and Manning’s, I’m reprinting it here.</p>]]></summary><category term="design" /><category term="web design" /><category term="web development" /><category term="CSS" /><category term="HTML" /><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://www.aaron-gustafson.com/i/share-cards/design-for-developers.jpg" /></entry><entry><id>https://www.aaron-gustafson.com/publications/books/design-for-developers/</id><title type="html"><![CDATA[📗 Design for Developers]]></title><link href="http://mng.bz/zXqB" rel="alternate" type="text/html" /><published>2023-05-30T17:00:00Z</published><content type="html" xml:base="https://www.aaron-gustafson.com"><![CDATA[<p>Whether you’re a longtime developer looking to grow a new branch on your skill tree or you’re starting out and looking to get a solid foundation in what it takes to build for the web, <cite>Design for Developers</cite> is sure to provide you with a wealth of knowledge to help you on your way.</p>]]></content><category term="web design" /><category term="web development" /><category term="CSS" /></entry><entry><id>https://www.aaron-gustafson.com/notebook/links/css-image-/</id><title type="html"><![CDATA[🔗 CSS image()]]></title><link href="https://www.aaron-gustafson.com/notebook/links/css-image-/" rel="alternate" type="text/html" /><link href="https://12daysofweb.dev/2022/css-image/" rel="related" type="text/html" /><published>2023-03-02T20:09:05Z</published><content type="html" xml:base="https://www.aaron-gustafson.com"><![CDATA[<p>The CSS4 <code>image()</code> function is really cool! It enables us to inject portions (fragments) of images, change image direction (flip), provide solid color fallbacks &amp; more.</p><p>This is a great writeup from Kevin Powell.</p>]]></content><amg:twitter><![CDATA[The #CSS4 image() function is really cool! It enables us to inject portions (fragments) of images, change image direction (flip), provide solid color fallbacks & more.]]></amg:twitter><category term="CSS" /><category term="web design" /></entry><entry><id>https://www.aaron-gustafson.com/notebook/links/high-definition-css-color-guide/</id><title type="html"><![CDATA[🔗 High Definition CSS Color Guide]]></title><link href="https://www.aaron-gustafson.com/notebook/links/high-definition-css-color-guide/" rel="alternate" type="text/html" /><link href="https://developer.chrome.com/articles/high-definition-css-color-guide/" rel="related" type="text/html" /><published>2023-02-07T23:34:39Z</published><content type="html" xml:base="https://www.aaron-gustafson.com"><![CDATA[<p>Adam really outdid himself putting this resource together. It’s everything you’d want to know about high definition color systems… and then some.</p>]]></content><amg:twitter><![CDATA[Holy moly, that’s a lot about color.]]></amg:twitter><category term="CSS" /><category term="web design" /></entry><entry><id>https://www.aaron-gustafson.com/notebook/links/on-dependency/</id><title type="html"><![CDATA[🔗 On Dependency]]></title><link href="https://www.aaron-gustafson.com/notebook/links/on-dependency/" rel="alternate" type="text/html" /><link href="https://v7.robweychert.com/blog/2020/06/v7-on-dependency/" rel="related" type="text/html" /><published>2023-02-07T23:08:35Z</published><content type="html" xml:base="https://www.aaron-gustafson.com"><![CDATA[<p>Nearly three years on, this piece from Rob still resonates deeply with me.</p><blockquote><p>I have no illusions about being some kind of lone wolf. All the stuff I’m making “by hand”—the way it approaches form, function, and materials—has been informed by philosophies and techniques developed by an amorphous community that spans generations. This work proliferates through byzantine open source projects, yes, but it also proliferates through books, blog posts, and videos with titles like “Custom Styling Form Inputs With Modern CSS Features.” When I’m making things, that’s how I prefer to depend on others and have them depend on me: by sharing strong, simple ideas as a collective, and recombining them in novel ways with rigorous specificity as individuals.</p></blockquote>]]></content><amg:twitter><![CDATA[Nearly three years on, this piece from Rob still resonates deeply with me.]]></amg:twitter><category term="web design" /><category term="web development" /></entry><entry><id>https://www.aaron-gustafson.com/notebook/links/accessible-web-color-combinations/</id><title type="html"><![CDATA[🔗 Accessible web color combinations]]></title><link href="https://www.aaron-gustafson.com/notebook/links/accessible-web-color-combinations/" rel="alternate" type="text/html" /><link href="http://colorsafe.co/" rel="related" type="text/html" /><published>2023-01-20T00:11:57Z</published><content type="html" xml:base="https://www.aaron-gustafson.com"><![CDATA[<p>Love this tool for creating accessible color combinations.</p>]]></content><amg:twitter><![CDATA[Love this tool for creating accessible color combinations.
↬ @DanMall]]></amg:twitter><category term="accessibility" /><category term="web design" /></entry><entry><id>https://www.aaron-gustafson.com/notebook/links/use-buttons-or-buttons-plus-an-open-text-field-for-updating-cart-quantity/</id><title type="html"><![CDATA[🔗 Use Buttons or Buttons Plus an Open Text Field for Updating Cart Quantity]]></title><link href="https://www.aaron-gustafson.com/notebook/links/use-buttons-or-buttons-plus-an-open-text-field-for-updating-cart-quantity/" rel="alternate" type="text/html" /><link href="https://baymard.com/blog/auto-update-users-quantity-changes" rel="related" type="text/html" /><published>2022-11-05T03:46:22Z</published><content type="html" xml:base="https://www.aaron-gustafson.com"><![CDATA[<p>I’m living this super deep dive into the UX of the quantity field in e-commerce.</p>]]></content><amg:twitter><![CDATA[Super deep dive into the UX of the quantity field in e-commerce.]]></amg:twitter><category term="forms" /><category term="web design" /><category term="web development" /></entry><entry><id>https://www.aaron-gustafson.com/notebook/links/building-a-resilient-frontend-using-progressive-enhancement/</id><title type="html"><![CDATA[🔗 Building a resilient frontend using progressive enhancement]]></title><link href="https://www.aaron-gustafson.com/notebook/links/building-a-resilient-frontend-using-progressive-enhancement/" rel="alternate" type="text/html" /><link href="https://www.gov.uk/service-manual/technology/using-progressive-enhancement" rel="related" type="text/html" /><published>2022-11-03T16:58:46Z</published><content type="html" xml:base="https://www.aaron-gustafson.com"><![CDATA[<p>How did I miss this? The gov.uk Service Manual recommends progressive enhancement for all their websites.</p><blockquote><p>Using progressive enhancement means your users will be able to do what they need to do if any part of the stack fails. Building your service using progressive enhancement will:</p><ul><li>make your service more resilient</li><li>mean your service’s most basic functionality will work and meet the core needs of the user</li><li>improve accessibility by encouraging best practices like writing semantic markup</li><li>help users with device or connectivity limitations to use your service</li></ul></blockquote><p>🥰</p>]]></content><amg:twitter><![CDATA[How did I miss that gov.uk was requiring progressive enhancement‽]]></amg:twitter><amg:summary><![CDATA[<p>How did I miss this? The gov.uk Service Manual recommends progressive enhancement for all their websites.</p>]]></amg:summary><summary type="html"><![CDATA[<p>How did I miss this? The gov.uk Service Manual recommends progressive enhancement for all their websites.</p>]]></summary><category term="accessibility" /><category term="performance" /><category term="progressive enhancement" /><category term="web design" /><category term="web development" /></entry><entry><id>https://www.aaron-gustafson.com/speaking-engagements/progressive-enhancement-where-do-i-begin/</id><title type="html"><![CDATA[📢 Progressive Enhancement: Where Do I Begin?]]></title><link href="" rel="alternate" type="text/html" /><published>2022-10-27T17:00:00Z</published><content type="html" xml:base="https://www.aaron-gustafson.com"><![CDATA[<p>“Progressive enhancement” is a philosophical approach to web design and development that centers users, with the goal of enabling everyone to access the content and complete core tasks, regardless of circumstances influencing how they access the web. In this session, I set the stage for why progressive enhancement is the gold standard for developing web projects before diving into a host of practical examples of how you can apply this practice to a range of interfaces. Along the way, I also show you how your entire team can (and should) get involved in the ideation, development, testing, and evolution of your interfaces and components.</p>]]></content><amg:twitter><![CDATA[In this session, I explain why progressive enhancement is the gold standard for developing web projects before diving into a host of practical examples of how you can apply this practice to a range of interfaces.]]></amg:twitter><amg:summary><![CDATA[<p>In this session, I explain why progressive enhancement is the gold standard for developing web projects before diving into a host of practical examples of how you can apply this practice to a range of interfaces.</p>]]></amg:summary><summary type="html"><![CDATA[<p>In this session, I explain why progressive enhancement is the gold standard for developing web projects before diving into a host of practical examples of how you can apply this practice to a range of interfaces.</p>]]></summary><category term="accessibility" /><category term="progressive enhancement" /><category term="web design" /><category term="web development" /><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://www.aaron-gustafson.com/i/talks/progressive-enhancement-where-do-i-begin.png" /></entry><entry><id>https://www.aaron-gustafson.com/notebook/links/overlays-underwhelm/</id><title type="html"><![CDATA[🔗 Overlays Underwhelm]]></title><link href="https://www.aaron-gustafson.com/notebook/links/overlays-underwhelm/" rel="alternate" type="text/html" /><link href="https://www.youtube.com/watch?v=c-effkHJfU8" rel="related" type="text/html" /><published>2022-10-13T16:28:16Z</published><content type="html" xml:base="https://www.aaron-gustafson.com"><![CDATA[<p>Excellent talk from Adrian Roselli on the problematic nature of accessibility overlays.</p><p>He’s posted <a href="https://adrianroselli.com/2022/09/overlays-underwhelm-at-id24.html">a text version of the talk</a> on his site as well.</p>]]></content><amg:twitter><![CDATA[Excellent talk from @aardrian on the problematic nature of accessibility overlays.]]></amg:twitter><category term="accessibility" /><category term="web design" /></entry><entry><id>https://www.aaron-gustafson.com/notebook/links/control/</id><title type="html"><![CDATA[🔗 Control]]></title><link href="https://www.aaron-gustafson.com/notebook/links/control/" rel="alternate" type="text/html" /><link href="https://adactio.com/journal/19315" rel="related" type="text/html" /><published>2022-10-12T19:39:43Z</published><content type="html" xml:base="https://www.aaron-gustafson.com"><![CDATA[<p>Early on in my journey as a web designer, <a href="https://twitter.com/mholzschlag">Molly Holzschlag</a> taught me the importance of controlling everything you can, up until the point that you realize you must relinquish control. In this piece, Jeremy Keith explores the tension around control and, ultimately, echoes Molly’s perspective:</p><blockquote><p>The web is filled with uncertainties—browsers, devices, networks. You can’t possibly account for all of the possible variations. On the web, you have to relinquish some control.</p></blockquote>]]></content><amg:twitter><![CDATA[Early on, @mholzschlag taught me the importance of controlling everything you can up until the point that you must relinquish control. Here, @adactio explores the tensions of control on the web:]]></amg:twitter><category term="progressive enhancement" /><category term="web design" /><category term="web development" /></entry><entry><id>https://www.aaron-gustafson.com/notebook/thoughts-on-the-proposed-websites-and-software-applications-accessibility-act/</id><title type="html"><![CDATA[✍🏻 Thoughts on the proposed Websites and Software Applications Accessibility Act]]></title><link href="https://www.aaron-gustafson.com/notebook/thoughts-on-the-proposed-websites-and-software-applications-accessibility-act/" rel="alternate" type="text/html" /><published>2022-10-07T16:41:58Z</published><content type="html" xml:base="https://www.aaron-gustafson.com"><![CDATA[<p>Last month, Senator Tammy Duckworth (D-Ill.) and Representative John P. Sarbanes (D-Md.) introduced the Websites and Software Applications Accessibility Act—I’m gonna call it the WS3A for short—simultaneously in the U.S. Senate (<a href="https://www.congress.gov/bill/117th-congress/senate-bill/4998">S. 4998</a>) and House of Representatives (<a href="https://www.congress.gov/bill/117th-congress/house-bill/9021">H.R. 9021</a>) to explicitly bring websites—and other forms of digital media that didn’t exist when the ADA was signed into law—into the purview of the Americans with Disabilities Act (ADA). I am definitely in favor of this effort as it removes the ambiguity that currently exists in U.S. law as to whether websites are governed by the ADA. The WS3A is a reasonable framework, but there is still a lot of work to be done when it (hopefully) passes.</p><p>On reading <a href="https://www.duckworth.senate.gov/imo/media/doc/22.09.28%20-%20Websites%20and%20Software%20Applications%20Accessibility%20Act%20BILL%20TEXT%20FINAL1.pdf">the text of the WS3A</a>, I really appreciated the thought they put into the way it’s structured. In a nutshell, it</p><ol><li>Affirms that the (ADA) prohibits discrimination against people with disabilities in their use of websites.</li><li>Tasks the Department of Justice (DOJ) and the Equal Employment Opportunity Commission (EEOC) with establishing, updating, and enforcing accessibility standards for websites and applications.</li><li>Sets up a committee to work with these government offices to establish the rules that govern digital accessibility. It also establishes a central repository (and governing committee) to provide guidance on how to achieve compliance. Both committees must include representatives from numerous named disability communities as well as digital accessibility experts.</li><li>Identifies who needs to abide by these standards (e.g., the government, employers, commercial entities).</li><li>Establishes the legal grounding for litigation (from both the government and citizens) of violations of the established standards.</li></ol><p>There’s more to it than that, but it’s a reasonable summary. I suggest reading <a href="https://www.duckworth.senate.gov/imo/media/doc/22.09.27%20SxS%20-%20Websites%20and%20Software%20Applications%20Accessibility%20Act%20FINAL.pdf">Senator Duckworth’s summary doc</a> for more detail as well.</p><h2 id="we-don%E2%80%99t-all-need-%E2%80%9Cthe-same%E2%80%9D-experience" tabindex="-1"><a class="header-anchor" href="#we-don%E2%80%99t-all-need-%E2%80%9Cthe-same%E2%80%9D-experience" aria-hidden="true">#</a> We don’t all need “the same” experience</h2><p>In Section 3 of the WS3A, a part of the definition for “accessibility” is the requirement for people with disabilities to be able “to engage in the same interactions as” people without disabilities. This sounds good on first blush, but I think “the same” could be misleading.</p><p>A number of years back, I was consulting with a financial services firm. Their web team was quite interested in putting accessibility into practice on their website after spending a few days talking about it with me. When I circled back a few months later, things weren’t going so well. The team that was focused on accessibility was two sprints behind “because of accessibility” and management was ready to give up on it. And so I asked them to walk me through what was going on.</p><p>The problem was an interactive graph they had built for a page in their company’s marketing site. It allowed users to see how much they’d save in fees over a certain number of years based on an initial investment amount that could be adjusted via a slider control. The slider allowed the initial investment amount to range from a low of $5,000 to something like $5,000,000 in increments of $5,000. They had run into all sorts of delays in getting the slider to work <em>identically</em> for people using either a mouse (the default they’d considered) or a keyboard.</p><p>After getting the details, I had them take a step back and look at the big picture. I asked them to consider the goal of the interface: to help people understand the more they invest with this company, the more they will save in fees. Then I asked them if the keyboard experience of that slider was a good one. It wasn’t; no one is going to move the slider potentially several hundred times to get to the exact amount they’re considering investing, nor should they have to. So I asked them to reconsider their approach and come up with other ways to achieve the goal. After all, this was for a marketing site; they weren’t displaying someone’s actual account information, where they would need to be more exacting in their approach.</p><p>They realized the same goal could be achieved in two ways. First, they could ensure the copy that came before the visualization offered the same information in textual form. Second, they could simplify the slider interface to have a set number of stops for keyboard users, to give users a sense of how things would change, but without making the interface tedious to use. These were both excellent alternatives and provided a better, some might say <em>more</em> accessible experience for folks who relied on a keyboard to both navigate and interact with he web.</p><p>When it comes to accessibility, it’s easy to get hung up while trying to provide an <em>identical</em> experience when that isn’t always the best thing. Everyone should be granted the opportunity to accomplish the core goal of an interface, but they don’t necessarily need to do it in the same way. If we get too caught up in providing the same experience, it’s easy to miss out on providing the right experience.</p><p>So, in reflecting on the WS3A’s definition of accessibility, I would prefer to see a little more nuance. I did notice that later, in the Rulemaking section, they use the phrase “equally effective experiences for users with disabilities and users without disabilities.” That’s a much better goal here. The same opportunities need to exist; parity is important, but not everyone requires the same accommodations.</p><p>This applies in other contexts too. For example, some images are informational, others are decorative; strict reading of a requirement for “the same” experience might lead folks to believe all images require descriptions, which they don’t. Similarly, users need to have control over how they receive information. They need to be able to adjust font sizes, stop things form moving around on the screen, change the colors of the interface to improve readability, eliminate distractions, and so on. We need to be building interfaces that can <em>adapt</em> to serve our users’ individualized needs across a wide range of intersections encompassing their own capabilities and disabilities as well as those of their device, their network, and the influence of their environment. (Insert shameless plug for <a href="https://adaptivewebdesign.info/">my book</a> here.)</p><h2 id="we-need-to-better-define-an-%E2%80%9Cundue-burden%E2%80%9D" tabindex="-1"><a class="header-anchor" href="#we-need-to-better-define-an-%E2%80%9Cundue-burden%E2%80%9D" aria-hidden="true">#</a> We need to better-define an “undue burden”</h2><p>The WS3A provides two pathways for an entity to side-step their obligations under the ADA. One seems pretty reasonable: if compliance would “fundamentally alter the nature” of the entity’s offerings, they can be excused from having to comply. The other reason creates a huge loophole, however: if compliance would “impose an undue burden” on the entity in violation.</p><p>What exactly is an “undue burden”? <a href="https://www.ada.gov/reachingout/l2factors.html">According to the ADA</a>, it means “significant difficulty or expense,” which is determined in consideration of:</p><blockquote><ol><li>The nature and cost of the action needed under this part;</li><li>The overall financial resources of the site or sites involved in the action; the number of persons employed at the site; the effect on expenses and resources; legitimate safety requirements that are necessary for safe operation, including crime prevention measures; or the impact otherwise of the action upon the operation of the site;</li><li>The geographic separateness, and the administrative or fiscal relationship of the site or sites in question to any parent corporation or entity;</li><li>If applicable, the overall financial resources of any parent corporation or entity; the overall size of the parent corporation or entity with respect to the number of its employees; the number, type, and location of its facilities; and</li><li>If applicable, the type of operation or operations of any parent corporation or entity, including the composition, structure, and functions of the workforce of the parent corporation or entity.</li></ol></blockquote><p>The exact math is not exactly clear-cut—especially when we’re talking about digital products as opposed to physical structures—and I could see a number of corporations declaring something an “undue burden” when, in fact, it is relatively easy to address. It would be nice to see some guidance around what is considered to be a regular “cost of doing accessible business” in terms of percentage of operating revenue or percentage of staff dedicated to identifying and remediating accessibility issues.</p><h2 id="other-things-i-hope-to-see-addressed" tabindex="-1"><a class="header-anchor" href="#other-things-i-hope-to-see-addressed" aria-hidden="true">#</a> Other things I hope to see addressed</h2><p>Below are a some additional questions and thoughts I think the commissions operating under the WS3A should seek to address:</p><ul><li><strong>If we agree accessibility is a journey, not a destination (i.e., we’re never “done”), how can we declare something is “accessible” (or not)?</strong> It feels like the <a href="https://www.w3.org/WAI/standards-guidelines/wcag/">Web Content Accessibility Guidelines (WCAG)</a> offer some solid guidance and that will likely set the bar for this effort, especially given that <a href="https://www.section508.gov/">Section 508 of the Rehabilitation Act</a> relies on that set of guidelines as well. I’m encouraged by their recognition that what’s needed is ongoing evaluation of the guidance as well, but it still presents challenges around how we define “accessible enough.” Additionally, digital products are different because they are easily changed, updated, and improved (as opposed to, say, a giant set of concrete stairs).</li><li><strong>We don’t really have clarity around the mechanisms for informing non-compliant entities of their violations.</strong> It’s also unclear as to whether there is a reasonable grace period for them to remediate the issue and report back for validation. Having a grace period to address issues will also be key for heading litigation trolls off at the pass.</li><li><strong>We need some guidance around how much of a disruption is grounds for a formal complaint.</strong> Many organizations ship code pretty much constantly and may introduce an accessibility bug and then address it within a few minutes, hours, or days. Again, a grace period starting when the entity is made aware of the violation would be key for addressing this.</li><li><strong>Third-party code is not addressed at all in the WS3A.</strong> Whose responsibility is it? A huge percentage of the web (and other software projects) are built using open source and commercial codebases that they don’t own or control. If an entity tests a piece of third-party code and determines that it meets their obligations under ADA and then an update to that code introduces an accessibility bug and they are unaware, who is at fault and who is responsible for the remediation? The process seems a little more straightforward with open source code, provided the library maintainer is open to contributions that improve accessibility, but commercial code is a whole other thing.</li></ul><hr><p>On the whole, I really appreciate what Senator Duckworth and Representative Sarbanes (and their staff and partners) are trying to do here. I hope it passes and look forward to keeping tabs on the work of the various commissions tasked with providing the necessary guidance and resources that will lead to a more inclusive web.</p><p>🤞🏻</p>]]></content><amg:twitter><![CDATA[Some thoughts on the Websites and Software Applications Accessibility Act proposed by @SenDuckworth and @RepSarbanes]]></amg:twitter><amg:summary><![CDATA[<p>Last month, Senator Tammy Duckworth (D-Ill.) and Representative John P. Sarbanes (D-Md.) introduced the Websites and Software Applications Accessibility Act—I’m gonna call it the WS3A for short—simultaneously in the U.S. Senate (<a href="https://www.congress.gov/bill/117th-congress/senate-bill/4998">S. 4998</a>) and House of Representatives (<a href="https://www.congress.gov/bill/117th-congress/house-bill/9021">H.R. 9021</a>) to explicitly bring websites—and other forms of digital media that didn’t exist when the ADA was signed into law—into the purview of the Americans with Disabilities Act (ADA). I am definitely in favor of this effort as it removes the ambiguity that currently exists in U.S. law as to whether websites are governed by the ADA. The WS3A is a reasonable framework, but there is still a lot of work to be done when it (hopefully) passes.</p>]]></amg:summary><summary type="html"><![CDATA[<p>Last month, Senator Tammy Duckworth (D-Ill.) and Representative John P. Sarbanes (D-Md.) introduced the Websites and Software Applications Accessibility Act—I’m gonna call it the WS3A for short—simultaneously in the U.S. Senate (<a href="https://www.congress.gov/bill/117th-congress/senate-bill/4998">S. 4998</a>) and House of Representatives (<a href="https://www.congress.gov/bill/117th-congress/house-bill/9021">H.R. 9021</a>) to explicitly bring websites—and other forms of digital media that didn’t exist when the ADA was signed into law—into the purview of the Americans with Disabilities Act (ADA). I am definitely in favor of this effort as it removes the ambiguity that currently exists in U.S. law as to whether websites are governed by the ADA. The WS3A is a reasonable framework, but there is still a lot of work to be done when it (hopefully) passes.</p>]]></summary><category term="accessibility" /><category term="inclusive design" /><category term="software development" /><category term="web design" /><category term="web development" /><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://www.aaron-gustafson.com/i/share-cards/thoughts-on-the-proposed-websites-and-software-applications-accessibility-act.jpg" /></entry></feed>