<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title>Dana Byerly</title>
	<subtitle>Articles and notes about front-end dev, design and side-projects.</subtitle>
	<link href="https://danabyerly.com/feed.xml" rel="self"/>
	<link href="https://danabyerly.com/"/>
	<updated>2025-12-31T16:15:00Z</updated>
	<id>https://danabyerly.com</id>
	<author>
    <name>Dana Byerly</name>
    <email>hello@danabyerly.com</email>
	</author>
	
    
    <entry>
      <title>A post under the wire</title>
      <link href="https://danabyerly.com/notes/a-post-under-the-wire/"/>
      <updated>2025-12-31T16:15:00Z</updated>
      <id>https://danabyerly.com/notes/a-post-under-the-wire/</id>
      <content type="html"><![CDATA[
        <p>It’s finally happened. A year went by without an update to this site, unless you count the very <a href="https://danabyerly.com/changelog/2025-12-24/">recent update to the latest version of Eleventy</a>, which was so easy I don’t even think it counts.</p>
<p>Things have been beyond busy at work for the past two years, and time for side projects was the first thing to go. I’m hoping to improve that balance in the coming year.</p>
<p>Despite that, I did manage to do one little project. 2025 marked my 30 year anniversary in New York City, and to mark the occasion I posted one photo of New York  City for each year that I’ve lived here over the course of a month. I wrote about the project over <a href="https://danabyerly-junkdrawer.website/blog/30-years-in-new-york-city/">at the Junk Drawer</a> and created a <a href="https://pixelfed.social/30inNYC">Pixelfed account </a> to post the images. I’d like to eventually add it here via a subdomain, but it’s low on the priority list.</p>

      <div class="heading-wrapper">
        <h2 id="looking-forward">Looking forward
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/a-post-under-the-wire/#looking-forward">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>As for this site, I’ve started to imagine how I want to change it to better accommodate my current state and interests. When I launched the site five years ago I was very much reacquainting myself with front-end skills that had I let lapse. Building a site and writing about all the things I was learning was the perfect way to learn and share.</p>
<p>Despite letting this site wither into a collection of old forgotten posts, there are several posts that still get regular traffic.  When I think about all the posts that I’ve found helpful over the years, and ones that I’ve visited with regularity when I need to remember to how to do something, I feel like the spirit of the web is alive and well knowing that something I’ve posted here could be helping someone.</p>
<p>One of the things I’ve chuckled about, especially over the last couple of years, is that anyone visiting this site would probably not realize that I’m a designer. Especially since I don’t write about design or have a case studies section. Most designer’s sites that I’ve seen are geared towards job hunting rather than having a place on the web to do one’s own thing. And this site is very much the latter.</p>
<p>Of course there are exceptions, and a few notable designers that post with regularity that I enjoy are <a href="https://tylersticka.com/">Tyler Sticka</a>, <a href="https://stephaniewalter.design/">Stéphanie Walter</a> and <a href="https://www.benjystanton.co.uk/">Benjy Stanton</a>.</p>
<p>Stéphanie publishes a helpful <a href="https://stephaniewalter.design/blog/">weekly roundup</a> and has loads of <a href="https://shop.stephaniewalter.design/?utm-source=swblog">great learning material</a>. Tyler’s journal is a nice mix of personal interest and many helpful “where the rubber meets the road” CSS and design posts. If you’re looking to learn more about how to prototype in code check out <a href="https://cloudfour.com/thinks/why-i-like-designing-in-the-browser/">Why I like designing in the browser</a> and <a href="https://cloudfour.com/thinks/designing-in-the-browser-five-tips-for-beginners/">Designing in the browser: five tips for beginners</a>. Benjy frequently <a href="https://www.benjystanton.co.uk/blog/">shares his process and experiences</a> working predominantly in the Government space in the Wales. It’s great to a peak into a thoughtful, mature practice that focuses on accessibility and web standards as well usability, research and the craft of interaction design.</p>

      <div class="heading-wrapper">
        <h2 id="an-aha-moment">An aha moment
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/a-post-under-the-wire/#an-aha-moment">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Monday mornings are an onslaught of design newsletters. It kills me that everyone sends everything on Monday morning. I don’t give a shit about inbox zero, but I have a strict RSS zero policy, and Monday mornings are challenging.</p>
<p>That annoyance aside, for the last year or so most design newsletters are predominately full of “how to survive and thrive in our new AI world” Medium articles. These generally take two forms, &quot;why aren’t you doing it already OMG you’re going to be left behind’ or “yikes, it’s happening already you’re going to be left behind”. A little hyperbolic? Perhaps, but the uptick in these types of posts has been notable, and tiresome.</p>
<p>As my winter break kicked off I saw that post that not only broke the aforementioned mold, but resonated in a way that crystalized some disparate thoughts I’ve had about this site. A bit of a clickbait-y title, <a href="https://uxdesign.cc/why-ai-is-exposing-designs-craft-crisis-434bcb652848">Why AI is exposing design’s craft crisis</a>, but if you care about design it’s well worth a read.</p>
<p>The first part of the article does the ground work to layout the issues of AI tools in the absence of expertise, but the article isn’t really about AI. It’s about the design industry’s decision to abandon technical literacy when the Great Web Design Split happened 15 or so years ago, and what we’ve lost in the process.</p>
<blockquote>
<p>This wasn’t gatekeeping by engineers. This was the design industry telling itself a story about what designers needed to know. The story went like this: designers focus on users, empathy, and problem-solving. Engineers focus on implementation, code, and technical constraints. Clean separation of concerns. Everyone stays in their lane.</p>
<p>What we lost wasn’t the ability to code. What we lost was the ability to participate in technical conversations.</p>
</blockquote>
<p>This article feels a bit like the design flip side of Chris Coyier’s 2019 juggernaut <a href="https://css-tricks.com/the-great-divide/">The Great Divide</a> about what’s been lost in front-end development in a framework world. It’s truly depressing to highlight the reality of there being so few people who understand what I like to call the “where the rubber meets of the road of design”. When there aren’t many developers or designers who understand the particulars, and specifically how to make good trade-offs, we end up with all the WTF moments we too often have when trying to go about our daily digital business.</p>
<p>I’m all for designers learning to code, but that’s not the argument here.</p>
<blockquote>
<p>Let me be crystal clear: this is not an argument that designers should learn to code production software.</p>
<p>This is about strategic literacy. Understanding enough about technical systems to make informed design decisions and advocate effectively for users when those decisions are being made.</p>
<p>There’s a difference between writing production code and understanding what code does. Between implementing a database schema and knowing why data models influence user workflows. Between configuring a build pipeline and recognizing when technical debt is accumulating in ways that will limit future design possibilities.</p>
</blockquote>
<p>As a ancient person who came out of the Web Design era and stuck with design rather than switching to a development role, I cannot underscore how true these statements are. And it’s not like designers don’t want to better understand technical considerations, at least the ones I work with. It’s just not something that’s taught or prioritized as a design skill.</p>
<p>I do a lot of mentoring and upskilling in my team. Some of it’s front-end focused along the lines of how to evaluate code or make suggestions to developers who lack front-end skills (and just do whatever Figma Dev Mode says, which is not always great).</p>
<p>But more often it’s understanding data models and APIs, or thinking about validation, both front-end and back-end, and how it informs error handling and error messaging. And all the other technical considerations along the way that can inform design, or more importantly, <strong>can be informed BY design</strong>.</p>
<p>As an example, my advice to designers who want to improve their interaction design skills and technical understanding is to work on upload patterns. Some considerations…</p>
<ul>
<li>What are all the constraints? (e.g., file type(s), max file size, amount of files)</li>
<li>Is this validation happening before the files are uploaded? (see above)</li>
<li>Are there any additional validations happening after the file has been uploaded? (e.g., validating field types and values, this is one is common if using a spreadsheet template, hello Enterprise Design!).</li>
<li>In the case of multiple file uploads, how should the various error states be handled across multiple files? (e.g., one file is the wrong the type, one is too big, etc.)</li>
</ul>
<p>My point is that “users need to a way to upload files” is much more complex than making sure the text in your dropzone has sufficient contrast (it usually doesn’t) and the instructional text is easy to understand (it usually isn’t). Have a discussion with the developers on your team to understand their approach or make sure they’re thinking about solving the problem in a way that makes it easy for user’s to gracefully handle all the many errors that can occur.</p>
<p>In the upload scenario, and so many others, the trick is that you as the designer also need to have some understanding of the developer’s choices, if not you not could end up a with technical debt cluster if you insist on things that can be hard to achieve.</p>
<blockquote>
<p>The consequences show up everywhere. <a href="https://www.uxpin.com/studio/blog/10-ways-to-improve-design-to-development-handoff/">UXPin research</a> found that 62% of developers spend significant time redoing designs due to communication breakdowns. Not because designers made bad aesthetic choices. Because designers proposed things that were technically nonsensical, or missed constraints that would have changed the entire approach.</p>
</blockquote>
<p>But honestly I don’t think there are a lot of ways for designers to go about learning these sorts of things outside of mentoring. And that’s a problem. I’m not saying there’s nothing out there, part of what I’m going to do as I narrow down ideas is to see what is out there. I know there are some good deep dives on Smashing and Baymard that I’ve referenced from time to time, but that doesn’t mean there shouldn’t be more. And if you’re a designer with technical literacy you should share that knowledge too!</p>

      <div class="heading-wrapper">
        <h2 id="so-now-what">So now what
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/a-post-under-the-wire/#so-now-what">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Back to the site updates. This made me think that the way to back to this site is write more about technical literacy in design. Not because it’s something I’m learning about as was the case for most of the writing on this site to date, but because I want to share what I know. And the above article does a great job of outlining why these are important skills for designers.</p>
<p>As <a href="https://mastodon.social/@superterrific/115775410525154473">I said on Mastodon</a>, mostly to try to hold myself accountable, “Hoping to focus on giving designers more technical context for decision making &amp; collaboration.”</p>
<p>I don’t have a grand plan and I’m not brimming with energy at the moment. And next week I’ll be back in the work vortex. But, I do want to do several things…</p>
<ul>
<li>Rework the homepage to be a bit more simple - will probably take the “working in the open” approach and strip it back and slowly build it up</li>
<li>Start to write about technical concerns for designers, again, no grand plan but I have a few notes</li>
<li>Try REALLY hard not to ignore the first two bullets and just rearchitect my CSS and call it a day</li>
</ul>
<p>I think I’m going to leave the interior pages the same for now, and maybe always. We’ll see. Hopefully I’ll eek out a post or two in the coming months and see where it takes me. And I guess if I get my act together and actually do this I’ll have to stop calling this my web dev site! My design dev site?</p>
<p>Until then, here’s to a better 2026.</p>

      ]]></content>
    </entry>
	
    
    <entry>
      <title>Defaults 2024</title>
      <link href="https://danabyerly.com/notes/defaults-2024/"/>
      <updated>2024-12-22T15:15:00Z</updated>
      <id>https://danabyerly.com/notes/defaults-2024/</id>
      <content type="html"><![CDATA[
        <p>Last year’s inventory of <a href="https://danabyerly.com/notes/defaults-2023/">application defaults</a> was fun. At the time I had noted several apps I wanted to replace. Let’s see how things shook out.</p>

      <div class="heading-wrapper">
        <h2 id="no-changes">No changes
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/defaults-2024/#no-changes">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><ul>
<li><strong>Mail server</strong>: <a href="https://www.dreamhost.com/">Dreamhost</a></li>
<li><strong>Mail client</strong>: <a href="https://www.thunderbird.net/">Thunderbird</a>, Mail.app on iOS</li>
<li><strong>Calendar</strong>: Calender.app but interested in trying <a href="https://www.busymac.com/busycal/">BusyCal</a> (but <strong>still</strong> haven’t yet)</li>
<li><strong>Contact management</strong>: Contacts.app</li>
<li><strong>Browser</strong>: Firefox on desktop, Safari on iOS (not like there’s a choice!)</li>
<li><strong>Chat</strong>: Messages.app, <a href="https://signal.org/">Signal</a></li>
<li><strong>Notes</strong>: <a href="https://obsidian.md/">Obsidian</a> and <a href="https://standardnotes.com/">Standard Notes</a></li>
<li><strong>To-do</strong>: <a href="https://obsidian.md/">Obsidian</a>, <a href="https://standardnotes.com/">Standard Notes</a>, Reminders.app</li>
<li><strong>Photography</strong>: Camera.app and currently iPhone 15 Pro</li>
<li><strong>Photo management</strong>: Photos.app</li>
<li><strong>Photo editing</strong>: <a href="https://flyingmeat.com/acorn/">Acorn</a></li>
<li><strong>Image compression</strong>: <a href="https://squoosh.app/">Squoosh</a></li>
<li><strong>Word processing</strong>: <a href="https://www.libreoffice.org/">Libre Office</a>, Google Docs</li>
<li><strong>Spreadsheets</strong>: Google Sheets, <a href="https://www.libreoffice.org/">Libre Office</a></li>
<li><strong>Presentations</strong>: I don’t do these often, but the only one I did in 2023 was with <a href="https://miro.com/">Miro</a></li>
<li><strong>Visual thinking / wireframing</strong>: <a href="https://miro.com/">Miro</a>, Freeform.app</li>
<li><strong>Color picker</strong>: <a href="https://superhighfives.com/pika">Pika</a></li>
<li><strong>Shopping lists</strong>: Not really, but sometimes I’ll note something out of the regular rotation I want to remember in Standard Notes or Obsidian</li>
<li><strong>Meal planning</strong>: Nope</li>
<li><strong>Budgeting and finance</strong>: Nope</li>
<li><strong>News</strong>: RSS feeds</li>
<li><strong>Music</strong>: Apple Music</li>
<li><strong>Podcasts</strong>: Nope</li>
<li><strong>Code editor</strong>: <a href="https://code.visualstudio.com/">VS Code</a> (minor 2024 update: waiting for better HTML autocomplete in <a href="https://nova.app/">Nova</a>)</li>
<li><strong>Text editor</strong>: <a href="https://www.barebones.com/products/bbedit/index.html">BBedit</a></li>
<li><strong>Mastodon</strong>: Web on Desktop, PWA of web app on mobile</li>
<li><strong>Backups</strong>: Weekly Time Machine back-ups to a G-Technology 4TB drive</li>
<li><strong>FTP</strong>: <a href="https://panic.com/transmit/">Transmit</a>, yes I still use FTP for a few things and Transmit is awesome</li>
<li><strong>Batch image processing</strong>: <a href="https://flyingmeat.com/retrobatch/">Retrobatch</a></li>
<li><strong>Screenshots</strong>: Mostly built in OS screenshots with some <a href="https://cleanshot.com/">CleanShot X</a> when I need to annotate, use backgrounds, etc.</li>
<li><strong>Search</strong>: DuckDuckGo, with occasional follow-up Google for code questions</li>
</ul>

      <div class="heading-wrapper">
        <h2 id="updates">Updates
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/defaults-2024/#updates">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>These are the ones where I did change my default app.</p>

      <div class="heading-wrapper">
        <h3 id="cloud-storage-and-backups">Cloud storage and backups
      </h3>
        <a class="anchor-link" href="https://danabyerly.com/notes/defaults-2024/#cloud-storage-and-backups">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Last year’s entry went like this: “Mostly <a href="https://www.dropbox.com/">Dropbox</a>, some <a href="https://www.icloud.com/">iCloud</a>, testing out <a href="https://proton.me/drive">Proton Drive</a>”.</p>
<p>I went on to <a href="https://danabyerly.com/notes/defaults-2023/#cloud-storage-and-backups">discuss my dislike</a> of the Dropbox app’s mobile privacy settings and that I wanted to give Proton a proper try to see if it was ready for prime time.</p>
<blockquote>
<p>Perhaps this time next year Proton Drive will be my main cloud storage.</p>
</blockquote>
<p>Yeah, no. In my limited tests the desktop version encountered syncing issues on a multiple occasions. Their support was prompt and helpful, but I wouldn’t feel comfortable using it beyond copying specific files I’d like be to be able to access on mobile from Dropbox to Proton. Maybe next year? But guessing probably not.</p>

      <div class="heading-wrapper">
        <h3 id="rss">RSS
      </h3>
        <a class="anchor-link" href="https://danabyerly.com/notes/defaults-2024/#rss">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>From <a href="https://danabyerly.com/notes/defaults-2023/#rss">last year’s post</a>…</p>
<blockquote>
<p>After writing the above paragraph (that noted that I had previously tried Inoreader and wasn’t willing to switch) I went back and signed in to my Inoreader and NetNewsWire accounts. Happy to report Inoreader seems much more like a contender than my first review, and they’re having a nice holiday special. I’ll probably grab the holiday deal and slowly migrate/test it out.</p>
</blockquote>
<p>And…</p>
<blockquote>
<p>We’ll see if Inoreader has replaced Feedly by this time next year.</p>
</blockquote>
<p>Ding, ding. We have a winner! Not only was it an easy transition, I like Inoreader much more than I ever liked Feedly.</p>

      <div class="heading-wrapper">
        <h3 id="bookmarking-and-reading-later">Bookmarking and reading later
      </h3>
        <a class="anchor-link" href="https://danabyerly.com/notes/defaults-2024/#bookmarking-and-reading-later">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Ugh, <a href="https://blog.omnivore.app/p/omnivore-is-joining-elevenlabs">Omnivore</a>. It was going so well <a href="https://danabyerly.com/notes/defaults-2023/#bookmarking-and-read-it-later">at this time last year</a>!</p>
<p>Aside from a few galling choices, such as lack of flexibility in export options and handwaving repeated requests for a simple export to CSV (“people can just use the the API”), Omnivore was exactly what I wanted in an read-it/find-it-later app.</p>
<p>An unfortunate thing that turned out to be fortunate was that I noticed that the “ai-ideas” channel in their Discord server was active enough to <a href="https://mastodon.social/@superterrific/112419617081354574">prompt me to have an exit plan</a>.</p>
<p>Because of this I found a python script to export my library to CSV, and created a reminder (Reminders.app, still a default!) to run the script weekly. This meant I had an up to date CSV file of all my 900+ saved articles that I may never read again ready to go when the inevitable happened.</p>
<p>In fairness, the <a href="https://mastodon.social/@superterrific/112419758479192105">save to Obsidian</a> feature turned out to be the thing I liked the most, and the thing I can’t find anywhere else. I ended up migrating to <a href="https://raindrop.io/">Raindrop</a>, and while it doesn’t have offline reading in the way that I would like, I am making great use of the <a href="https://help.raindrop.io/collections/">Collections feature</a> and have so far imported bookmarks from all my failed bookmarking attempts of yore, including Pinboard, Instapaper, Pocket, and Evernote. I’m also going to create collections for my saved mobile tabs, which I have been <a href="https://nerdschalk.com/copy-links-all-tabs-safari-iphone/">backing-up</a> annually since 2021. I might make a post about all of this later.</p>

      <div class="heading-wrapper">
        <h3 id="weather">Weather
      </h3>
        <a class="anchor-link" href="https://danabyerly.com/notes/defaults-2024/#weather">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><blockquote>
<p>The most annoying thing is that I would use the Apple weather app if I could read it during the day.</p>
</blockquote>
<p>Yeah, I just <a href="https://danabyerly.com/notes/defaults-2023/#weather">gave in</a> and now use Apple’s weather app exclusively, despite still hating the lack of daytime contrast and ability to customize appearance.</p>
<p>Nothing on the radar to swap for next year, we’ll see if anything changes. Hopefully I’ll even make a post or two between now and then. Happy defaulting in 2025!</p>

      ]]></content>
    </entry>
	
    
    <entry>
      <title>Year in nothing to review</title>
      <link href="https://danabyerly.com/notes/year-in-nothing-to-review/"/>
      <updated>2024-12-21T16:00:00Z</updated>
      <id>https://danabyerly.com/notes/year-in-nothing-to-review/</id>
      <content type="html"><![CDATA[
        <p>Hello strangers. It’s been four years since I <a href="https://danabyerly.com/articles/finally-a-new-site/">started this site</a>. Each year I’ve done a Year in Review post on the anniversary of the site launch in September. I missed that milestone this year and will attempt to make up for it now.</p>
<p>This year’s Year in Review, or “Year four in the books” as it would’ve been named, will be very short. Ready? Nothing happened. At least here at the this site.</p>
<p>Elsewhere in life <a href="https://danabyerly-junkdrawer.website/blog/in-case-you-were-wondering/">plenty happened</a>. And while things were going not great in my personal life, things were also much busier in my work life, although with some notable bright spots. Basically my attention has been elsewhere, and that will probably continue for the time being.</p>
<p>Back to the matter at hand, in my usual <a href="https://danabyerly.com/tag/year-in-review/">Year in review post</a> I note whatever I’ve done and things that I want to accomplish the next year. <a href="https://danabyerly.com/notes/year-three-in-the-books/">Last year</a> I was pleased with my progress. This year, <a href="https://danabyerly.com/notes/year-three-in-the-books/#whats-next">not so much</a>…</p>
<ul>
<li>Tinkering? Nope.</li>
<li>Rearchitecting CSS? Nope.</li>
<li>Reworking the homepage? Nope.</li>
<li>Hedging? Should’ve done more of that.</li>
</ul>
<p>What, if anything, did I manage to do?</p>
<ul>
<li>The <a href="https://danabyerly.com/changelog/2024-03-23/">only thing I did around here</a> was add update my ineffectual robots.txt to keep with bad doers and clean up some link rot introduced by Google’s Web Dev redesign.</li>
<li>I did <a href="https://danabyerly-junkdrawer.website/blog/blurb-tidying/">revamp the TV Blurbs</a> sections at the Junk Drawer.</li>
<li>I also managed to launch a new site!</li>
</ul>
<p>Yes, even in a year where I could barely do anything other than keep my head above water I launched a site, and promptly forgot to mention it here or on Mastodon. The site is an archive of a pet blog I wrote between 2006-2007 called <a href="https://www.homezoo.org/">Home Zoo</a>.</p>
<p>It was sitting around gathering dust on a very old version of WordPress, so I moved it to Eleventy. It only has about 20 or so posts so it was easy to convert. And I find doing that kind of work oddly relaxing.</p>
<p>I kept the design similar to the original site. The gigantic poor quality header image is the original image used on the old WordPress site, but set to the take the full width of the screen so it looks extra bad on big screens. That was the intended outcome.</p>
<p>The sidebars use the design of the old version and the color palette is roughly the same, now with better contrast. At any rate, if you’d like to read some not interesting posts from an almost 20 year old pet blog, please <a href="https://www.homezoo.org/">visit the Home Zoo</a>!</p>
<p>As for next year? Not holding my breath, but I will be posting my 2024 Defaults post here tomorrow. And I’m planning to do my annual <a href="https://danabyerly-junkdrawer.website/wake-up-songs/">Junk Drawer Wake Up Song</a> recap (<a href="https://danabyerly-junkdrawer.website/blog/wake-up-songs-2023/">2023</a>) and one sentence about everything I watched in 2024 post (<a href="https://danabyerly-junkdrawer.website/blog/what-i-watched-in-2022/">2022</a>, <a href="https://danabyerly-junkdrawer.website/blog/what-i-watched-in-2023/">2023</a>). Fingers crossed.</p>

      ]]></content>
    </entry>
	
    
    <entry>
      <title>Defaults 2023</title>
      <link href="https://danabyerly.com/notes/defaults-2023/"/>
      <updated>2023-12-22T21:20:00Z</updated>
      <id>https://danabyerly.com/notes/defaults-2023/</id>
      <content type="html"><![CDATA[
        <p><a href="https://defaults.rknight.me/">App Defaults</a> by <a href="https://rknight.me/app-defaults/">Robb Knight</a> is a fun collection of posts detailing what applications or tools people use for various tasks.</p>
<p>I’ve enjoyed reading them and picked up a few good ideas here and there, but didn’t initially think about doing one. Eventually it occurred to me that it might be fun or useful to track them year over year.</p>
<p>Here are mine as of December 2023. I’m on MacOS and iOS, ** indicate more detailed notes and thoughts below the list. Multiple items are listed in order of most used.</p>
<ul>
<li><strong>Mail server</strong>: <a href="https://www.dreamhost.com/">Dreamhost</a></li>
<li><strong>Mail client</strong>: <a href="https://www.thunderbird.net/">Thunderbird</a>, Mail.app on iOS</li>
<li><strong>Calendar</strong>: Calender.app but interested in trying <a href="https://www.busymac.com/busycal/">BusyCal</a></li>
<li><strong>Cloud file storage</strong>: Mostly <a href="https://www.dropbox.com/">Dropbox</a>, some <a href="https://www.icloud.com/">iCloud</a>, testing out <a href="https://proton.me/drive">Proton Drive</a> **</li>
<li><strong>Contact management</strong>: Contacts.app</li>
<li><strong>Browser</strong>: Firefox on desktop, Safari on iOS (not like there’s a choice!)</li>
<li><strong>Chat</strong>: Messages.app, <a href="https://signal.org/">Signal</a></li>
<li><strong>RSS</strong>: <a href="https://feedly.com/">Feedly</a>, would like to move away but have a lot of workflows built in **</li>
<li><strong>Bookmarks</strong>: All over the place, slowly migrating to <a href="https://omnivore.app/">Omnivore</a> and liking it **</li>
<li><strong>Notes</strong>: <a href="https://obsidian.md/">Obsidian</a> and <a href="https://standardnotes.com/">Standard Notes</a> **</li>
<li><strong>To-do</strong>: <a href="https://obsidian.md/">Obsidian</a>, <a href="https://standardnotes.com/">Standard Notes</a>, Reminders.app **</li>
<li><strong>Photography</strong>: Camera.app and currently iPhone 15 Pro, would love to get back to using standalone cameras **</li>
<li><strong>Photo management</strong>: Photos.app</li>
<li><strong>Photo editing</strong>: <a href="https://flyingmeat.com/acorn/">Acorn</a></li>
<li><strong>Image compression</strong>: <a href="https://squoosh.app/">Squoosh</a></li>
<li><strong>Word processing</strong>: <a href="https://www.libreoffice.org/">Libre Office</a>, Google Docs</li>
<li><strong>Spreadsheets</strong>: Google Sheets, <a href="https://www.libreoffice.org/">Libre Office</a></li>
<li><strong>Presentations</strong>: I don’t do these often, but the only one I did in 2023 was with <a href="https://miro.com/">Miro</a></li>
<li><strong>Visual thinking / wireframing</strong>: <a href="https://miro.com/">Miro</a>, Freeform.app</li>
<li><strong>Color picker</strong>: <a href="https://superhighfives.com/pika">Pika</a></li>
<li><strong>Shopping lists</strong>: Not really, but sometimes I’ll note something out of the regular rotation I want to remember in Standard Notes or Obsidian</li>
<li><strong>Meal planning</strong>: Nope</li>
<li><strong>Budgeting and finance</strong>: Nope</li>
<li><strong>News</strong>: RSS feeds</li>
<li><strong>Music</strong>: Apple Music</li>
<li><strong>Podcasts</strong>: Nope</li>
<li><strong>Password management</strong>: Hodgepodge of memory and saving in browsers</li>
<li><strong>Code editor</strong>: <a href="https://code.visualstudio.com/">VS Code</a> **</li>
<li><strong>Text editor</strong>: <a href="https://www.barebones.com/products/bbedit/index.html">BBedit</a> **</li>
<li><strong>Mastodon</strong>: Web on Desktop with occasional posting using <a href="https://semaphore.social/">Semaphore</a> (really dislike the tiny little sidebar compose box of the web client), PWA of web app on mobile</li>
<li><strong>Weather</strong>: Combo platter of <a href="https://helloweather.com/">Hello Weather</a>, <a href="https://merrysky.net/">Merry Sky</a> and <a href="https://www.wunderground.com/">Weather Underground</a> **</li>
<li><strong>Backups</strong>: Weekly Time Machine back-ups to a G-Technology 4TB drive</li>
<li><strong>FTP</strong>: <a href="https://panic.com/transmit/">Transmit</a>, yes I still use FTP for a few things and Transmit is awesome</li>
<li><strong>Batch image processing</strong>: <a href="https://flyingmeat.com/retrobatch/">Retrobatch</a></li>
<li><strong>Screenshots</strong>: Mostly built in OS screenshots with some <a href="https://cleanshot.com/">CleanShot X</a> when I need to annotate, use backgrounds, etc.</li>
<li><strong>Search</strong>: DuckDuckGo, with occasional follow-up Google for code questions, want to try <s>Kagi</s> (<a href="https://mastodon.social/@nileane@nileane.fr/111705532493513259">not any more</a>).</li>
</ul>

      <div class="heading-wrapper">
        <h2 id="cloud-storage-and-backups">Cloud storage and backups
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/defaults-2023/#cloud-storage-and-backups">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>I’ve been back and forth between Dropbox and iCloud multiple times, and ultimately find Dropbox a bit less annoying than iCloud. Oddly the files in Dropbox feel more integrated into my system than iCloud. I currently use iCloud to share OS-y generated things between devices, like photos and messages. For everything else I use Dropbox.</p>
<p>The biggest Dropbox ugh to me is their mobile app…</p>
<figure class="fig-container">
  <picture>
    <source srcset="https://danabyerly.com/img/app-store-dropbox.avif" type="image/avif" />
    <source srcset="https://danabyerly.com/img/app-store-dropbox.webp" type="image/web" />
    <img src="https://danabyerly.com/img/app-store-dropbox.jpg" alt="The iOS app store listing for Dropbox showing purchases, identifiers, usage data and other is used to track you. Also showing purchases, contacts, search history, usage data, other data, contact info, identifiers and diagnostic are linked to your identity." loading="lazy" />
  </picture>
  <figcaption>
    No.
  </figcaption>
</figure>
<p>If I use your product for free then OK, I get it, you may want some of my data in exchange. I don’t like it, and I’ll think long and hard about agreeing to use your service, but it at least it has the veneer of fairness. Dropbox ain’t cheap! I don’t mind paying for it, but I do mind also giving them this much data (and the third party AI thing, which I immediately disabled thanks to thoughtful people at Mastodon <a href="https://mas.to/@kissane/111574545617211595">letting everyone know</a>).</p>
<p>For now I don’t have Dropbox on <a href="https://danabyerly-junkdrawer.website/blog/the-five-year-plan/">my new phone</a>. This isn’t terrible, but it means I need to plan ahead if there are things I want access to when I’m out and about. Enter Proton Drive.</p>
<figure class="fig-container">
  <picture>
    <source srcset="https://danabyerly.com/img/app-store-proton.avif" type="image/avif" />
    <source srcset="https://danabyerly.com/img/app-store-proton.webp" type="image/web" />
    <img src="https://danabyerly.com/img/app-store-proton.jpg" alt="The iOS app store listing for Proton Drive showing only diagnostics are collected and not linked to your identity." loading="lazy" />
  </picture>
  <figcaption>
    That's more like it.
  </figcaption>
</figure>
<p>I have a Proton account that includes Proton Drive. I’ve been waiting for a desktop app to give it a try, and last month <a href="https://mastodon.social/@protonmail/111459371456771298">it became available</a>.  So far so good. It’s easy to share and files are available offline and when signed out of your account. Perhaps this time next year Proton Drive will be my main cloud storage.</p>

      <div class="heading-wrapper">
        <h2 id="rss">RSS
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/defaults-2023/#rss">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>I’ve used Feedly for many years, and have plenty of useful workflows built into it. I like the ability to create boards, the title-only layout and that read articles don’t disappear into the void.</p>
<p>I don’t use any of the AI they’ve been pushing and hadn’t paid much attention to it. Then in the spring of this year they <a href="https://newsletter.mollywhite.net/p/feedly-launches-strikebreaking-as">started advertising</a> “How to track protests posing a risk to your company’s assets with Feedly AI”. Ugh.</p>
<p>They immediately stated that they flubbed the communication, and didn’t intend for it be used for things like <a href="https://newsletter.mollywhite.net/p/feedly-launches-strikebreaking-as">strikebreaking as a service</a>. Even if that’s true, it was a wake up call to try to find another option not heavily invested in “whoopsie we made strikebreaking AI, sorry!” product lines.</p>
<p>I did some initial research trying <a href="https://www.inoreader.com/">Inoreader</a> and <a href="https://netnewswire.com/">NetNewsWire</a>, but at the time neither of them had enough of what I wanted to spend the time reworking all the stuff I used Feedly for. I think <a href="https://feedbin.com/">Feedbin</a> also seemed like a contender, but didn’t get around to giving them a shot.</p>
<p>After writing the above paragraph I went back and signed in to my Inoreader and NetNewsWire accounts. Happy to report Inoreader seems much more like a contender than my first review, and they’re having a nice holiday special. I’ll probably grab the holiday deal and slowly migrate/test it out.</p>
<p>This is my must-have feature list…</p>
<ul>
<li>Be able easily find articles once they are read</li>
<li>Be able to either tag articles or add to a board, bonus if the tag or board has its own RSS feed or can be easily shared</li>
<li>Be able to easily set up automations using Zapier or IFTTT</li>
<li>Be able to view as a title only list view layout for maximum scanning and minimal visual noise</li>
</ul>
<p>We’ll see if Inoreader has replaced Feedly by this time next year.</p>

      <div class="heading-wrapper">
        <h2 id="bookmarking-and-read-it-later">Bookmarking and read-it-later
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/defaults-2023/#bookmarking-and-read-it-later">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>This is really more find-it-later than read-it-later for me. I have saved links all over the place and even started a bookmarking site, <a href="https://pile-of-hrefs.com/">Pile of hrefs</a>, during the early lockdown stage of the pandemic. I have saved links in Pocket, Feedly, an ancient Pinboard account and probably strewn about in a few other places.</p>
<p>A few weeks ago I discovered <a href="https://omnivore.app/">Omnivore</a>, an open source read-it-later app. So far I’m really loving it. It’s easy to add and label links in a variety of ways. It can even consume RSS feed, so theoretically it could be used as an RSS reader as well. It’s relatively new and doesn’t have many of my RSS must-haves, but if you’re looking for a nice lightweight RSS reader, Omnivore could be right for you.</p>

      <div class="heading-wrapper">
        <h2 id="notes-and-to-dos">Notes and to-dos
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/defaults-2023/#notes-and-to-dos">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>On my list of potential articles (in Obsidian), I have an item for “Note taking approach (Standard Notes / Obsidian)”. I used to use a combination of Apple Notes and Notion, and prior to that a combination of sticky notes (physical and digital) and TextEdit.app.</p>
<p>My note taking needs range from quick little things I don’t want to forget to post drafts and longer thoughts. For many years I handled the first type with <a href="https://tweets.danabyerly.com/1426615706691461128/">physical Post It notes</a>. I still have some handy for notes on the fridge and the like. I also used to make good use <a href="https://support.apple.com/guide/stickies/welcome/mac">Apple Stickies</a> before I moved away from using my desktop as de facto junk drawer.</p>
<p>Eventually Apple Notes took up the job of stickies, and it was mostly fine as a user experience. Eventually I wanted notes to be actual files that could be used with any other application. I was also increasingly interested in privacy/security.</p>
<p>For the stickies category I settled on  the privacy focused <a href="https://standardnotes.com/">Standard Notes</a>. It’s perfect for tossing together lists of all kinds and random things I don’t want to forget. I’ve use it for research notes, recipes, my very long series watch list, tracking deliveries and a bunch of other things.</p>
<p>After becoming a <a href="https://en.wikipedia.org/wiki/Markdown">markdown</a> devotee in recent years I wanted to find a tool that allowed me to author in markdown for the longer notes and writing category. At first I tried iA Writer, and mostly liked it. The deal breaker for me was the lack paired brackets via keystrokes. Then I discovered <a href="https://obsidian.md/">Obsidian</a> and have not looked back.</p>
<p>Much like my brain, I only use a small fraction of Obsidian’s capabilities. I’ll never be a personal knowledge management overachiever or a digital garden tender, but Obsidian knocks it out of the park for my meager and disorganized note taking!</p>
<p>I do use Reminder.app for a few reoccurring things like the dog’s monthly preventatives and my  weekly back-ups. I also keep a weekly to-to list running in Obsidian.</p>

      <div class="heading-wrapper">
        <h2 id="photo">Photo
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/defaults-2023/#photo">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>For Default post purposes the category is meant for apps, but I’m more interested in hardware for this one. My current camera is an iPhone 15 Pro, which I’m very happy with so far. I haven’t tried out the high res mode yet but it’s nice to have it as an option. A friend needed a headshot for print over the summer and I dusted off an old <a href="https://pixelfed.social/i/web/post/578348052485733088">Nikon D70</a>, which got the job done. And it made me miss standalone cameras. I can see getting back into it more seriously if I had more time on my hands, but unless some unforeseen windfall happens that won’t be anytime in the near future.</p>
<p>I use <a href="https://flyingmeat.com/acorn/">Acorn</a> for image processing. It’s straightforward and powerful. I don’t do too much, especially with images from iPhone 15 Pro. The D70 images were another issue! But if you’re looking for an affordable image processing app, check out Acorn. Flat fee, no subscription.</p>
<p>For photo management I’ve been using Photos.app for several years. I used my own filing system prior to that and have a pretty large, somewhat organized filing system. I still routinely back-up my photos from Photos.app into actual files that live in my filing structure. It’s not as organized as I’d like, but the photos are also not solely locked in Photos.app.</p>
<p>One of the things I’m hoping to do in 2024 is to tack a photos subdomain on here and make a full on photo site. I’ve been posting regularly all year at <a href="https://pixelfed.social/i/web/profile/396067586349556009">my Pixelfed account</a> and think I’m ready to step it up.</p>

      <div class="heading-wrapper">
        <h2 id="code-and-text-editing">Code and text editing
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/defaults-2023/#code-and-text-editing">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p><a href="https://code.visualstudio.com/">VS Code</a> is like twenty pounds of shit in a five pound bag, at least for my purposes. I loved <a href="https://atom-editor.cc/">Atom</a>, but since it’s no longer being maintained I thought it was best to move to another tool.</p>
<p>I tried <a href="https://nova.app/">Nova</a> when it first came out and have to admit I was completely turned off that it made itself the default application for every code related file type. It also didn’t have many features at the time. Enough time has passed and many people I follow seem to like it as a VS Code alternative, so I’ve added it to my to list to try again.</p>
<p>For <a href="https://sixcolors.com/post/2019/01/using-bbedit-and-excel-to-revive-a-dead-podcast-feed/">text-munging</a> and wrangling I still love <a href="https://www.barebones.com/products/bbedit/index.html">BBEdit</a>. Want to easily strip out all markup or comments? Need powerful search and replace? Easy case changes? BBEdit has your back, <a href="https://www.webdesignmuseum.org/web-design-history/bbedit-html-and-text-editor-1992">since 1992</a>. Whenever I have an unwieldy file, BBEdit is my go to.</p>

      <div class="heading-wrapper">
        <h2 id="weather">Weather
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/defaults-2023/#weather">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>The demise of Dark Sky has left a gaping hole in my formerly solid weather knowing situation. In this household we like to joke that it takes three apps to not be able to figure out when it’s actually going to rain.</p>
<p>I use a combination of <a href="https://helloweather.com/">Hello Weather</a>, <a href="https://merrysky.net/">Merry Sky</a> and <a href="https://www.wunderground.com/">Weather Underground</a>, and for the most part they’re fine. I don’t love any of them. And yes, I’ve tried all the other ones, or rather the other ones that don’t feel the need to track my purchaes, etc.</p>
<p>The most annoying thing is that I would use the Apple weather app if I could read it during the day.</p>
<figure class="fig-container">
  <picture>
    <source srcset="https://danabyerly.com/img/weather-app.avif" type="image/avif" />
    <source srcset="https://danabyerly.com/img/weather-app.webp" type="image/web" />
    <img src="https://danabyerly.com/img/weather-app.jpg" alt="Weather forecast on a phone in white text against a light gray background that is very hard to read." loading="lazy" />
  </picture>
  <figcaption>
    It's even harder to read when it's sunny out.
  </figcaption>
</figure>
<figure class="fig-container">
  <picture>
    <source srcset="https://danabyerly.com/img/weather-watch.avif" type="image/avif" />
    <source srcset="https://danabyerly.com/img/weather-watch.webp" type="image/web" />
    <img src="https://danabyerly.com/img/weather-watch.jpg" alt="Weather forecast on an Apple Watch in white text against a light blue background with clouds." loading="lazy" />
  </picture>
  <figcaption>
    This would be much easier to read with a darker background and no clouds.
  </figcaption>
</figure>
<p>It looks easier to read in the above screenshots, but I find it impossible to read on a screen. If they would just provide an option for a non-dynamic background with sufficient contrast I would happily use it.</p>
<p>We’ll see what, if anything, has changed in my application situation for 2024. Hoping for a few improvements here and there.</p>

      ]]></content>
    </entry>
	
    
    <entry>
      <title>Ye olde Twitter archive</title>
      <link href="https://danabyerly.com/notes/ye-olde-twitter-archive/"/>
      <updated>2023-10-04T13:00:00Z</updated>
      <id>https://danabyerly.com/notes/ye-olde-twitter-archive/</id>
      <content type="html"><![CDATA[
        <p>Earlier in the year I <a href="https://danabyerly.com/notes/regaining-momentum/#tweetback">started fiddling around</a> with creating an archive of my tweets using <a href="https://github.com/tweetback">Tweetback</a>, an open source project by <a href="https://www.11ty.dev/">Eleventy</a> creator Zach Leatherman.</p>
<blockquote>
<p>I’m not 100% convinced that I’ll make it public. I’ve been active on Twitter since the spring of 2007, but honestly most of it’s just chit chat and blather. I’m not a Thought Leader or a Big Account. I didn’t share any meaningful insights. I had no viral shitposts, notable bangers or things generally worthy of a public archive for all eternity. However, in the spirit of IndieWeb, I may tack it on to this site with a subdomain.</p>
</blockquote>
<p>In addition to being unsure if I even wanted to share it publicly, I was unsure of how much I’d be able to modify the layout…</p>
<blockquote>
<p>I’ve fiddled around with some of the CSS and may restructure it a bit. […] Although I may not be brave enough to muck around with the layout as its using <a href="https://www.11ty.dev/docs/languages/javascript/">Javascript as the templating language</a>. I could very easily mess that up! I may just stick to fiddling with the CSS, we’ll see.</p>
</blockquote>
<p>A few weeks ago I randomly <a href="https://mastodon.social/@superterrific/111049111542103143">picked it back up again</a>. I’m happy to report that I overcame my fear and was able to make almost all of the changes I wanted, even modifying a fair bit of JavaScript. And now I’ve <a href="https://tweets.danabyerly.com/">unleashed it into the wild.</a></p>
<p>It felt pretty good to be able to make modifications that I thought were beyond my ability. I won’t be using JavaScript as a templating language in my own projects, but that’s one of the many great things about <a href="https://www.11ty.dev/">Eleventy</a>, I don’t have to. We all can chose to work in the way that suits us.</p>

      <div class="heading-wrapper">
        <h2 id="some-changes-include">Some changes include
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/ye-olde-twitter-archive/#some-changes-include">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><ul>
<li>Adding a skip link</li>
<li>Changing the top level navigation to include <a href="https://tweets.danabyerly.com/recent/">most recent</a> and <a href="https://tweets.danabyerly.com/popular/">“popular”</a></li>
<li>Reworking <code>&lt;h1&gt;</code>  to be page specific instead of the site title</li>
<li>Adding focus indication</li>
<li>Adding some open graph meta tags</li>
<li>Giving the search input border more contrast, wanted to remove, or give the <a href="https://pagefind.app/">Pagefind</a> placeholder more contrast, but couldn’t figure out how to do it</li>
<li>Swapping out the Twitter icon with a local one, the original was calling it from Twitter</li>
<li>Removing the account avatar link at the tweet level</li>
</ul>

      <div class="heading-wrapper">
        <h2 id="fun-with-search">Fun with search
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/ye-olde-twitter-archive/#fun-with-search">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>The search is a great addition. I had a lot of fun playing around with it, finding random missives and WTF worthy stuff.</p>
<p>A sampling, including links to relevant examples…</p>
<ul>
<li>Mentioned procrastinating <a href="https://tweets.danabyerly.com/990380335975288837/">25 times</a></li>
<li>Said “ugh” <a href="https://tweets.danabyerly.com/551456325516152833/">186 times</a> (see image below)</li>
<li>Mentioned The Sopranos <a href="https://tweets.danabyerly.com/1082797212629901312/">10 times</a> (that seems low)</li>
<li>Mentioned NYC, where I’ve lived for almost 30 years, 229 times (<a href="https://tweets.danabyerly.com/1397693948211208194/">garbage piles</a>, <a href="https://tweets.danabyerly.com/1106676925756522496/">snobbery</a>, <a href="https://tweets.danabyerly.com/479620161314381824/">nightmares</a>)</li>
<li>Mentioned L&amp;O, my shorthand for <a href="https://tweets.danabyerly.com/1443013766069821441/">Law and Order</a>, <a href="https://tweets.danabyerly.com/687667995624222720/">38 times</a> and used  #LawAndOrder <a href="https://tweets.danabyerly.com/687460294038286336/">10 times</a> and mentioned my favorite detective, Lennie Briscoe, <a href="https://tweets.danabyerly.com/904832428459646976/">12 times</a></li>
<li><a href="https://tweets.danabyerly.com/932484691/">General wreckiness</a></li>
<li><a href="https://tweets.danabyerly.com/27474311/">Out of context missives </a></li>
<li><a href="https://tweets.danabyerly.com/30521581/">Unspecified shout outs</a></li>
<li><a href="https://tweets.danabyerly.com/24130111/">And an early observation </a></li>
</ul>
<figure class="fig-container">
  <picture>
    <source srcset="https://danabyerly.com/img/tweetback-ugh.avif" type="image/avif" />
    <source srcset="https://danabyerly.com/img/tweetback-ugh.webp" type="image/web" />
    <img src="https://danabyerly.com/img/tweetback-ugh.jpg" alt="Search results for the term ugh showing several Tweets where all I said was ugh." loading="lazy" />
  </picture>
  <figcaption>
    Ugh.
  </figcaption>
</figure>

      <div class="heading-wrapper">
        <h2 id="subdomain">Subdomain
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/ye-olde-twitter-archive/#subdomain">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>I stuck with my original idea of tacking it on here with a subdomain, which was very easy. One bonus that I didn’t think of when I decided on the approach was that there was no propagation time because the top-level was already propagated.  And of course there’s always not paying for yet another domain.</p>
<p>I also noticed some love for subdomains recently. Gaston Rampersad mentioned <a href="https://mastodon.social/@gastonrampersad/111105474689709115">being on the bandwagon</a> when sharing a cool site he made <a href="https://scout.gaston.wtf/">for his dog</a>. Chris Coyier also recently had a <a href="https://chriscoyier.net/2023/09/21/use-subdomains/">pro-subdomain post</a>.</p>

      <div class="heading-wrapper">
        <h2 id="whats-next">What’s next
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/ye-olde-twitter-archive/#whats-next">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>And now that I have my subdomained <a href="https://tweets.danabyerly.com/">Tweet Archive</a>, I have to figure out how to link to it from here. I have a few ideas for reworking all the navigation. Until then I added it to my <a href="https://danabyerly-junkdrawer.website/links/">Links page at the Junk Drawer</a>.</p>

      ]]></content>
    </entry>
	
    
    <entry>
      <title>Year three in the books</title>
      <link href="https://danabyerly.com/notes/year-three-in-the-books/"/>
      <updated>2023-09-06T13:20:00Z</updated>
      <id>https://danabyerly.com/notes/year-three-in-the-books/</id>
      <content type="html"><![CDATA[
        <p>It’s been <a href="https://danabyerly.com/articles/finally-a-new-site/">three years</a> since I created this site. One of the main purposes of the site is “<a href="https://mastodon.social/@superterrific/110293702119159038">project fiddling and accountability</a>”. Like <a href="https://danabyerly.com/notes/year-two-in-the-books/">last year’s post</a>, the moment of truth is upon us…</p>
<p>How did I stack up to last year’s <a href="https://danabyerly.com/notes/year-two-in-the-books/#whats-next">What’s Next</a>?</p>
<ul>
<li>Tinkering? Check.</li>
<li>Revamp the <a href="https://danabyerly.com/projects/">Projects</a> section? Check.</li>
<li>Rework the <a href="https://danabyerly.com/">homepage</a>? Check.</li>
<li>Integrate the <a href="https://danabyerly-junkdrawer.website/">Junk Drawer</a>? Kind of?</li>
<li>Studio site? Change of plans.</li>
</ul>

      <div class="heading-wrapper">
        <h2 id="tinkering">Tinkering
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/year-three-in-the-books/#tinkering">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>If you like reading about tinkering, you may enjoy my <a href="https://danabyerly.com/changelog/">changelog</a>. Here are some tinkering highlights from the past year…</p>
<ul>
<li>Lots of footer fiddling! Including removing some links (Twitter, and the like) and adding some links (Mastodon and the like). Also added <code>&lt;nav aria-label=&quot;Secondary&quot;&gt;</code> to the footer links.</li>
<li>Moved the <a href="https://danabyerly.com/contact/">Contact</a> link from the footer to the primary navigation.</li>
<li>Removed meta tags for Twitter specific social cards.</li>
<li>Reworked front matter for the <a href="https://danabyerly.com/changelog/">Changelog</a> from using only the ISO date to “Changelog: yyyy-mm-dd” in the page title and open graph title. The permalink still uses /changelog/yyyy-mm-dd.</li>
<li>Added robots.txt in hopes of  <a href="https://ruby.social/@olivierlacan/110846882340835196">blocking ChatGPT</a>.</li>
<li>Removed a few organizational tags like “all” and “writing” from listing on the <a href="https://danabyerly.com/all-tags/">All Tags</a> page.</li>
<li>Lots of little streamlining, like removing “Published on” in front of post dates and on listing screens.</li>
<li>Added print styles to remove the navigation, footer, tag list, previous/next links, Kofi link and “back to top” link on posts (a late addition, forgot to include this before publishing!)</li>
</ul>

      <div class="heading-wrapper">
        <h2 id="revamping-the-project-section">Revamping the Project section
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/year-three-in-the-books/#revamping-the-project-section">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>This was the biggest effort of the year, and it happened in two parts.</p>
<p>Initially I removed the “Additional Projects” on the Projects landing page and “archived” a few older projects by excluding them from the Projects collection. The pages still exist and the URLs remain the same, but they no longer display on the landing page and are not included in the section’s pagination. This was accomplished by adding <code>eleventyExcludeFromCollections: true</code> to the front matter for the project.</p>
<p>The second part happened <a href="https://danabyerly.com/changelog/2023-08-29/">just under the wire</a>, and only because I remembered to look at <a href="https://danabyerly.com/notes/year-two-in-the-books/#whats-next">last year’s post</a>! After doing the first part I was procrastinating reworking the landing page because I thought it would be a lot of work to redo all the images and make a grid of cards.</p>
<p>I was recently looking at Stephanie Eckles excellent resource <a href="https://smolcss.dev/">SmolCSS</a> for something else and noticed the <a href="https://smolcss.dev/#smol-card-component">Smol Composable Card component</a>. It was great timing, and in combination with the <a href="https://smolcss.dev/#smol-css-grid">Smol Responsive Grid</a> as starting point I had a new <a href="https://danabyerly.com/projects/">Projects</a> landing page in a couple of days.</p>
<p>I never really liked the original page and kept putting off making this change. I’m happy with the outcome and glad to knock it off the list.</p>

      <div class="heading-wrapper">
        <h2 id="reworking-the-homepage">Reworking the homepage
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/year-three-in-the-books/#reworking-the-homepage">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>This was pretty minimal. I removed the “Featured Projects” section and replaced it with “From the Studio” section. I also updated the cards used for the studio projects.</p>

      <div class="heading-wrapper">
        <h2 id="integrate-the-junk-drawer">Integrate the Junk Drawer
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/year-three-in-the-books/#integrate-the-junk-drawer">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Does adding it to the <a href="https://danabyerly.com/projects/the-junk-drawer/">Projects section</a> count? I originally thought I’d come up with a clever way to include some Junk Drawer content here, but the ah-ha moment hasn’t hit me yet. Or maybe it won’t, which is fine.</p>

      <div class="heading-wrapper">
        <h2 id="studio-site">Studio site
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/year-three-in-the-books/#studio-site">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>At this time last year I was working on a client project for an attorney and thought that I would actively pursue more freelance work on completion of the project. File under “things don’t always work out the way you envisioned”.</p>
<p>The project was paused as the attorney was considering joining an established firm. This happened to coincide with an uptick in activity at the day job that left me too fried at the end of the day to do any work.</p>
<p>The attorney eventually joined an existing firm and my workload continued to be mentally taxing. Making a real go at freelancing wasn’t meant to be at the moment. We’ll see if that changes in the future.  I would love to work on small projects and create well built, well thought out accessible sites that perform well. The web needs much more of that, and honestly when people hire someone to make them a site, that’s what they should get.</p>

      <div class="heading-wrapper">
        <h2 id="writing">Writing
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/year-three-in-the-books/#writing">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>I did a fair amount of writing in the past year, but differently than in previous years. Usually I write one or two bigger posts that I categorize as <a href="https://danabyerly.com/articles/">Articles</a>. These are usually a deep dive “how-to” posts on something I’ve recently learned. For example last year I wrote a two part series on <a href="https://danabyerly.com/articles/wordpress-and-eleventy-part-one-wordpress/">using WordPress</a> as a headless content management system <a href="https://danabyerly.com/articles/wordpress-and-eleventy-part-two-eleventy/">for Eleventy</a>.</p>
<p>Over the past year I wrote no articles, but I wrote a series, which was a first. <a href="https://danabyerly.com/tag/hot-html-summer/">Hot HTML Summer</a> was a 22 post series where I wrote a post for each lesson of the fabulous <a href="https://web.dev/learn/html/">web.dev Learn HTML</a> course by Estelle Weyl.  I highly recommend taking the course, even if you’ve been writing HTML for a long time. You’re guaranteed to learn at least a thing of two that you didn’t already know, I sure did.</p>
<p>I also contributed my first article article elsewhere. For the <a href="https://www.htmhell.dev/adventcalendar/">2022 HTMHell Advent calendar</a> I contributed <a href="https://www.htmhell.dev/adventcalendar/2022/5/">Reading the Meter</a>. I didn’t submit an idea for this year’s calendar, but recommend it as a welcoming place to contribute! I also wrote a bit about the process and article <a href="https://danabyerly.com/notes/htmhell-reading-the-meter/">here at this site</a>.</p>

      <div class="heading-wrapper">
        <h2 id="whats-next">What’s next
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/year-three-in-the-books/#whats-next">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>As always, the tinkering will continue! I got a last minute <a href="https://danabyerly.com/changelog/2023-09-06/">round of tinkering in</a> that knocked the remaining things off of my Tinkering To Do list. I’m sure I’ll come up with additional things, all I have to do is check my RSS reader or timeline to find something interesting to try out. Or something that I could be doing better.</p>
<p>Speaking of which, when I was working on the <a href="https://danabyerly.com/projects/">Projects section landing page</a> I found myself wanting to rearchitect the current CSS. There have been plenty of CSS changes in the last three years, and my skill has improved along the way. I think this year’s big ticket item will be a CSS overhaul. I started a note titled “Uh oh” as I was working on the Projects page to track all the little observations and ideas, it will be nice to give it a good clean up.</p>
<p>Another thing I’d like to do is give the homepage a slight refresh. I don’t have any ideas at the moment, we’ll see if I come up with anything. As an aside, that’s what we call <a href="https://dictionary.cambridge.org/dictionary/english/hedging">hedging</a>.</p>
<p>Here’s to another year!</p>

      ]]></content>
    </entry>
	
    
    <entry>
      <title>Hot HTML Summer housekeeping</title>
      <link href="https://danabyerly.com/notes/hot-html-summer-housekeeping/"/>
      <updated>2023-08-08T13:15:00Z</updated>
      <id>https://danabyerly.com/notes/hot-html-summer-housekeeping/</id>
      <content type="html"><![CDATA[
        <p>It’s still summer, so I’m doing a bit of <a href="https://danabyerly.com/notes/hot-html-summer-wrap-up/#things-to-check-on-my-sites">Hot HTML Summer housekeeping</a> based on what I learned from taking the <a href="https://web.dev/learn/html/">web.dev Learn HTML course</a>. Earlier in the summer I  wrote a <a href="https://danabyerly.com/tag/hot-html-summer/">series of posts</a>, one for each lesson in the course. In the I included a <a href="https://danabyerly.com/notes/hot-html-summer-wrap-up/#things-to-check-on-my-sites">list of things</a> to check on and update as necessary. I’ve made some good progress!</p>
<p>As <a href="https://danabyerly.com/changelog/2023-08-08/">noted in the changelog</a>, around here I cleaned up my <code>&lt;section&gt;</code> usage, added a <code>&lt;nav&gt;</code> element to the footer links and added <code>rel=&quot;next&quot;</code> and <code>rel=&quot;previous&quot;</code> to some pagination links I missed the first time around.</p>
<p>Over at the<a href="https://danabyerly-junkdrawer.website/"> Junk Drawer </a> I’ve made two major changes. One to address the incorrect usage of <code>&lt;cite&gt;</code> within the WordPress quote block, and adding the <code>lang</code> attribute to text where I’ve used different languages.</p>

      <div class="heading-wrapper">
        <h2 id="wordpress-quote-block-and-%3Ccite%3E">WordPress quote block and <code>&lt;cite&gt;</code>
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/hot-html-summer-housekeeping/#wordpress-quote-block-and-%3Ccite%3E">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>While learning about <code>&lt;blockquote&gt;</code> and <code>&lt;cite&gt;</code> in the <a href="https://web.dev/learn/html/text-basics/">Text Basics module</a> of Learn HTML I discovered that the <a href="https://danabyerly.com/notes/hot-html-summer-text-basics/#quotes-and-citations">WordPress quote block incorrectly applies the <code>&lt;cite&gt;</code> element</a> if you use the “citation” feature.</p>
<p>As a refresher, <code>&lt;cite&gt;</code> belongs outside of the <code>&lt;blockquote&gt;</code> element. Since I’ve used this pretty extensively at the Junk Drawer I had to figure out to remove <code>&lt;cite&gt;</code> but still keep my design intact. It wasn’t that hard, but making the updates was a bit of a pain.</p>
<p>I was using the <code>&lt;cite&gt;</code> element to set the style, so moved the styles to a new class selector. Then the fun began. I had to add a new paragraph in the quote, edit it as HTML to add my class selector to the paragraph tag, then convert it to an HTML block. Sounds easy, right?</p>
<figure class="fig-container">
  <picture>
    <source srcset="https://danabyerly.com/img/wp-block-error.avif" type="image/avif" />
    <source srcset="https://danabyerly.com/img/wp-block-error.webp" type="image/web" />
    <img src="https://danabyerly.com/img/wp-block-error.jpg" alt="A WordPress block error that reads: This block contains unexpected or invalid content. There is a blue button that reads Attempt Block Recovery. To the right of the button are three small dots indicating a menu." loading="lazy" />
  </picture>
  <figcaption>
    Do not click the button, click the tiny "meatball" menu to the right of the button.
  </figcaption>
</figure>
<p>It would’ve been much easier if every time I  tried to preview the HTML or just click out of the HTML editing area I didn’t get the above error. If this happens to you, don’t click the “Attempt Block Recovery” button, it doesn’t recover the block and you’re back to step one. Click on the tiny, easy to miss, options menu to the right of the button  and select “convert to HTML”. Now it’s an HTML block.</p>
<p>Going forward it will be a lot easier as I made a reusable block that will place an HTML block within the content that includes a paragraph tag and my class selector. There’s more information about <a href="https://wordpress.org/documentation/article/reusable-blocks/">creating and using reusable blocks</a> in the WordPress documentation.</p>
<p>After all that, the kicker is that even if using <code>&lt;cite&gt;</code> within <code>&lt;blockquote&gt;</code> was the correct approach, I was still using it incorrectly! From the course…</p>
<blockquote>
<p>The content of the <code>&lt;cite&gt;</code> is the work, not the author.</p>
</blockquote>
<p>Good thing all those references to the authors are no longer cite elements or attributes!</p>

      <div class="heading-wrapper">
        <h2 id="adding-the-lang-attribute">Adding the <code>lang</code> attribute
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/hot-html-summer-housekeeping/#adding-the-lang-attribute">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>In the <a href="https://web.dev/learn/html/document-structure/">Document Structure module</a> of the course I made note of wanting to <a href="https://danabyerly.com/notes/hot-html-summer-document-structure/#content-language">add the language attribute at the Junk Drawer,</a>. I mention non-US TV shows by their original title with some frequency, many times this is in a different language.</p>
<p>I thought I was going to have to go the “convert to HTML” route again, but found a really useful plugin called <a href="https://wordpress.org/plugins/lang-attribute/">Lang Attribute for the Block Editor</a>. This makes it easy to select text and apply the ISO language code.</p>
<p>The only small issue I have is that is also applies class selector and <code>dir</code>, the direction attribute. The upside is that you can also change the text direction to match the language, but the selection is defaulted so it’s always applied.</p>
<figure class="fig-container">
  <picture>
    <source srcset="https://danabyerly.com/img/wp-lang-attr.avif" type="image/avif" />
    <source srcset="https://danabyerly.com/img/wp-lang-attr.webp" type="image/web" />
    <img src="https://danabyerly.com/img/wp-lang-attr.jpg" alt="A WordPress modal with an input for adding language attribute and a select for selecting text direction. The select is defaulted to left to right." loading="lazy" />
  </picture>
  <figcaption>
    Pick a direction, you can't have null.
  </figcaption>
</figure>
<p>I’ll probably add an issue and suggest that it would be a nice addition if the class selector and direction attribute were optional, but having the redundant attributes is a small price to pay for such a useful plugin!</p>
<p>You can see the results in action <a href="https://danabyerly-junkdrawer.website/blog/what-i-watched-in-2022/">in this post at the Junk Drawer,</a> which may also be of interest if you like crime drama series. The first show in the list is a Swedish show (<code>lang=&quot;sv&quot;</code>).</p>
<p>I don’t know if there’s a definitively inclusive list of codes, but here are a couple of lists that I found useful. The Wikipedia list includes more languages but the Gist includes regions.</p>
<ul>
<li><a href="https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes">Wikipedia</a>, use the two letter 639-1 codes</li>
<li><a href="https://gist.github.com/JamieMason/3748498">Gist</a>, not a full list but includes regions</li>
</ul>

      <div class="heading-wrapper">
        <h2 id="whats-next">What’s next
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/hot-html-summer-housekeeping/#whats-next">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>I still have one outstanding item on my Hot HTML Summer to list, and that’s to try <a href="https://github.com/martinring/markdown-it-table-captions">markdown-it-table-captions</a>. I’ll give that a shot on my starter project and if it works out well I’ll integrate it here.</p>
<p>I’m hoping to come up with a submissions for this year’s <a href="https://www.htmhell.dev/adventcalendar/">HTMHell Advent Calendar</a>. The deadline is a fast approaching August 24, you should definitely <a href="https://docs.google.com/forms/d/e/1FAIpQLSd1TaQ22c1dwXsLIvD9NhaWkbO26ay4rK4pm2HB5pSN92gOmQ/viewform">consider submitting an idea</a>!</p>
<p>I have two whopper older WordPress sites that I’m in the process of archiving. That includes moving a slimmed down version of each to Eleventy. I’ve already spent a fair amount of time working out the process and overall design, but I’ll probably be spending most of my time on that for the foreseeable future.</p>
<p>Other than that I’ll be doing my usual fiddling here and at the <a href="https://danabyerly-junkdrawer.website/">Junk Drawer.</a> I’d like to clean up the Projects section of this site before the end of the year. Just saying that out loud to up the chances of it happening.</p>

      ]]></content>
    </entry>
	
    
    <entry>
      <title>Hot HTML Summer: Wrap up</title>
      <link href="https://danabyerly.com/notes/hot-html-summer-wrap-up/"/>
      <updated>2023-08-01T13:15:00Z</updated>
      <id>https://danabyerly.com/notes/hot-html-summer-wrap-up/</id>
      <content type="html"><![CDATA[
        <p class="caption">This post is a <a href="https://danabyerly.com/tag/hot-html-summer/">part of a series</a> where I write a post for each module of the <a href="https://web.dev/learn/html/">web.dev Learn HTML course</a>. I'll note things I didn't know, highlight interesting items, and generally enjoy having a Hot HTML Summer.</p>
<p>All good things must come to an end as the saying goes. But much like <a href="https://www.scientificamerican.com/article/energy-can-neither-be-created-nor-destroyed/">energy</a> or <a href="https://education.nationalgeographic.org/resource/conservation-matter-during-physical-and-chemical-changes/">matter</a>, our Hot HTML Summer will not end, it will change from one form to another.</p>
<p>I’ve completed the <a href="https://web.dev/learn/html/">web.dev Learn HTML course</a>, and indeed it’s been a fun <a href="https://danabyerly.com/tag/hot-html-summer/">Hot HTML Summer</a>. The fun isn’t ending there, now I can take all the things I learned and apply them. In fact, I’ve now got a boat load of things of double check, update and improve from all the things I learned along the way.</p>

      <div class="heading-wrapper">
        <h2 id="the-hot-html-summer-to-do-list">The Hot HTML Summer to do list
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/hot-html-summer-wrap-up/#the-hot-html-summer-to-do-list">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>I came up a big list of things to check, things to learn more about and things to try to find in the wild.</p>

      <div class="heading-wrapper">
        <h3 id="things-to-check-on-my-sites">Things to check on my sites
      </h3>
        <a class="anchor-link" href="https://danabyerly.com/notes/hot-html-summer-wrap-up/#things-to-check-on-my-sites">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>In no particular order…</p>
<ul>
<li>Make sure I’m <a href="https://danabyerly.com/notes/hot-html-summer-headings-and-sections/#%3Csection%3E">using <code>&lt;section&gt;</code> correctly,</a> I can think of a few places where I know I’m not.</li>
<li>See if I can use microdata to <a href="https://danabyerly.com/notes/hot-html-summer-attributes/#global-attributes">improve reader view</a>.</li>
<li>Check for instances of using different languages within the body of text and <a href="https://danabyerly.com/notes/hot-html-summer-document-structure/#content-language">apply the language attribute</a>.</li>
<li>Add <code>&lt;nav&gt;</code> to the <a href="https://danabyerly.com/notes/hot-html-summer-navigation/#table-of-contents">footer links on this site</a>.</li>
<li>Check for calling <a href="https://danabyerly.com/notes/hot-html-summer-images/#intro-section">SVGs with image element</a>, if so add <code>role=&quot;img&quot;</code> (pretty sure I haven’t done this anywhere but will check anyway).</li>
<li>Test <a href="https://github.com/martinring/markdown-it-table-captions">markdown-it-table-captions</a> to see if it’s a good way to add captions to tables in my <a href="https://www.11ty.dev/">Eleventy</a> sites.</li>
<li>Add <code>rel=&quot;next&quot;</code> and <code>rel=&quot;prev&quot;</code> <a href="https://danabyerly.com/notes/hot-html-summer-links/#browsing-context">attributes to pagination links</a> (already added on this site).</li>
<li>Fix all the incorrect instances of <code>&lt;cite&gt;</code> that the <a href="https://danabyerly.com/notes/hot-html-summer-text-basics/#quotes-and-citations">WordPress quote block incorrectly applies</a> to <code>&lt;blockquote&gt;</code> at the Junk Drawer.</li>
<li>Find a reason <a href="https://danabyerly.com/notes/hot-html-summer-other-inline-text-elements/#code-examples-and-technical-writing">to use <code>&lt;data&gt;</code></a>.</li>
</ul>

      <div class="heading-wrapper">
        <h3 id="things-to-learn-more-about">Things to learn more about
      </h3>
        <a class="anchor-link" href="https://danabyerly.com/notes/hot-html-summer-wrap-up/#things-to-learn-more-about">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><ul>
<li><a href="https://web.dev/learn/html/apis/#available-element-interfaces">Element interfaces</a></li>
<li><a href="https://developer..org/en-US/docs/Web/Accessibility/ARIA/Roles">Aria roles</a></li>
</ul>

      <div class="heading-wrapper">
        <h3 id="things-to-find-in-the-wild">Things to find in the wild
      </h3>
        <a class="anchor-link" href="https://danabyerly.com/notes/hot-html-summer-wrap-up/#things-to-find-in-the-wild">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Scavenger hunt!</p>
<ul>
<li><code>rel=&quot;author&quot;</code></li>
<li><code>rel=&quot;bookmark&quot;</code></li>
<li>Form controls with <a href="https://danabyerly.com/notes/hot-html-summer-attributes/#%3Clabel%3E">more than one label</a> (even Mr. HTMHell <a href="https://front-end.social/@matuzo/110663093589746034">didn’t know this one</a>!)</li>
</ul>

      <div class="heading-wrapper">
        <h2 id="things-i-enjoyed">Things I enjoyed
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/hot-html-summer-wrap-up/#things-i-enjoyed">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>There’s a lot to like about this course. It’s broken down into easy to digest pieces. There are a lot of good tips and best practices. Modules reinforce things learned in previous modules without explicitly saying it, and there’s plenty of backstory and tea spilling.</p>
<p>The web would be a much better place if fullstack, framework-focused developers used <a href="https://web.dev/learn/html/">Learn HTML</a> to better understand the basics, but we all can learn something from the course. Course creator <a href="https://changelog.com/jsparty/251#transcript-13">Estelle Weyl noted</a> that the course was targeted towards beginners, but created for all skill levels, including “super-advanced people who don’t realize that they don’t know things”. Indeed.</p>
<p>In his recent CSS Day talk, <a href="https://www.youtube.com/watch?v=L668dK6wFcM&amp;t=423s">That’s not how I wrote CSS 3 years ago</a>, Manuel Matuzović mentioned that when he wrote <a href="https://www.matuzo.at/blog/2022/100-days-of-more-or-less-modern-css/">100 Days or More Less Modern CSS</a> one of the biggest things he learned was the basics. He goes on to list a few examples where the thought he understood how something worked, but was wrong. I had the exact same experience here. There were things I thought I knew but didn’t, things I didn’t know at all, and things where I didn’t know the proper name.</p>
<p>Most of all, it was fun to learn from a place of comfort, building on something I already know. With only a few gaps, I’ve been writing HTML since 1996. I’m not employed as a developer, but I write production ready HTML and CSS at my job (delivering my designs in code to be integrated into whatever stack). Before this course I was confident in my HTML skills, and I learned a LOT.</p>

      <div class="heading-wrapper">
        <h2 id="hot-html-summers-elsewhere">Hot HTML Summers elsewhere
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/hot-html-summer-wrap-up/#hot-html-summers-elsewhere">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>I’ve noticed plenty of HTML content so far this summer. Here’s what I’ve seen so far.</p>
<ul>
<li><a href="https://frontenddogma.com/posts/2023/4-more-html-concepts-you-didnt-know/">4 More HTML Concepts You Didn’t Know</a></li>
<li><a href="https://www.tpgi.com/fieldsets-legends-and-screen-readers-again/">Fieldsets, Legends and Screen Readers again</a></li>
<li><a href="https://www.matuzo.at/blog/2023/form-and-search-landmark/">Form and search landmarks</a></li>
<li><a href="https://www.youtube.com/watch?v=DCoK_6unfOI">Learn HTML by Building a Cat Photo App</a> (YouTube)</li>
<li><a href="https://portswigger.net/blog/tic-tac-toe-in-html">Implementing Tic Tac Toe with 170mb of HTML - no JS or CSS</a></li>
<li><a href="https://www.matuzo.at/blog/2023/focus-dialog/">O dialog focus, where art thou?</a></li>
<li><a href="https://www.matuzo.at/blog/2023/article-screen-readers/">The article element and screen readers</a></li>
<li><a href="https://jakearchibald.com/2023/against-self-closing-tags-in-html/">The case against self-closing tags in HTML</a></li>
<li><a href="https://www.matuzo.at/blog/2023/details-find-in-page/">The details element and in-page search</a></li>
<li>You can also help design the <a href="https://lea.verou.me/blog/2023/design-state-of-html/">inaugural State of HTML survey</a></li>
</ul>

      <div class="heading-wrapper">
        <h2 id="%3Csummary%3E"><code>&lt;summary&gt;</code>
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/hot-html-summer-wrap-up/#%3Csummary%3E">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Thanks for all the boosting, favoriting, sharing, general words of encouragement, and camaraderie along the way. I decided to do this as a series of posts to help me absorb the lessons and refer back to my notes in the future. It’s nice to know there were parts or posts that resonated with people!</p>
<p>If I had to sum up the course, it would be a slightly updated version of something I <a href="https://danabyerly.com/notes/hot-html-summer-navigation/#page-breadcrumbs">mentioned in the Navigation module post</a>, “come for all the things you don’t know about HTML, stay for the tips on how use it more effectively”. In case it’s not yet clear, I highly recommend the course.</p>
<p>I’ll make an occasional post with updates on my punch list. Until then, enjoy the rest of your Hot HTML Summer.</p>

      ]]></content>
    </entry>
	
    
    <entry>
      <title>Hot HTML Summer: Dialog</title>
      <link href="https://danabyerly.com/notes/hot-html-summer-dialog/"/>
      <updated>2023-07-31T13:00:00Z</updated>
      <id>https://danabyerly.com/notes/hot-html-summer-dialog/</id>
      <content type="html"><![CDATA[
        <p class="caption">This post is a <a href="https://danabyerly.com/tag/hot-html-summer/">part of a series</a> where I write a post for each module of the <a href="https://web.dev/learn/html/">web.dev Learn HTML course</a>. I'll note things I didn't know, highlight interesting items, and generally enjoy having a Hot HTML Summer.</p>
<p>This post covers the <a href="https://web.dev/learn/html/dialog/">Dialog module of Learn HTML</a>. Each section below corresponds to a section in this module of the course. The quoted items are relevant passages from the course.</p>

      <div class="heading-wrapper">
        <h2 id="intro-section">Intro section
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/hot-html-summer-dialog/#intro-section">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>There’s no anchor for this section, it’s the first part of the module.</p>
<blockquote>
<p>Dialogs can be either modal (only the content in the dialog can be interacted with) or non-modal (it’s still possible to interact with content outside of the dialog).</p>
</blockquote>
<p>Learning new things right out of the gate.</p>

      <div class="heading-wrapper">
        <h2 id="modal-dialogs">Modal dialogs
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/hot-html-summer-dialog/#modal-dialogs">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Go to this <a href="https://web.dev/learn/html/dialog/#modal_dialogs">section at Learn HTML</a>.</p>
<blockquote>
<p>Once opened, there are three ways to close the dialog: the escape key, submitting a form with a button that has the <a href="https://developer.mozilla.org/docs/Web/HTML/Element/button#attr-formmethod"><code>formmethod=&quot;dialog&quot;</code></a> set (or if the form itself has <code>method=&quot;dialog&quot;</code> set), and the <a href="https://developer.mozilla.org/docs/Web/API/HTMLDialogElement/close"><code>HTMLDialogElement.close()</code></a> method.</p>
</blockquote>
<p>This is in reference to <a href="https://codepen.io/web-dot-dev/pen/BaOBLNy">an example CodePen</a>. Good to know the different ways to handle closing the modal.</p>
<blockquote>
<p>When the dialog is opened, focus moves into the dialog. Focus is set on the first element in the sequential keyboard navigation order within that dialog.</p>
</blockquote>
<p>I <a href="https://danabyerly.com/notes/hot-html-summer-focus/#the-autofocus-attribute">learned about this</a> a few lessions ago in the focus module. Manuel Matuzović also has a <a href="https://www.matuzo.at/blog/2023/focus-dialog/">recent post</a> testing various content combinations across browsers that provides more detail.</p>

      <div class="heading-wrapper">
        <h2 id="non-modal-dialogs">Non-modal dialogs
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/hot-html-summer-dialog/#non-modal-dialogs">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Go to this <a href="https://web.dev/learn/html/dialog/#non_modal_dialogs">section at Learn HTML</a>.</p>
<blockquote>
<p>The <code>HTMLDialogElement.show()</code> similarly opens a dialog, but without adding a backdrop or causing anything to become inert. The escape key does not close non-modal dialogs. Because of this, it is even more important to ensure you include a method of closing the non-modal dialog. In doing so, if the closer is outside the dialog, realize the focus will go to the element that opened the dialog, which may not be the best user experience.</p>
</blockquote>
<p>Woof, yeah. The heading in the non-modal dialog <a href="https://codepen.io/estelle/pen/bGKQvza">in this example</a> is appropriately titled Bad User Experience.</p>

      <div class="heading-wrapper">
        <h2 id="closing-a-dialog">Closing a dialog
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/hot-html-summer-dialog/#closing-a-dialog">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Go to this <a href="https://web.dev/learn/html/dialog/#closing_a_dialog">section at Learn HTML</a>.</p>
<blockquote>
<p>You don’t need the <code>HTMLDialogElement.close()</code> method to close a dialog. You don’t need JavaScript at all. To close the <code>&lt;dialog&gt;</code> without JavaScript, include a form with a dialog method by either setting <code>method=&quot;dialog&quot;</code> on the <code>&lt;form&gt;</code> or <code>formmethod=&quot;dialog&quot;</code> on the button.</p>
</blockquote>
<p>When I first saw that <code>&lt;dialog&gt;</code> was available I <a href="https://codepen.io/superterrific/pen/JjMJqPR">ran to CodePen to try it out</a>. I can’t remember where I read it so I don’t know where the code example came from, but it used Javascript to both open and close the dialog via onclick on the button element (<code>window.dialog.showModal()</code> and <code>window.dialog.close()</code>). Upon reading the above passage I ran back to <a href="https://codepen.io/superterrific/pen/qBQyLxd?editors=1100">CodePen and created a new example</a> setting <code>formmethod=&quot;dialog&quot;</code> on the buttons (one “X” close in the upper right and one text labeled close below the text).</p>
<p>Out of habit I added <code>:focus-visible</code> to the <code>button</code> elements instead of <code>:focus</code>, this may not visually indicate focus on the first interactive element in your dialog even though it will still receive focus. The same goes for explicitly setting autofocus, the focus will be set but may not visually indicated.</p>
<p>As <a href="https://hidde.blog/focus-visible-more-than-keyboard/">Hidde de Vries explains</a>, when using <code>:focus-visible</code> the browser decides if it’s best to indicate focus based on a number of different heuristics. As an example, in Chrome if the dialog was opened via keyboard the focus was indicated. If the dialog was opened via mouse the focus was not indicated. This was a simplistic test, but best to use good old <code>:focus</code> for this one to ensure proper indication.</p>
<p>Also of note, you currently still need JavaScript to open the dialog via the showModal() method. Although there has been <a href="https://github.com/whatwg/html/issues/3567">active discussion</a> about the adding the ability to open without JavaScript at the repository for the HTML spec that started in 2018.</p>

      ]]></content>
    </entry>
	
    
    <entry>
      <title>Hot HTML Summer: Details and summary</title>
      <link href="https://danabyerly.com/notes/hot-html-summer-details-and-summary/"/>
      <updated>2023-07-28T13:00:00Z</updated>
      <id>https://danabyerly.com/notes/hot-html-summer-details-and-summary/</id>
      <content type="html"><![CDATA[
        <p class="caption">This post is a <a href="https://danabyerly.com/tag/hot-html-summer/">part of a series</a> where I write a post for each module of the <a href="https://web.dev/learn/html/">web.dev Learn HTML course</a>. I'll note things I didn't know, highlight interesting items, and generally enjoy having a Hot HTML Summer.</p>
<p>This post covers the <a href="https://web.dev/learn/html/details/">Details and summary module of Learn HTML</a>. Each section below corresponds to a section in this module of the course. The quoted items are relevant passages from the course.</p>

      <div class="heading-wrapper">
        <h2 id="intro-section">Intro section
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/hot-html-summer-details-and-summary/#intro-section">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>There’s no anchor for this section, it’s the first part of the module.</p>
<blockquote>
<p><a href="https://jqueryui.com/accordion/">jQuery</a> has included an accordion UI pattern since at least 2009. The original JavaScript-free accordion solution included making each FAQ question a <code>&lt;label&gt;</code> followed by the checkmark it labeled, and then displaying <code>&lt;div&gt;</code> answer when the checkmark was checked.</p>
</blockquote>
<p>I didn’t know this bit of history.</p>
<blockquote>
<p>Like all semantic content, you can progressively enhance the default features and appearance.</p>
</blockquote>
<p>Heart emoji.</p>

      <div class="heading-wrapper">
        <h2 id="toggling-visibility-the-open-attribute">Toggling visibility: the <code>open</code> attribute
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/hot-html-summer-details-and-summary/#toggling-visibility-the-open-attribute">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Go to this <a href="https://web.dev/learn/html/details/#toggling_visibility_the_open_attribute">section at Learn HTML</a>.</p>
<blockquote>
<p>The hidden content in the collapsed state is searchable in some browsers but not others, even though the collapsed content is not part of the DOM. If you search in Edge or Chrome, the details containing a search term will expand to display the occurrence. This behavior is not replicated in Firefox or Safari.</p>
</blockquote>
<p>I knew this one because Manuel Matuzović <a href="https://www.matuzo.at/blog/2023/details-find-in-page/">posted about this earlier</a> in the Hot HTML Summer. He also has a post on <a href="https://www.matuzo.at/blog/2023/details-summary/">inconsistencies for screen reader users</a> that’s worth a look if you are planning on using <code>&lt;details&gt;</code>.</p>

      <div class="heading-wrapper">
        <h2 id="how-errors-are-handled">How errors are handled
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/hot-html-summer-details-and-summary/#how-errors-are-handled">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Go to this <a href="https://web.dev/learn/html/details/#how_errors_are_handled">section at Learn HTML</a>.</p>
<blockquote>
<p>If you don’t include a <code>&lt;summary&gt;</code>, the browser will create one for you: with a marker and the word “details”. This summary is part of a <a href="https://web.dev/learn/html/template/#shadow-dom">shadow root</a>, and therefore will not have author CSS summary styles applied. Unfortunately, Safari does not include the details in the <a href="https://bugs.webkit.org/show_bug.cgi?id=249904">keyboard focus order</a>.</p>
</blockquote>
<p>Didn’t know this, good to keep in mind. And…</p>
<blockquote>
<p>If you do include a <code>&lt;summary&gt;</code>, but it is not the first element in the <code>&lt;details&gt;</code>, the browser still displays the summary as it should. It will also not fail if you include a link, label, or other interactive element within the summary, but browsers handle interactive content within interactive content differently. For example, if you include a link in a summary, some browsers will add both the summary and the link to the default tabbing order, but other browsers will not focus on the link by default. If you click on a <code>&lt;label&gt;</code> nested in a <code>&lt;summary&gt;</code>, some browsers will give focus to the associated form control; other browsers will give focus to the form control and toggle the <code>&lt;details&gt;</code> open or closed.</p>
</blockquote>
<p>I couldn’t find any examples of screen reader test results for interactive elements within the summary, but if you planned on taking this approach it would be best to test it.</p>

      ]]></content>
    </entry>
	
    
    <entry>
      <title>Hot HTML Summer: Other inline text elements</title>
      <link href="https://danabyerly.com/notes/hot-html-summer-other-inline-text-elements/"/>
      <updated>2023-07-27T13:00:00Z</updated>
      <id>https://danabyerly.com/notes/hot-html-summer-other-inline-text-elements/</id>
      <content type="html"><![CDATA[
        <p class="caption">This post is a <a href="https://danabyerly.com/tag/hot-html-summer/">part of a series</a> where I write a post for each module of the <a href="https://web.dev/learn/html/">web.dev Learn HTML course</a>. I'll note things I didn't know, highlight interesting items, and generally enjoy having a Hot HTML Summer.</p>
<p>This post covers the <a href="https://web.dev/learn/html/inline-text/">Other inline text elements module of Learn HTML</a>. Each section below corresponds to a section in this module of the course. The quoted items are relevant passages from the course.</p>

      <div class="heading-wrapper">
        <h2 id="intro-section">Intro section
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/hot-html-summer-other-inline-text-elements/#intro-section">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>There’s no anchor for this section, it’s the first part of the module.</p>
<blockquote>
<p>Contrary to popular belief, HTML was originally intended for sharing documents, and not cat videos.</p>
</blockquote>
<p>I’m going to pretend I didn’t read that.</p>

      <div class="heading-wrapper">
        <h2 id="code-examples-and-technical-writing">Code examples and technical writing
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/hot-html-summer-other-inline-text-elements/#code-examples-and-technical-writing">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Go to this <a href="https://web.dev/learn/html/inline-text/#code_examples_and_technical_writing">section at Learn HTML</a>.</p>
<blockquote>
<p>The <a href="https://developer.mozilla.org/docs/Web/HTML/Element/data"><code>&lt;data&gt;</code></a> element links a given piece of content with a machine-readable translation; the element’s <code>value</code> attribute provides the machine-readable translation of the content of the element.</p>
</blockquote>
<p>Huh, I don’t think knew that. And now I can’t wait to think of a reason to use it.</p>
<blockquote>
<p>If the <code>&lt;data&gt;</code> content is time- or date-related, the <a href="https://developer.mozilla.org/docs/Web/HTML/Element/time"><code>&lt;time&gt;</code></a> element, which represents a specific period in time must be used instead.</p>
</blockquote>
<p>This one I know! And love, and use, I even wrote it <a href="https://danabyerly.com/articles/time-is-on-your-side/">a love letter</a>.</p>

      <div class="heading-wrapper">
        <h2 id="definitions-and-language-support">Definitions and language support
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/hot-html-summer-other-inline-text-elements/#definitions-and-language-support">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Go to this <a href="https://web.dev/learn/html/inline-text/#definitions_and_language_support">section at Learn HTML</a>.</p>
<blockquote>
<p>When including abbreviations or acronyms, always provide the full expanded version of the term in plain text on first use, as you introduce the shortened representation of the term between opening and closing <a href="https://developer.mozilla.org/docs/Web/HTML/Element/abbr"><code>&lt;abbr&gt;</code></a> tags; unless the term is well-known to the reader, such as “HTML” and “CSS” in this series. Only on this first occurrence, when the abbreviation or acronym is being defined, is <code>&lt;abbr&gt;</code> needed. The <code>title</code> attribute is not necessary nor helpful.</p>
</blockquote>
<p>Good guidance on a best practice.</p>
<blockquote>
<p>When defining a term that is not an abbreviation or acronym, use the definition <a href="https://developer.mozilla.org/docs/Web/HTML/Element/dfn"><code>&lt;dfn&gt;</code></a> element to identify the term being defined within its surrounding content.</p>
</blockquote>
<p>I thought I knew this one but was wrong. It’s basically tagging the term being defined within the definition. Here’s an example of a word I learned recently, definition courtesy of <a href="https://www.litcharts.com/literary-devices-and-terms/synecdoche">Lit Charts</a>.</p>
<pre class="language-html"><code class="language-html"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>p</span><span class="token punctuation">></span></span><br /><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>dfn</span><span class="token punctuation">></span></span>Synecdoche<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>dfn</span><span class="token punctuation">></span></span> is a figure of speech in which, most often, a part of something is used to refer to its whole. For example, "The captain commands one hundred sails" is a synecdoche that uses "sails" to refer to ships—ships being the thing of which a sail is a part.<br /><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>p</span><span class="token punctuation">></span></span></code></pre>
<blockquote>
<p>Some character sets include small annotations placed above or to the right of characters to provide information on pronunciation. The <a href="https://developer.mozilla.org/docs/Web/HTML/Element/ruby"><code>&lt;ruby&gt;</code></a> element is the container to use to contain these annotations that make written languages like Korean, Chinese and Japanese easier to read. Ruby can also be used for Hebrew, Arabic, and Vietnamese.</p>
</blockquote>
<p>Ha, I thought this was related to Ruby on Rails, wrong again. Hopping over to <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ruby">MDN reveals the origin of the term</a>…</p>
<blockquote>
<p>The term <em>ruby</em> originated as <a href="https://en.wikipedia.org/wiki/Agate_(typography)">a unit of measurement used by typesetters</a>, representing the smallest size that text can be printed on newsprint while remaining legible.</p>
</blockquote>

      <div class="heading-wrapper">
        <h2 id="emphasizing-text">Emphasizing text
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/hot-html-summer-other-inline-text-elements/#emphasizing-text">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Go to <a href="https://web.dev/learn/html/inline-text/#emphasizing_text">section at Learn HTML</a>.</p>
<blockquote>
<p>Use the <a href="https://developer.mozilla.org/docs/Web/HTML/Element/em"><code>&lt;em&gt;</code></a> element to emphasize or stress a span of content. The <code>&lt;em&gt;</code> element can be nested, with each level of nesting indicating a greater degree of emphasis. This element has semantic meaning and can be used to inform auditory user agents like screen readers, Alexa, and Siri, to provide emphasis.</p>
</blockquote>
<p>I did not know about the levels of nesting.</p>
<blockquote>
<p>Use the <a href="https://developer.mozilla.org/docs/Web/HTML/Element/mark"><code>&lt;mark&gt;</code></a> element to identify or highlight text that is somehow relevant, like highlighting (or “marking”) the occurrence of search terms in search results. This enables marked content to be quickly identified without adding emphasis or importance.</p>
</blockquote>
<p>I like to use this one, and you can easily change the blaring yellow user agent styles with good old CSS.</p>
<blockquote>
<p>There are three elements that were temporarily deprecated, but have been added back into HTML. They should be used sparingly, if at all, as they provide little to no semantic value and CSS should always be used for styling over HTML elements.</p>
</blockquote>
<p>Use with caution! The elements are <code>&lt;i&gt;</code>, <code>&lt;u&gt;</code>, and <code>&lt;b&gt;</code>. And specifically about <code>&lt;b&gt;</code>…</p>
<blockquote>
<p>The <a href="https://developer.mozilla.org/docs/Web/HTML/Element/b"><code>&lt;b&gt;</code></a> element can be used to draw attention to text that is not otherwise important. This element doesn’t convey any special semantic information and should only be used when none of the other elements in this section fit the purpose. No example is provided as I couldn’t come up with a valid use case; that’s how “last resort” this element is.</p>
</blockquote>
<p>I imagine that ending with a finger snap.</p>

      ]]></content>
    </entry>
	
    
    <entry>
      <title>Hot HTML Summer: Focus</title>
      <link href="https://danabyerly.com/notes/hot-html-summer-focus/"/>
      <updated>2023-07-26T13:00:00Z</updated>
      <id>https://danabyerly.com/notes/hot-html-summer-focus/</id>
      <content type="html"><![CDATA[
        <p class="caption">This post is a <a href="https://danabyerly.com/tag/hot-html-summer/">part of a series</a> where I write a post for each module of the <a href="https://web.dev/learn/html/">web.dev Learn HTML course</a>. I'll note things I didn't know, highlight interesting items, and generally enjoy having a Hot HTML Summer.</p>
<p>This post covers the <a href="https://web.dev/learn/html/focus/">Focus module of Learn HTML</a>. Each section below corresponds to a section in this module of the course. The quoted items are relevant passages from the course.</p>

      <div class="heading-wrapper">
        <h2 id="the-tabindex-attribute">The <code>tabindex</code> attribute
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/hot-html-summer-focus/#the-tabindex-attribute">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Go to this <a href="https://web.dev/learn/html/focus/#the_tabindex_attribute">section at Learn HTML</a>.</p>
<blockquote>
<p>The <code>tabindex</code> attribute takes as its value an integer. A negative value makes an element focusable but not tabbable. A <code>tabindex</code> value of <code>0</code> makes the element focusable and tabbable, adding the element on which it is applied to the sequential focus navigation order in source code order. A value of 1 or greater makes the element focusable and tabbable, but adds it to a prioritized tabbing sequence, and, as we saw above, should be avoided.</p>
</blockquote>
<p>I know all of this! But unfortunately I encounter it being used incorrectly with regularity. At the time of writing this post I was brought into a project to help with UX, which means I immediately starting using only my keyboard to see how it behaved.</p>
<p>For reasons I can’t even guess, the inert table headers were set to <code>tabindex=&quot;0&quot;</code>, putting them in tab order for no good reason. This added about seven or so useless tabs before getting to an interactive element. Eric Bailey also noted all the ways this usage can <a href="https://www.a11yproject.com/posts/how-to-use-the-tabindex-attribute/#making-non-interactive-elements-focusable">negatively impact screen reader users</a> at The a11y Project.</p>

      <div class="heading-wrapper">
        <h2 id="the-autofocus-attribute">The <code>autofocus</code> attribute
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/hot-html-summer-focus/#the-autofocus-attribute">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Go to this <a href="https://web.dev/learn/html/focus/#the_autofocus_attribute">section at Learn HTML</a>.</p>
<blockquote>
<p>The <code>autofocus</code> attribute doesn’t alter the document’s sequential focus navigation order. The elements in the sequence coming before the autofocused element are simply skipped. For these reasons, it is not advised to include the <code>autofocus</code> attribute.</p>
</blockquote>
<p>I’ll admit that I have used <code>autofocus</code> on sign in screens for internal projects where the username field is the first interactive element. I don’t feel good about it though. Especially considering these five examples of how it <a href="https://adamsilver.io/blog/the-problem-with-automatically-focusing-the-first-input-and-what-to-do-instead/">degrades user experience</a> by Adam Silver.</p>
<blockquote>
<p>When a dialog is opened, the browser will automatically focus on the first focusable interactive element within the <code>&lt;dialog&gt;</code>, meaning <code>autofocus</code> to an element is not necessary.</p>
</blockquote>
<p>I didn’t know this! The <code>&lt;dialog&gt;</code> module is three modules away. Spoiler alert?</p>

      <div class="heading-wrapper">
        <h2 id="disabled">Disabled
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/hot-html-summer-focus/#disabled">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Go to this <a href="https://web.dev/learn/html/focus/#disabled">section at Learn HTML</a>.</p>
<blockquote>
<p>The boolean <a href="https://developer.mozilla.org/docs/Web/HTML/Attributes/disabled">disabled</a> attribute makes the form controls on which it is applied and their descendants, if any, unfocusable. Disabled form controls can’t be focused, don’t get click events, and are not submitted upon form submission.</p>
</blockquote>
<p>Sorry, more UX chat. Instead of spelling out all the issues with disabling form buttons prior to submission, I’ll send you to my two go-articles when I need source material to make an impassioned plea to a team.</p>
<p>Adam Silver has a pithy summary of six <a href="https://adamsilver.io/blog/the-problem-with-disabled-buttons-and-what-to-do-instead/">potential problems and what to do instead</a>. Vitaly Friedman has a <a href="https://www.smashingmagazine.com/2021/08/frustrating-design-patterns-disabled-buttons/">deeper dive on eight specific design patterns </a> where using a disabled button can have disastrous results at Smashing Magazine. I highly recommend both posts. And if you HAVE to used disabled buttons, the post at Smashing Magazine has a section of suggestions from Sandrina Pereira of how to <a href="https://www.smashingmagazine.com/2021/08/frustrating-design-patterns-disabled-buttons/#making-disabled-buttons-more-inclusive">make disabled buttons more inclusive</a>.</p>

      ]]></content>
    </entry>
	
    
    <entry>
      <title>Hot HTML Summer: HTML APIs</title>
      <link href="https://danabyerly.com/notes/hot-html-summer-html-apis/"/>
      <updated>2023-07-25T13:00:00Z</updated>
      <id>https://danabyerly.com/notes/hot-html-summer-html-apis/</id>
      <content type="html"><![CDATA[
        <p class="caption">This post is a <a href="https://danabyerly.com/tag/hot-html-summer/">part of a series</a> where I write a post for each module of the <a href="https://web.dev/learn/html/">web.dev Learn HTML course</a>. I'll note things I didn't know, highlight interesting items, and generally enjoy having a Hot HTML Summer.</p>
<p>This post covers the <a href="https://web.dev/learn/html/apis/">HTML APIs module of Learn HTML</a>. Each section below corresponds to a section in this module of the course. The quoted items are relevant passages from the course.</p>

      <div class="heading-wrapper">
        <h2 id="html-element-apis">HTML Element APIs
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/hot-html-summer-html-apis/#html-element-apis">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Go to this <a href="https://web.dev/learn/html/apis/#html_element_apis">section at Learn HTML</a>.</p>
<blockquote>
<p>The browser provides numerous APIs providing natively supported methods, events, and property querying and updating. Element nodes contain information about all the attributes set on the element. You can use HTML interfaces to access information about an element’s attributes. For example, we can use <a href="https://developer.mozilla.org/docs/Web/API/HTMLImageElement/alt"><code>HTMLImageElement.alt</code></a> get the <code>alt</code> attributes of all the images.</p>
</blockquote>
<p>If I ever get around to properly learning JavaScript all of this going to be really helpful.</p>

      <div class="heading-wrapper">
        <h2 id="available-element-interfaces">Available element interfaces
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/hot-html-summer-html-apis/#available-element-interfaces">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Go to this <a href="https://web.dev/learn/html/apis/#available_element_interfaces">section at Learn HTML</a>.</p>
<blockquote>
<p>The base interface for all elements is aptly named <a href="https://developer.mozilla.org/docs/Web/API/Element">Element</a>. The <a href="https://developer.mozilla.org/docs/Web/API/HTMLElement"><code>HTMLElement</code></a> inherits from Element and all HTML element-specific interfaces inherit from it. Some element-specific interfaces are implemented by multiple, similar elements.</p>
</blockquote>
<p>There’s a list of all the interfaces with links to their respective pages at MDN. I’m adding “Familiarize myself with all the available element interfaces” to my Hot HTML Summer to-do list.</p>

      <div class="heading-wrapper">
        <h2 id="the-window-interface">The <code>Window</code> interface
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/hot-html-summer-html-apis/#the-window-interface">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Go to this <a href="https://web.dev/learn/html/apis/#the_window_interface">section at Learn HTML</a>.</p>
<blockquote>
<p>Every browser tab contains its own Window object. The Window interface can query the contents of the tab as well as the overall window and device.</p>
</blockquote>
<p>What I lack in JavaScript skills I make up for in search engine skills. I’ve been working on archiving an old project and wanted a way to provide a link to the Internet Archive version of a page when there’s a 404.</p>
<p>I landed on using <code>window.location.href</code> to append the page url to the known Internet Archive link that has the entire site to create a “view this page at the Internet Archive” link. Once I validated that it worked  I was pretty pleased with myself, and almost felt like I knew JavaScript.</p>

      ]]></content>
    </entry>
	
    
    <entry>
      <title>Hot HTML Summer: Template, slot, and shadow</title>
      <link href="https://danabyerly.com/notes/hot-html-summer-template-slot-and-shadow/"/>
      <updated>2023-07-24T13:00:00Z</updated>
      <id>https://danabyerly.com/notes/hot-html-summer-template-slot-and-shadow/</id>
      <content type="html"><![CDATA[
        <p class="caption">This post is a <a href="https://danabyerly.com/tag/hot-html-summer/">part of a series</a> where I write a post for each module of the <a href="https://web.dev/learn/html/">web.dev Learn HTML course</a>. I'll note things I didn't know, highlight interesting items, and generally enjoy having a Hot HTML Summer.</p>
<p>This post covers the <a href="https://web.dev/learn/html/template/">Template, slot, and shadow module of Learn HTML</a>. Each section below corresponds to a section in this module of the course. The quoted items are relevant passages from the course.</p>

      <div class="heading-wrapper">
        <h2 id="intro-section">Intro section
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/hot-html-summer-template-slot-and-shadow/#intro-section">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>There’s no anchor for this section, it’s the first part of the module.</p>
<blockquote>
<p>The Web Component standard is made up of three parts—<a href="https://developer.mozilla.org/docs/Web/Web_Components/Using_templates_and_slots">HTML templates</a>, <a href="https://developer.mozilla.org/docs/Web/Web_Components/Using_custom_elements">Custom Elements</a>, and the <a href="https://developer.mozilla.org/docs/Web/Web_Components/Using_shadow_DOM">Shadow DOM</a>. Combined, they enable building customized, self-contained (encapsulated), reusable elements that can be seamlessly integrated into existing applications, like all the other HTML elements we’ve already covered.</p>
</blockquote>
<p>Building web components is something I’ve been wanting to learn for some time. I’ve fiddled around here and there, but don’t have a solid understanding. I don’t think I’ll learn everything in this module, but I’m excited to get a proper introduction and better understanding.</p>

      <div class="heading-wrapper">
        <h2 id="the-%3Ctemplate%3E-element">The <code>&lt;template&gt;</code> element
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/hot-html-summer-template-slot-and-shadow/#the-%3Ctemplate%3E-element">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Go to this <a href="https://web.dev/learn/html/template/#the_template_element">section at Learn HTML</a>.</p>
<blockquote>
<p>The <code>&lt;template&gt;</code> element is used to declare fragments of HTML to be cloned and inserted into the DOM with JavaScript. The contents of the element are not rendered by default. Rather, they are instantiated using JavaScript.</p>
</blockquote>
<p>This section steps through exactly what this means with code examples and CodePens. The description above is clear, but the further detail is worth looking through to illustrate the concept.</p>
<p>I did the example star rating component along with the module, and found it to be a good approach for grasping the concepts. Since the entire module was something I didn’t know much about I’ll summarize what I learned rather than listing each section with along with relevant quotes.</p>
<p>In no particular order…</p>
<ul>
<li>I finally have a solid understanding of the <code>&lt;template&gt;</code> element, the <code>&lt;slot&gt;</code> element (and attribute!), custom elements, and shadow DOM.</li>
<li>Finally wrapped my head around how <code>&lt;slot&gt;</code> works. Before I learned <a href="https://www.11ty.dev/">Eleventy</a> I played around with a <a href="https://sergey.cool/">little SSG called Sergey</a> that used slots. I kept stumbling on when slot was an element (in the template) and when to use the slot attribute (in the custom element).</li>
<li>What the shadow DOM is and how it’s created. What’s included in it and what’s not (e.g., slotted content within the custom element is not in the shadow-root and not encapsulated).</li>
</ul>
<p>I tested out my new knowledge by reading a couple of posts I had saved in open tabs. Happy to report that I had a much better understanding. In <a href="https://www.abeautifulsite.net/posts/a-web-components-primer/">some of that reading</a> I discovered that <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties">CSS custom properties</a> can be used in the shadow DOM. And in further investigation that <a href="https://web.dev/constructable-stylesheets/">constructible stylesheets</a> can be used to create reusable styles for the shadow DOM. The module also touched on using the <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes#part"><code>part</code> attribute and <code>::part()</code> pseudo-element</a> to style elements within the shadow-tree from CSS that is not encapsulated (e.g., your global stylesheet).</p>
<p>No doubt there’s a lot to learn, but now that I have a solid foundation it doesn’t feel unsurmountable. In addition to doing the exercise in the module I <a href="https://codepen.io/superterrific/pen/abQYEbN">created a small little card component at CodePen</a> as a test. It was nice to play around with a couple of different things and drill what I had learned into my head. Especially the slot element and attribute usage.</p>

      ]]></content>
    </entry>
	
    
    <entry>
      <title>Hot HTML Summer: Audio and Video</title>
      <link href="https://danabyerly.com/notes/hot-html-summer-audio-and-video/"/>
      <updated>2023-07-14T13:00:00Z</updated>
      <id>https://danabyerly.com/notes/hot-html-summer-audio-and-video/</id>
      <content type="html"><![CDATA[
        <p class="caption">This post is a <a href="https://danabyerly.com/tag/hot-html-summer/">part of a series</a> where I write a post for each module of the <a href="https://web.dev/learn/html/">web.dev Learn HTML course</a>. I'll note things I didn't know, highlight interesting items, and generally enjoy having a Hot HTML Summer.</p>
<p>This post covers the <a href="https://web.dev/learn/html//audio-video/">Audio and Video module of Learn HTML</a>. Each section below corresponds to a section in this module of the course. The quoted items are relevant passages from the course.</p>

      <div class="heading-wrapper">
        <h2 id="%3Caudio%3E-and-%3Cvideo%3E"><code>&lt;audio&gt;</code> and <code>&lt;video&gt;</code>
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/hot-html-summer-audio-and-video/#%3Caudio%3E-and-%3Cvideo%3E">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Go to this <a href="https://web.dev/learn/html/audio-video/#audio_and_video">section at Learn HTML</a>.</p>
<blockquote>
<p>The <a href="https://developer.mozilla.org/docs/Web/HTML/Element/video"><code>&lt;video&gt;</code></a> and <a href="https://developer.mozilla.org/docs/Web/HTML/Element/audio"><code>&lt;audio&gt;</code></a> elements can be used to embed media players directly with the <code>src</code> attribute or can be used as the container element for a series of <a href="https://developer.mozilla.org/docs/Web/HTML/Element/source"><code>&lt;source&gt;</code></a> elements, each providing a <code>src</code> file suggestion. While <code>&lt;video&gt;</code> can be used to embed an audio file, the <code>&lt;audio&gt;</code> element is preferable for embedding sound files.</p>
</blockquote>
<p>My experience with audio and video is limited to copy and pasting code from YouTube, Vimeo or the like. This entire module is something I know nothing about, at least in a hands-on way.</p>
<blockquote>
<p>Fallback content is included between the opening and closing tags. If the user agent doesn’t support <code>&lt;video&gt;</code> (or <code>&lt;audio&gt;</code> this content is shown.</p>
</blockquote>
<p>Always good to know the fallbacks.</p>
<blockquote>
<p>If no <code>src</code> attribute is included on the opening <code>&lt;video&gt;</code> or <code>&lt;audio&gt;</code> tags, include one or more <a href="https://developer.mozilla.org/docs/Web/HTML/Element/source"><code>&lt;source&gt;</code></a> elements, each with a <code>src</code> attribute to a media file.</p>
</blockquote>
<p>There’s a code example at the site that illustrates this, it’s similar to using <code>&lt;picture&gt;</code>.</p>
<blockquote>
<p>Within the <code>type</code> attribute, you can include a <a href="https://developer.mozilla.org/docs/Web/Media/Formats/codecs_parameter"><code>codecs</code></a> parameter, which specifies exactly how the resource is encoded. Codecs give you a way of including media optimizations that are not yet supported in all browsers. The codec is separated from the media type with a semicolon. For example, the codec can be written using intuitive syntax, such as <code>&lt;source src=&quot;videos/machines.webm&quot; type=&quot;video/webm;codecs=vp8,vorbis&quot;&gt;</code> which indicates that the WebM files contain VP8 video and vorbis audio.</p>
</blockquote>
<p>I’m so going to know what I’m doing if I ever have to do this.</p>
<blockquote>
<p>Make sure to define the aspect ratio of your video, because when the video loads, a size difference between the poster and the video will cause a reflow and repaint.</p>
</blockquote>
<p>As always, good tip.</p>
<blockquote>
<p>Omitting <code>controls</code> creates a bad user experience, especially if the boolean <code>autoplay</code> attribute is included.</p>
</blockquote>
<p>This should be seared into the brains of anyone adding audio or video files to a site.</p>

      <div class="heading-wrapper">
        <h2 id="tracks">Tracks
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/hot-html-summer-audio-and-video/#tracks">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Go to <a href="https://web.dev/learn/html/audio-video/#tracks">section at Learn HTML</a>.</p>
<blockquote>
<p>Between the opening and required closing tags of both audio and video, include one or more <a href="https://developer.mozilla.org/docs/Web/HTML/Element/track"><code>&lt;track&gt;</code></a> elements to specify timed text tracks. […] There are five enumerated values for the track <code>kind</code> attribute: <code>subtitles</code>, <code>captions</code>, <code>descriptions</code>, <code>chapters</code>, and other <code>metadata</code>.</p>
</blockquote>
<p>As previously mentioned, YouTube and Vimeo are my only real hands-on experience with integrating audio and video. But as a consumer, <code>chapters</code> is an incredibly useful way to navigate a video.</p>
<blockquote>
<p>The value <code>kind=&quot;caption&quot;</code> should be reserved for transcription and translations that include sound effects and other relevant audio information. This isn’t just for deaf viewers. Maybe a user can’t find their headphones so they turned on the captions. Or maybe they didn’t quite catch the last few talking points from a favorite podcast, so they want to read the transcript to confirm their understanding. Having alternative ways to access audio and video content is both important and convenient.</p>
</blockquote>
<p>If you get tired of my writing “another good tip”, let me know. Otherwise, another good tip.</p>
<blockquote>
<p>The <code>kind=&quot;description&quot;</code> is for text descriptions of the visual content in the video for users who can’t see the video, whether they are using a system without a screen such as Google Home or Alexa, or are blind.</p>
</blockquote>
<p>I didn’t realize there was a distinction between <code>caption</code>, or what’s commonly referred to as captions, and <code>description</code>. Also, another important aspect of this point, and the previous one, is broadening our understanding of how things are used and by whom.</p>
<p>Program note: Hot HTML Summer is taking a summer break next week. The next post will be on Monday July 24, happy Hot HTMLing!</p>

      ]]></content>
    </entry>
	
    
    <entry>
      <title>Hot HTML Summer: Images</title>
      <link href="https://danabyerly.com/notes/hot-html-summer-images/"/>
      <updated>2023-07-13T13:00:00Z</updated>
      <id>https://danabyerly.com/notes/hot-html-summer-images/</id>
      <content type="html"><![CDATA[
        <p class="caption">This post is a <a href="https://danabyerly.com/tag/hot-html-summer/">part of a series</a> where I write a post for each module of the <a href="https://web.dev/learn/html/">web.dev Learn HTML course</a>. I'll note things I didn't know, highlight interesting items, and generally enjoy having a Hot HTML Summer.</p>
<p>This post covers the <a href="https://web.dev/learn/html/images/">Images module of Learn HTML</a>. Each section below corresponds to a section in this module of the course. The quoted items are relevant passages from the course.</p>

      <div class="heading-wrapper">
        <h2 id="intro-section">Intro section
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/hot-html-summer-images/#intro-section">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>There’s no anchor for this section, it’s the first part of the module.</p>
<blockquote>
<p>Decorative images, such as background gradients on buttons or background images on sections of content or the full page, are presentational and should be applied with CSS. When an image adds context to a document, it is content and should be embedded with HTML.</p>
</blockquote>
<p>This is a useful guideline. In the <a href="https://web.dev/learn/html/navigation/">Navigation module</a> there was also a good tip for <a href="https://danabyerly.com/notes/hot-html-summer-navigation/#page-breadcrumbs">using CSS generated separators in page breadcrumbs</a>.</p>
<blockquote>
<p>If the image is of SVG file type, also include <a href="https://developer.mozilla.org/docs/Web/Accessibility/ARIA/Roles/Img_role"><code>role=&quot;img&quot;</code></a>, which is necessary due to <a href="https://bugs.webkit.org/show_bug.cgi?id=216364">VoiceOver</a> <a href="https://bugs.webkit.org/show_bug.cgi?id=240656">bugs</a>.</p>
</blockquote>
<p>I didn’t know this! I haven’t included SVG images as foreground images using the <code>&lt;img&gt;</code> tag at this site, but I’ll be checking my other sites and updating if necessary.</p>

      <div class="heading-wrapper">
        <h2 id="%3Cimg%3E-srcset-attribute"><code>&lt;img&gt; srcset</code> attribute
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/hot-html-summer-images/#%3Cimg%3E-srcset-attribute">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Go to this <a href="https://web.dev/learn/html/images/#img_srcset_attribute">section at Learn HTML</a>.</p>
<blockquote>
<p>The <a href="https://web.dev/learn/design/responsive-images/#responsive_images_with_srcset"><code>srcset</code></a> attribute enables suggesting multiple image files, with the browser selecting which image to request based on multiple media queries including viewport size and screen resolution.</p>
</blockquote>
<p>No matter how many tutorials or step-by-step how-to articles I read on this approach I’m not confident in my ability to create the correct images sizes, so I feel like I never quite get the full benefit of this approach. Just like JavaScript, some day I will figure this out!</p>

      <div class="heading-wrapper">
        <h2 id="%3Cpicture%3E-and-%3Csource%3E"><code>&lt;picture&gt;</code> and <code>&lt;source&gt;</code>
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/hot-html-summer-images/#%3Cpicture%3E-and-%3Csource%3E">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Go to this <a href="https://web.dev/learn/html/images/#picture_and_source">section at Learn HTML</a>.</p>
<blockquote>
<p>The <a href="https://developer.mozilla.org/docs/Web/HTML/Element/source"><code>&lt;source&gt;</code></a> attributes include <code>srcset</code>, <code>sizes</code>, <code>media</code>, <code>width</code>, and <code>height</code>. The <code>srcset</code> attribute is common to <code>img</code>, <code>source</code>, and <code>link</code>, but is generally implemented slightly differently on source as media queries can be listed in the <code>&lt;srcset&gt;</code>'s media attribute instead. <code>&lt;source&gt;</code> also supports image formats defined in the <code>type</code> attribute.</p>
</blockquote>
<p>This is my go-to approach. Instead going the head-scratcher math route of providing images of different sizes, I provide highly optimized images in JPG, WebP and AVIF formats and let the user’s browser sort out which one is best. I’ve used Cloudinary occasionally but prefer keeping my images within my project. If you’re interested learning about using an image CDN I’d <a href="https://someantics.dev/optimizing-images-with-cdns/">recommend this conversation</a> with Ben Meyers and Alistair Shepherd as a good starting point.</p>

      <div class="heading-wrapper">
        <h2 id="additional-performance-features">Additional performance features
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/hot-html-summer-images/#additional-performance-features">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Go to this <a href="https://web.dev/learn/html/images/#additional_performance_features">section at Learn HTML</a>.</p>
<blockquote>
<p>The <a href="https://web.dev/learn/design/responsive-images/#loading_hints/"><code>loading</code> attribute</a> tells the JS-enabled browser how to load the image. The default <code>eager</code> value means the image is loaded immediately as the HTML is parsed, even if the image is outside the visible viewport.</p>
</blockquote>
<p>I had no idea the default value was called that, and will probably chuckle every time I remember it.</p>

      ]]></content>
    </entry>
	
    
    <entry>
      <title>Hot HTML Summer: Forms</title>
      <link href="https://danabyerly.com/notes/hot-html-summer-forms/"/>
      <updated>2023-07-12T13:00:00Z</updated>
      <id>https://danabyerly.com/notes/hot-html-summer-forms/</id>
      <content type="html"><![CDATA[
        <p class="caption">This post is a <a href="https://danabyerly.com/tag/hot-html-summer/">part of a series</a> where I write a post for each module of the <a href="https://web.dev/learn/html/">web.dev Learn HTML course</a>. I'll note things I didn't know, highlight interesting items, and generally enjoy having a Hot HTML Summer.</p>
<p>This post covers the <a href="https://web.dev/learn/html/forms/">Forms module of Learn HTML</a>. Each section below corresponds to a section in this module of the course. The quoted items are relevant passages from the course.</p>

      <div class="heading-wrapper">
        <h2 id="submitting-forms">Submitting forms
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/hot-html-summer-forms/#submitting-forms">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Go to this <a href="https://web.dev/learn/html/forms/#submitting_forms">section at Learn HTML</a>.</p>
<blockquote>
<p>The attributes of the <code>&lt;form&gt;</code> element set the <a href="https://web.dev/learn/forms/form-element/#how-is-the-data-transferred">HTTP method</a> by which the form is submitted and the URL that processes the form submission. Yes, forms can be submitted, processed, and a new page can be loaded without any JavaScript. The <a href="https://web.dev/learn/forms/form/"><code>&lt;form&gt;</code> element</a> is that powerful.</p>
</blockquote>
<p>My work with forms has been focused on styling, layout, and accessibility. Handing off my design in code means that the fullstack developers <s>don’t mess up the layout or not associate the labels correctly</s> only have to focus on integrating the form, including submission and validations. tl;dr I will be learning a lot in this module of the course!</p>
<blockquote>
<p>The data sent is made up of name/value pairs of the form’s various form controls. By default, this includes all the form controls nested within the form that have a <code>name</code>. However, with the <code>form</code> attribute, it is possible to include form controls outside the <code>&lt;form&gt;</code> and to omit form controls nested within the <code>&lt;form&gt;</code>. Supported on form controls and <code>&lt;fieldset&gt;</code>, the <code>form</code> attribute takes as its value the <code>id</code> of the form the control it is associated with, not necessarily the form it is nested in. This means form controls don’t need to be physically nested in a <code>&lt;form&gt;</code>.</p>
</blockquote>
<p>The <code>name</code> attribute I knew, but not the <code>form</code> attribute. Very helpful to know that a form element could be anywhere in the document and be included in the form submission.</p>
<blockquote>
<p>Form buttons can have more than the attributes described at the start of this section. If the button includes a <code>formaction</code>, <code>formenctype</code>, <code>formmethod</code>, <code>formnovalidate</code>, or <code>formtarget</code> attribute, the values set on the button activating the form submission take precedence over the <code>action</code>, <a href="https://web.dev/learn/forms/form/#enable_users_to_submit_files"><code>enctype</code></a>, <code>method</code>, and <a href="https://web.dev/learn/html/attributes/"><code>target</code></a> set on the <code>&lt;form&gt;</code>. Constraint validation occurs prior to form submission, but only if there is neither a <code>formnovalidate</code> on the activated submit button nor a <code>novalidate</code> on the <code>&lt;form&gt;</code>.</p>
</blockquote>
<p>I knew none of this and have not heard of any of those attributes. If I ever strike out on my own and need to actually submit forms I will head directly to the<a href="https://web.dev/learn/forms/"> Learn Forms course</a>.</p>

      <div class="heading-wrapper">
        <h2 id="after-submitting-the-form">After submitting the form
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/hot-html-summer-forms/#after-submitting-the-form">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Go to this <a href="https://web.dev/learn/html/forms/#after_submitting_the_form">section of Learn HTML</a>.</p>
<blockquote>
<p>The value of a <code>&lt;textarea&gt;</code> is its inner text. The value of a <code>&lt;select&gt;</code> is the selected <code>&lt;option&gt;</code>'s <code>value</code> or, if the <code>&lt;option&gt;</code> doesn’t include a <code>value</code> attribute, the value is the selected option’s inner text.</p>
</blockquote>
<p>Good to know. There’s an example illustrating the <code>&lt;select&gt;</code> behavior.</p>
<blockquote>
<p>There are <a href="https://developer.mozilla.org/docs/Web/HTML/Element/Input#input_types">22 input types</a>, so we can’t cover them all. Just note that including a value is optional, and often a bad idea, when you want the user to enter information. For <code>&lt;input&gt;</code> elements where the user can’t edit the value, you should always include a value, including for input elements with a type of <code>hidden</code>, <code>radio</code>, <code>checkbox</code>, <code>submit</code>, <code>button</code>, and <code>reset</code>.</p>
</blockquote>
<p>More useful information.</p>

      <div class="heading-wrapper">
        <h2 id="radio-buttons">Radio buttons
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/hot-html-summer-forms/#radio-buttons">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Go to this <a href="https://web.dev/learn/html/forms/#radio_buttons">section at Learn HTML</a>.</p>
<blockquote>
<p>If the user is required to pick a radio control from a group of radio buttons, add the <a href="https://developer.mozilla.org/docs/Web/HTML/Attributes/required"><code>required</code></a> attribute to at least one of the controls. Including <code>required</code> on a radio button in a group makes a selection required for form submission, but it doesn’t have to be the radio with the attribute that gets selected to be valid.</p>
</blockquote>
<p>Another note for my future form submitting self.</p>

      <div class="heading-wrapper">
        <h2 id="checkboxes">Checkboxes
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/hot-html-summer-forms/#checkboxes">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Go to this <a href="https://web.dev/learn/html/forms/#checkboxes">section at Learn HTML</a>.</p>
<blockquote>
<p>If you don’t include a <code>value</code> on a checkbox, the value of the selected checkboxes will default to <code>on</code>, which probably isn’t helpful.</p>
</blockquote>
<p>Agree.</p>

      <div class="heading-wrapper">
        <h2 id="labels-and-fieldsets">Labels and fieldsets
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/hot-html-summer-forms/#labels-and-fieldsets">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Go to this <a href="https://web.dev/learn/html/forms/#labels_and_fieldsets">section of Learn HTML</a>.</p>
<blockquote>
<p>Associating labels with form controls has several benefits. Labels make form controls accessible to screen reader users by providing the control with an accessible name. Labels are also “hit areas”; they make the site more usable for users with dexterity issues by increasing the area.</p>
</blockquote>
<p>Happy to report I didn’t find anything I didn’t already know in this section. I wanted to highlight it because incorrectly associating labels to form controls is by far the most frequent mistake I’ve seen in teams I’ve worked with, and it has a big impact on accessibility.</p>

      <div class="heading-wrapper">
        <h2 id="built-in-validation">Built-in validation
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/hot-html-summer-forms/#built-in-validation">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Go to this <a href="https://web.dev/learn/html/forms/#built_in_validation">section at Learn HTML</a>.</p>
<blockquote>
<p>Using the <code>maxlength</code> attribute can lead to a poor user experience. It’s generally a better experience to allow the user to enter more than the allowed character length providing a counter, optionally in the form of an <a href="https://developer.mozilla.org/docs/Web/HTML/Element/output"><code>&lt;output&gt;</code></a> element, which is not submitted with the form, enabling them to edit down the text until the output shows the maximum allowed length has not been exceeded.</p>
</blockquote>
<p>Another good usability tip. Similarly in regard to <code>minlength</code> <a href="https://web.dev/learn/html/forms/#other-considerations">in the Other considerations section</a>…</p>
<blockquote>
<p>…it is important to consider that not everyone is like you. Someone may have a single letter as a last name (or no last name at all)</p>
</blockquote>
<p>In some cases you might be constrained by a minimum character requirement in a database that’s not immediately in your control, but if that’s not a constraint it’s important to keep in mind how you could impact users by setting arbitrary minimums or constraining characters with <code>pattern</code>. If you’re willing to traverse Twitter, the <a href="https://twitter.com/yournameisvalid">Your Name Is Invalid! account </a> is worth a look as an example of the many ways arbitrary constraint validations can make forms unusable.</p>
<p>I could easily share many more useful insights from the <a href="https://web.dev/learn/html/forms/#built-in-validation">Built-in validation</a>, <a href="https://web.dev/learn/html/forms/#example">Example</a>, and <a href="https://web.dev/learn/html/forms/#other_considerations">Other considerations</a> sections. But you should just go read it for yourself.</p>

      ]]></content>
    </entry>
	
    
    <entry>
      <title>Hot HTML Summer: Tables</title>
      <link href="https://danabyerly.com/notes/hot-html-summer-tables/"/>
      <updated>2023-07-11T13:00:00Z</updated>
      <id>https://danabyerly.com/notes/hot-html-summer-tables/</id>
      <content type="html"><![CDATA[
        <p class="caption">This post is a <a href="https://danabyerly.com/tag/hot-html-summer/">part of a series</a> where I write a post for each module of the <a href="https://web.dev/learn/html/">web.dev Learn HTML course</a>. I'll note things I didn't know, highlight interesting items, and generally enjoy having a Hot HTML Summer.</p>
<p>This post covers the <a href="https://web.dev/learn/html/tables/">Tables module of Learn HTML</a>. Each section below corresponds to a section in this module of the course. The quoted items are relevant passages from the course.</p>

      <div class="heading-wrapper">
        <h2 id="table-elements-in-order">Table elements, in order
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/hot-html-summer-tables/#table-elements-in-order">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Go to this <a href="https://web.dev/learn/html/tables/#table_elements_in_order">section at Learn HTML</a>.</p>
<blockquote>
<p>If the table maintains a selection state, has two-dimensional navigation, or allows the user to rearrange cell order, set <a href="https://developer.mozilla.org/docs/Web/Accessibility/ARIA/Roles/grid_role"><code>role=&quot;grid&quot;</code></a>. If the rows of the <code>grid</code> can be expanded and collapsed, use <a href="https://developer.mozilla.org/docs/Web/Accessibility/ARIA/Roles/treegrid_role"><code>role=&quot;treegrid&quot;</code></a> instead.</p>
</blockquote>
<p>Off to a good start with something I didn’t know!</p>
<blockquote>
<p>Rows contain table header (<code>&lt;th&gt;</code>) and table data (<code>&lt;td&gt;</code>) cells which, in turn, contain all the data. In the DOM, before any of this, you may find two additional features: the table caption (<code>&lt;caption&gt;</code>) and column groups (<code>&lt;colgroup&gt;</code>). Depending on whether or not the <code>&lt;colgroup&gt;</code> has a <code>span</code> attribute, it may contain nested table column (<code>&lt;col&gt;</code>) elements.</p>
</blockquote>
<p>I always wondered about <code>&lt;colgroup&gt;</code>, there’s more information later in the lesson and I can’t wait to learn about it.</p>

      <div class="heading-wrapper">
        <h3 id="table-caption">Table caption
      </h3>
        <a class="anchor-link" href="https://danabyerly.com/notes/hot-html-summer-tables/#table-caption">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Go to this <a href="https://web.dev/learn/html/tables/#table_caption">section at Learn HTML</a>.</p>
<blockquote>
<p>The <code>&lt;caption&gt;</code> element should be the first element nested in the <code>&lt;table&gt;</code> element. Including it lets all users know the purpose of the table immediately without having to read the surrounding text. Alternatively, you can use <code>aria-label</code> or <code>aria-labelledby</code> on the <code>&lt;table&gt;</code> to provide an accessible name as the caption. The <code>&lt;caption&gt;</code> element has no element-specific attributes.</p>
</blockquote>
<p>Good tip that using <code>aria-label</code> or <code>aria-labeledby</code> instead of <code>&lt;caption&gt;</code> is an option. More good tips on the various ways to handle captions and descriptions in general…</p>
<blockquote>
<p>Preferably, data tables should have clear headers and a caption, and be simple enough to be almost self-explanatory. Bear in mind that not all users have the same cognitive abilities. When the table is “making a point”, or otherwise needs interpretation, provide a brief summary of the main point or function of the table. Where that summary is placed depends on its length and complexity. If brief, use it as the inner text of the caption. If longer, summarize it in the caption, and provide the summary in the paragraph preceding the table, associating the two with the <a href="https://developer.mozilla.org/docs/Web/Accessibility/ARIA/Attributes/aria-describedby"><code>aria-describedby</code></a> attribute. Putting the table in a <code>&lt;figure&gt;</code> and putting the summary in the <code>&lt;figcaption&gt;</code> is another option.</p>
</blockquote>
<p>Note to my fellow Eleventy users, <a href="https://www.11ty.dev/docs/languages/markdown/">markdown-it,</a> which includes the ability to create tables in markdown, doesn’t provide captions by default, or if it does, I couldn’t figure it out. I found the <a href="https://github.com/martinring/markdown-it-table-captions">markdown-it-table-caption</a> plugin that adds the ability to use captions and will try it out. If it works I’m adding this to my Hot HTML Summer to-do list.</p>

      <div class="heading-wrapper">
        <h3 id="table-content">Table content
      </h3>
        <a class="anchor-link" href="https://danabyerly.com/notes/hot-html-summer-tables/#table-content">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Go to this <a href="https://web.dev/learn/html/tables/#table_content">section at Learn HTML</a>.</p>
<blockquote>
<p>There were attributes to add padding between cells and within cells, for borders, and for text alignment. Cellpadding and cellspacing, which define the space between the content of a cell and its border, and between the borders of adjacent cells, should be set with the CSS <a href="https://developer.mozilla.org/docs/Web/CSS/border-collapse">border-collapse</a> and <a href="https://developer.mozilla.org/docs/Web/CSS/border-spacing">border-spacing</a> properties, respectively.</p>
</blockquote>
<p>Forgot about those attributes! Perhaps more like burned them from my layout table memory, never to be spoken of again.</p>
<blockquote>
<p><code>Border-spacing</code> will have no effect if <code>border-collapse: collapse</code> is set. If <code>border-collapse: separate;</code> is set, it’s possible to hide empty cells completely with <code>empty-cells: hide;</code>.</p>
</blockquote>
<p>I didn’t know about <code>empty-cells: hide;</code>, could be useful.</p>
<blockquote>
<p>The <code>&lt;th&gt;</code> cell has semantic meaning, with implicit ARIA roles of <a href="https://w3c.github.io/aria/#columnheader">columnheader</a> or <a href="https://w3c.github.io/aria/#rowheader">rowheader</a>. It defines the cell as the header for the column or row of table cells, depending on the value of the enumerated <code>scope</code> attribute. The browser will default to <code>col</code> or <code>row</code> if <code>scope</code> is not explicitly set.</p>
</blockquote>
<p>I always forget that rows can have headers too. There’s an example CodePen in the section that has a nice illustration of the approach of using both column and row headers.</p>

      <div class="heading-wrapper">
        <h3 id="merging-cells">Merging cells
      </h3>
        <a class="anchor-link" href="https://danabyerly.com/notes/hot-html-summer-tables/#merging-cells">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Go to this <a href="https://web.dev/learn/html/tables/#merging_cells">section at Learn HTML</a>.</p>
<blockquote>
<p>In cases where a cell is defined by multiple header cells with associations that cannot be set by the <code>scope</code> attributes alone, include the <code>headers</code> attribute with a space-separated list of the associated headers. As this example is a more complex table, we explicitly define the scope of the headers with the <code>scope</code> attribute. To be even clearer, we added the <code>headers</code> attribute to each cell. […] In such complex tables, explicitly associate each data cell with each corresponding header cell with a list of space-separated <code>id</code> values of all the associated headers as the value of the <code>headers</code> attribute.</p>
</blockquote>
<p>There are aspects of tables that I’ve heard of and don’t know much about, but I’ve never even heard of the <code>headers</code> attribute for tables. The example CodePen in this section, and the additional detail, are definitely worth checking out.</p>

      <div class="heading-wrapper">
        <h2 id="styling-tables">Styling tables
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/hot-html-summer-tables/#styling-tables">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Go to this <a href="https://web.dev/learn/html/tables/#styling_tables">section at Learn HTML</a>.</p>
<blockquote>
<p>There are two relatively obscure elements that were briefly mentioned: the column group, <a href="https://developer.mozilla.org/docs/Web/HTML/Element/colgroup"><code>&lt;colgroup&gt;</code></a>, element and its only descendant, the empty <a href="https://developer.mozilla.org/docs/Web/HTML/Element/col"><code>&lt;col&gt;</code></a> column element. The <code>&lt;colgroup&gt;</code> element is used to define groups of columns, or <code>&lt;col&gt;</code> elements, within a table.</p>
</blockquote>
<p>Speaking of things I’ve heard of, but don’t know too much about.</p>
<blockquote>
<p>Neither <code>&lt;colgroup&gt;</code> nor <code>&lt;col&gt;</code> has semantic meaning in terms of helping to make the table more accessible, but they do allow for limited column styling, including setting a width for the column with CSS.</p>
</blockquote>
<p>Ah ha! There’s an example of how and where to add <code>&lt;colgroup&gt;</code> within your table code, but no CodePen illustrating its usage. So <a href="https://codepen.io/superterrific/pen/LYXzKEL?editors=1100">I created one</a> to try it out, and in the process I discovered the limited part of limited column styling.</p>
<p>My first attempt included <code>background</code> and <code>color</code> properties for the column, but only <code>background</code> worked. The <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/colgroup">MDN <code>colgroup</code> page</a> and the <a href="https://html.spec.whatwg.org/multipage/tables.html#the-colgroup-element">WHATWG spec</a> didn’t have any information, but the <a href="https://developer.mozilla.org/en-US/docs/Learn/HTML/Tables/Basics#providing_common_styling_to_columns">Table Basics page at MDN</a> did…</p>
<blockquote>
<p><strong>Note:</strong> Styling columns like this is <a href="https://www.w3.org/TR/CSS22/tables.html#columns">limited to a few properties</a>: <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/border"><code>border</code></a>, <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/background"><code>background</code></a>, <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/width"><code>width</code></a>, and <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/visibility"><code>visibility</code></a>. To set other properties you’ll have to either style every <code>&lt;td&gt;</code> or <code>&lt;th&gt;</code> in the column, or use a complex selector such as <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/:nth-child"><code>:nth-child</code></a>.</p>
</blockquote>
<p>The MDN Table Basics page also links <a href="https://www.w3.org/TR/CSS22/tables.html#columns">to the W3 CSS spec</a>, which has the information about the limited properties, and additional information about how the <code>visibility</code> property has limited values…</p>
<blockquote>
<p>If the ‘visibility’ of a column is set to ‘collapse’, none of the cells in the column are rendered, and cells that span into other columns are clipped. In addition, the width of the table is diminished by the width the column would have taken up. Other values for ‘visibility’ have no effect.</p>
</blockquote>
<p>Only <code>visibility: collapse;</code> works for <code>colgroup</code>. According to the <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/visibility#values">MDN CSS &gt; visibility page</a>, the bonus of using <code>collapse</code> is that it removes the columns (or rows, or cells, depending on how you use it) without forcing the recalculation of the widths or heights for the entire table.</p>
<blockquote>
<p>For <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/table"><code>&lt;table&gt;</code></a> rows, columns, column groups, and row groups, the row(s) or column(s) are hidden and the space they would have occupied is removed (as if <code>display: none</code> were applied to the column/row of the table). However, the size of other rows and columns is still calculated as though the cells in the collapsed row(s) or column(s) are present. This value allows for the fast removal of a row or column from a table without forcing the recalculation of widths and heights for the entire table.</p>
</blockquote>
<p>There’s additional information in the <a href="https://www.w3.org/TR/CSS22/tables.html#dynamic-effects">dynamic row and column effects</a> in the CSS spec.</p>
<p>But there you have it, the <code>colgroup</code> is a mystery no more. One thing to keep in mind about accessibility, if you do use <code>&lt;colgroup&gt;</code> be sure to set a background color that has enough contrast with the existing text color as you aren’t able to change the text color (via the <code>color</code> property) with <code>&lt;colgroup&gt;</code>.</p>

      <div class="heading-wrapper">
        <h2 id="presenting-data">Presenting data
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/hot-html-summer-tables/#presenting-data">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Go to <a href="https://web.dev/learn/html/tables/#presenting_data">section at Learn HTML</a>.</p>
<blockquote>
<p>If you want to lay out content in many columns, use <a href="https://developer.mozilla.org/docs/Web/CSS/CSS_Columns">multi-column layout</a>.</p>
</blockquote>
<p>A what? <code>column-count</code>? Somehow I missed this option. I threw together <a href="https://codepen.io/superterrific/pen/oNQoxvN">a quick CodePen</a> to test it out, and found this <a href="https://www.smashingmagazine.com/2019/01/css-multiple-column-layout-multicol/">helpful article from Rachel Andrew.</a> I’m only learning about HTML right now, I’ll have to come back to this.</p>

      ]]></content>
    </entry>
	
    
    <entry>
      <title>Hot HTML Summer: Navigation</title>
      <link href="https://danabyerly.com/notes/hot-html-summer-navigation/"/>
      <updated>2023-07-10T12:45:00Z</updated>
      <id>https://danabyerly.com/notes/hot-html-summer-navigation/</id>
      <content type="html"><![CDATA[
        <p class="caption">This post is a <a href="https://danabyerly.com/tag/hot-html-summer/">part of a series</a> where I write a post for each module of the <a href="https://web.dev/learn/html/">web.dev Learn HTML course</a>. I'll note things I didn't know, highlight interesting items, and generally enjoy having a Hot HTML Summer.</p>
<p>This post covers the <a href="https://web.dev/learn/html/navigation/">Navigation module of Learn HTML</a>. Each section below corresponds to a section in this module of the course. The quoted items are relevant passages from the course.</p>

      <div class="heading-wrapper">
        <h2 id="skip-to-content-link">“Skip to content” link
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/hot-html-summer-navigation/#skip-to-content-link">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Go to this <a href="https://web.dev/learn/html/navigation/#skip_to_content_link">section at Learn HTML</a>.</p>
<blockquote>
<p>The link text reads “skip to main.” This is the link’s accessible name. This is a technical site, and users probably know what “main” means. Like all link text, the accessible name should clearly indicate where the link takes the user.</p>
</blockquote>
<p>This is a nice usability tip. Even though readers of this site are likely to know what “Skip to main” means, I use “Skip to main content”. The only <a href="https://webaim.org/techniques/skipnav/#wording">mention of wording best practices for skip links</a> that I could find was at WebAIM. The suggestions are all variations on either “Skip navigation” or “Skip to main content” with the following explanation:</p>
<blockquote>
<p>Any of these may be sufficient so long as the purpose of the link is clearly described. In general, we prefer “Skip to main content” as it explains where the user is navigating to versus what they are navigating past.</p>
</blockquote>
<p>I wonder if using “Skip to article” on content pages and “Skip to main content” other types of pages, such as landing pages or a homepage, would be a nice contextual improvement or confusing? If the goal of link text is to be as specific as possible, using a mixed approach could be an improvement. If anyone has done user testing I’d love to know!</p>

      <div class="heading-wrapper">
        <h2 id="table-of-contents">Table of contents
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/hot-html-summer-navigation/#table-of-contents">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Go to this <a href="https://web.dev/learn/html/navigation/#table_of_contents">section at Learn HTML</a>.</p>
<blockquote>
<p>When providing an accessible name on an element, don’t include the name of the element. Screen readers provide that information to the user. For example, when using the <code>&lt;nav&gt;</code> element, don’t include “navigation”; that information is included when using semantic elements.</p>
</blockquote>
<p>I knew this one too, but wanted to highlight it. It’s hard to pull quotes out of this section because they’re specifically related to the examples. It’s worth reading the section to see the examples in context, but to illustrate the above passage the primary navigation of this site uses:</p>
<pre class="language-html"><code class="language-html"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>nav</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>site-nav<span class="token punctuation">"</span></span> <span class="token attr-name">aria-label</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>Primary<span class="token punctuation">"</span></span><span class="token punctuation">></span></span></code></pre>
<p>Since the screen reader will announce that it’s navigation based on the element, I only needed to add “Primary” for the additional context. This will be announced along the lines of “Navigation, primary” (which may vary by screen reader). I don’t currently have my footer links in a <code>&lt;nav&gt;</code> element and am adding that to my Hot HTML Summer to-do list. I’ll use <code>aria-label=&quot;Secondary&quot;</code> when I do add it.</p>

      <div class="heading-wrapper">
        <h2 id="page-breadcrumbs">Page breadcrumbs
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/hot-html-summer-navigation/#page-breadcrumbs">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Go to this <a href="https://web.dev/learn/html/navigation/#page_breadcrumbs">section at Learn HTML</a>.</p>
<blockquote>
<p>Between links there are CSS-generated content separators. The separators come before each list item starting with the second <code>&lt;li&gt;</code>.</p>
<p>(example CSS at site)</p>
<p>Screen readers will not “see” them, which is best practice: separators between breadcrumb links should be hidden from screen readers. They must also have enough contrast against their background, the same as regular text.</p>
</blockquote>
<p>Another nice tip! Come for all the things you don’t know about HTML, stay for the tips on how do it more effectively.</p>

      ]]></content>
    </entry>
	
    
    <entry>
      <title>Hot HTML Summer: Lists</title>
      <link href="https://danabyerly.com/notes/hot-html-summer-lists/"/>
      <updated>2023-07-07T13:00:00Z</updated>
      <id>https://danabyerly.com/notes/hot-html-summer-lists/</id>
      <content type="html"><![CDATA[
        <p class="caption">This post is a <a href="https://danabyerly.com/tag/hot-html-summer/">part of a series</a> where I write a post for each module of the <a href="https://web.dev/learn/html/">web.dev Learn HTML course</a>. I'll note things I didn't know, highlight interesting items, and generally enjoy having a Hot HTML Summer.</p>
<p>This post covers the <a href="https://web.dev/learn/html/lists/">Lists module of Learn HTML</a>. Each section below corresponds to a section in this module of the course. The quoted items are relevant passages from the course.</p>

      <div class="heading-wrapper">
        <h2 id="ordered-lists">Ordered lists
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/hot-html-summer-lists/#ordered-lists">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Go to this <a href="https://web.dev/learn/html/lists/#ordered_lists">section at Learn HTML</a>.</p>
<blockquote>
<p>The <code>&lt;ol&gt;</code> has three element-specific attributes: <code>type</code>, <code>reversed</code>, and <code>start</code>.</p>
<p>(code example at site)</p>
<p>The enumerated <code>type</code> attribute sets the numbering type. There are five valid values for <code>type</code>, the default being <code>1</code> for numbers, but you can also use a, A, i, or I, for lower and upper case letters or roman numerals.</p>
</blockquote>
<p>I don’t use ordered lists very often, when I do use them it’s straightforward and doesn’t stray from the default behavior. Pretty sure I’ve used <code>reversed</code> and <code>start</code>, but not <code>type</code>.</p>

      <div class="heading-wrapper">
        <h2 id="list-items">List items
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/hot-html-summer-lists/#list-items">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Go to this <a href="https://web.dev/learn/html/lists/#list_items">section at Learn HTML</a>.</p>
<blockquote>
<p>There is only one element-specific <code>&lt;li&gt;</code> attribute: <code>value</code>, an integer. The <code>value</code> is only useful on an <code>&lt;li&gt;</code> when the <code>&lt;li&gt;</code> is nested within an ordered list and has no meaning for unordered lists or menus. It overrides the value of the <code>&lt;ol&gt;</code>'s start if there is a conflict.</p>
</blockquote>
<p>More ordered list mysteries revealed.</p>
<blockquote>
<p>The <code>value</code> is the number of the list item within an ordered list. With subsequent list items, continue the numbering from the value set, unless that item also has a <code>value</code> attribute set. The value doesn’t have to be in order; though if it isn’t in order, there should be a good reason.</p>
</blockquote>
<p>There’s an <a href="https://codepen.io/web-dot-dev/pen/WNyPmrv">example CodePen</a> worth checking out that illustrates the behavior. I can’t think of an occasion where this would’ve been useful, but maybe there’s a use case out there where this would solve the problem. If so, make sure to consider if or how this could be confusing to assistive technology users and be sure to provide proper context.</p>

      <div class="heading-wrapper">
        <h2 id="description-lists">Description lists
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/hot-html-summer-lists/#description-lists">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Go to this <a href="https://web.dev/learn/html/lists/#description_lists">section at Learn HTML</a>.</p>
<blockquote>
<p>A description list is a <a href="https://developer.mozilla.org/docs/Web/HTML/Element/dl">description list</a> (<code>&lt;dl&gt;</code>) element containing a series of (zero or more) <a href="https://developer.mozilla.org/docs/Web/HTML/Element/dt">description terms</a> (<code>&lt;dt&gt;</code>) and their <a href="https://developer.mozilla.org/docs/Web/HTML/Element/dd">description details</a> (<code>&lt;dd&gt;</code>). The original names for these three elements were “definition list,” “definition term,” and “definition definition.” The <a href="https://www.w3.org/TR/html4/struct/lists.html#h-10.3">name changed</a> in the living standard.</p>
</blockquote>
<p>I was not using my front-end skills in a meaningful way when HTML 5 was released, so I missed this name change. And, in my prior web dev life I don’t recall ever using the definition list, but I did know of it.</p>
<p>Fast forward to not too long ago when I found myself thinking that I had somehow remembered the element name incorrectly, like when you meet someone new and get their name wrong, and the wrong name sticks. Sometimes missing a crucial transition can result in scenarios like this!</p>
<p>Ben Meyers has a <a href="https://benmyers.dev/blog/on-the-dl/">great in-depth article</a> on the ~<s>definition</s>~ description list that’s full of useful examples.</p>

      ]]></content>
    </entry>
	
    
    <entry>
      <title>Hot HTML Summer: Links</title>
      <link href="https://danabyerly.com/notes/hot-html-summer-links/"/>
      <updated>2023-07-06T13:30:00Z</updated>
      <id>https://danabyerly.com/notes/hot-html-summer-links/</id>
      <content type="html"><![CDATA[
        <p class="caption">This post is a <a href="https://danabyerly.com/tag/hot-html-summer/">part of a series</a> where I write a post for each module of the <a href="https://web.dev/learn/html/">web.dev Learn HTML course</a>. I'll note things I didn't know, highlight interesting items, and generally enjoy having a Hot HTML Summer.</p>
<p>This post covers the <a href="https://web.dev/learn/html/links/">Links module of Learn HTML</a>. Each section below corresponds to a section in this module of the course. The quoted items are relevant passages from the course.</p>

      <div class="heading-wrapper">
        <h2 id="the-href-attribute">The <code>href</code> attribute
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/hot-html-summer-links/#the-href-attribute">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Go to this <a href="https://web.dev/learn/html/links/#the_href_attribute">section at Learn HTML</a>.</p>
<blockquote>
<p>Absolute URLs include a protocol, in this case <code>https://</code>, and a domain name. When the protocol is written simply as <code>//</code>, it is an implicit protocol and means “use the same protocol as is currently being used.”</p>
</blockquote>
<p>I didn’t know that <code>//</code> could be used for the same protocol. I made <a href="https://codepen.io/superterrific/pen/RwqgPwQ">a little CodePen</a> to test it out. It feels a little too close to relative address to become a go-to for me, but I love learning all the little particulars of a language I though I knew pretty well.</p>
<blockquote>
<p>The <code>mailto</code> link doesn’t need to include an email address, but it can, along with <code>cc</code>, <code>bcc</code>, <code>subject</code>, and <code>body</code> text to prepopulate the email. By default, an email client will be opened. You could prepopulate the subject and body of the email with no email address, to allow site visitors to invite their own friends.</p>
</blockquote>
<p>I knew this one, but wanted to share it because it can be handy.</p>

      <div class="heading-wrapper">
        <h2 id="browsing-context">Browsing context
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/hot-html-summer-links/#browsing-context">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Go to this <a href="https://web.dev/learn/html/links/#browsing_context">section at Learn HTML</a>.</p>
<blockquote>
<p>Every browsing context—basically, every browser tab—has a browsing context name. Links can open links in the current tab, a new unnamed tab, or a new or existing named tab. By default, the name is the empty string.</p>
</blockquote>
<p>You guessed it, didn’t know this! It gets better…</p>
<blockquote>
<p>A link with <code>target=&quot;_blank&quot;</code> will be opened in a new tab with a null name, opening a new, unnamed tab with every link click. This can create many new tabs. Too many tabs. For example, if the user clicks on <code>&lt;a href=&quot;registration.html&quot; target=&quot;_blank&quot;&gt;Register Now&lt;/a&gt;</code> 15 times, the registration form will be opened in 15 separate tabs. This problem can be fixed by providing a tab context name. By including the <a href="https://html.spec.whatwg.org/#browsing-context-names"><code>target</code>attribute</a> with a case-sensitive value—such as <code>&lt;a href=&quot;registration.html&quot; target=&quot;reg&quot;&gt;Register Now&lt;/a&gt;</code>—the first click on this link will open the registration form in a new <code>reg</code> tab. Clicking on this link 15 more times will reload the registration in the <code>reg</code> browsing context, without opening any additional tabs.</p>
</blockquote>
<p>This is a nice way to reduce potential annoyance if you find yourself with a scenario that warrants opening a link in a new tab.</p>
<blockquote>
<p>The <code>prev</code> and <code>next</code> values can be used on links pointing to the previous and next document in a series.</p>
</blockquote>
<p>I’ve added these to my pagination links!</p>
<blockquote>
<p>Similar to <a href="https://web.dev/learn/html/document-structure/#alternate_versions_of_the_site"><code>&lt;link rel=&quot;alternative&quot;&gt;</code></a>, the meaning of <code>&lt;a rel=&quot;alternative&quot;&gt;</code> depends on other attributes. RSS feed alternatives will also include <code>type=&quot;application/rss+xml&quot;</code> or <code>type=&quot;application/atom+xml</code>, alternative formats will include the <code>type</code> attribute, and translations will include the <code>hreflang</code> attribute. If the content between the opening and closing tags is in a language other than the main document language, include the <code>lang</code> attribute. If the language of the hyperlinked document is in a different language, include the <code>hreflang</code> attribute.</p>
</blockquote>
<p>There’s a good example that combines <code>rel=&quot;alternative&quot;</code>, <code>lang</code>, and <code>hreflang</code>. There’s also a list of list of <a href="https://web.dev/learn/html/links/#user_experience_tips">user experience considerations and tips for links</a> in general that’s worth reviewing.</p>

      ]]></content>
    </entry>
	
    
    <entry>
      <title>Hot HTML Summer: Text basics</title>
      <link href="https://danabyerly.com/notes/hot-html-summer-text-basics/"/>
      <updated>2023-07-05T14:00:00Z</updated>
      <id>https://danabyerly.com/notes/hot-html-summer-text-basics/</id>
      <content type="html"><![CDATA[
        <p class="caption">This post is a <a href="https://danabyerly.com/tag/hot-html-summer/">part of a series</a> where I write a post for each module of the <a href="https://web.dev/learn/html/">web.dev Learn HTML course</a>. I'll note things I didn't know, highlight interesting items, and generally enjoy having a Hot HTML Summer.</p>
<p>This post covers the <a href="https://web.dev/learn/html/text-basics/">Text basics module of Learn HTML</a>. Each section below corresponds to a section in this module of the course. The quoted items are relevant passages from the course.</p>

      <div class="heading-wrapper">
        <h2 id="headings-revisited">Headings, revisited
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/hot-html-summer-text-basics/#headings-revisited">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Go to this <a href="https://web.dev/learn/html/text-basics/#headings_revisited">section at Learn HTML</a>.</p>
<blockquote>
<p>There are six section heading elements, <code>&lt;h1&gt;</code>, <code>&lt;h2&gt;</code>, <code>&lt;h3&gt;</code>, <code>&lt;h4&gt;</code>, <code>&lt;h5&gt;</code>, and <code>&lt;h6&gt;</code>, with <code>&lt;h1&gt;</code> being most important and <code>&lt;h6&gt;</code> the least. For many years, developers were told that headings were used by browsers to outline documents. That was originally a goal, but browsers haven’t implemented outlining features.</p>
</blockquote>
<p>More tea spilling, and indeed still a point of consternation. Just today Manual Matuzović <a href="https://mastodon.social/@matuzo@front-end.social/110660416471629911">posted an example</a> of “how to prove that there is no document outline algorithm even though user agent styles are telling a different story”. The resulting discussion illustrates the frustation.</p>
<blockquote>
<p>However, screen reader users do use headings as an exploration strategy to learn about the content of the page, navigating through headings with the <code>h</code> key. So ensuring that heading levels are implemented as you would outline a document makes your content accessible and is still very much encouraged.</p>
</blockquote>
<p>I knew this, but wanted to highlight this because it’s important!</p>
<blockquote>
<p>Interestingly, browsers by default also decrement the <code>&lt;h1&gt;</code> font size based on how many <code>&lt;article&gt;</code>, <code>&lt;aside&gt;</code>, <code>&lt;nav&gt;</code>, or <code>&lt;section&gt;</code> elements it is nested in.</p>
</blockquote>
<p>This I didn’t know! There’s an image example that’s worth checking out. I also did a <a href="https://codepen.io/superterrific/pen/QWJvNwe">quick CodePen example</a> to see for myself.</p>
<blockquote>
<p>In HTML, paragraphs are marked up with the <code>&lt;p&gt;</code> tag; the closing tag is optional but always advised.</p>
</blockquote>
<p>Optional? I didn’t know that one either. <a href="https://codepen.io/superterrific/pen/XWyRddp">I tried it</a>, but I didn’t like it, although nothing horrible happened.</p>

      <div class="heading-wrapper">
        <h2 id="quotes-and-citations">Quotes and citations
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/hot-html-summer-text-basics/#quotes-and-citations">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Go to this <a href="https://web.dev/learn/html/text-basics/#quotes_and_citations">section at Learn HTML</a>.</p>
<blockquote>
<p>The information about the quote author, or citation, is not part of the quote and therefore not in the <code>&lt;blockquote&gt;</code>, but comes after the quote.</p>
</blockquote>
<p>Whoops! I’m doing this wrong in at least a few places. One of those places is the <a href="https://danabyerly-junkdrawer.website/">Junk Drawer</a>, which uses <a href="https://danabyerly.com/tag/wordpress/">headless WordPress as a CMS with Eleventy</a>. The default WordPress quote block offers the ability to add a citation below the quote. The citation is wrapped in <code>&lt;cite&gt;</code> and is part of the <code>&lt;blockquote&gt;</code>, which is not valid.</p>
<p>There’s no mention of the citation in the current <a href="https://wordpress.org/documentation/article/quote-block/">WordPress quote block documentation</a>. Perhaps I’ll add “Hot Learn How to Make WordPress Blocks Summer” to the list. In the meantime I have a plan on how to manually fix these that may or may not warrant a post.</p>
<blockquote>
<p>If the review (in the example, <a href="https://codepen.io/web-dot-dev/pen/LYrqKMq">view at CodePen</a>) was pulled from a review website, book, or other work, the <code>&lt;cite&gt;</code> element could be used for the title of a source. The content of the <code>&lt;cite&gt;</code> can be the title of a book, the name of a website or TV show, or even the name of a computer program. The <code>&lt;cite&gt;</code> encapsulation can be used whether the source is being mentioned in passing or if the source is being quoted or referenced. The content of the <code>&lt;cite&gt;</code> is the work, not the author.</p>
</blockquote>
<p>At MDN there’s a <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/cite#usage_notes">long list of examples</a> of potential uses for <code>&lt;cite&gt;</code>.</p>
<blockquote>
<p>To provide credit where credit is due when you can’t make the content visible, there is the <code>cite</code> attribute which takes as its value the URL of the source document or message for the information quoted. This attribute is valid on both <code>&lt;q&gt;</code> and <code>&lt;blockquote&gt;</code>. While it’s a URL, it is machine readable but not visible to the reader.</p>
</blockquote>
<p>In other words, adding a link to the <code>cite</code> attribute does not make the element, for example a <code>&lt;blockquote&gt;</code>, a clickable link. I can confirm since I’ve used it! But I will be checking my sites to make sure I’m using <code>&lt;cite&gt;</code> or <code>cite</code> correctly with <code>&lt;blockquote&gt;</code> (or <code>&lt;quote&gt;</code>!). The good news it that both WordPress and <a href="https://www.11ty.dev/">Eleventy</a> by way of <a href="https://www.npmjs.com/package/markdown-it">markdown-it</a> correctly apply paragraph tags within a <code>&lt;blockquote&gt;</code>.</p>

      ]]></content>
    </entry>
	
    
    <entry>
      <title>Hot HTML Summer: Attributes</title>
      <link href="https://danabyerly.com/notes/hot-html-summer-attributes/"/>
      <updated>2023-07-04T13:45:00Z</updated>
      <id>https://danabyerly.com/notes/hot-html-summer-attributes/</id>
      <content type="html"><![CDATA[
        <p class="caption">This post is a <a href="https://danabyerly.com/tag/hot-html-summer/">part of a series</a> where I write a post for each module of the <a href="https://web.dev/learn/html/">web.dev Learn HTML course</a>. I'll note things I didn't know, highlight interesting items, and generally enjoy having a Hot HTML Summer.</p>
<p>This post covers the <a href="https://web.dev/learn/html/attributes/">Attributes module of Learn HTML</a>. Each section below corresponds to a section in this module of the course. The quoted items are relevant passages from the course.</p>

      <div class="heading-wrapper">
        <h2 id="boolean-attributes">Boolean attributes
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/hot-html-summer-attributes/#boolean-attributes">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Go to this <a href="https://web.dev/learn/html/attributes/#boolean_attributes">section at Learn HTML</a>.</p>
<blockquote>
<p>If a boolean attribute is present, it is always true. Boolean attributes include <code>autofocus</code>, <code>inert</code>, <code>checked</code>, <code>disabled</code>, <code>required</code>, <code>reversed</code>, <code>allowfullscreen</code>, <code>default</code>, <code>loop</code>, <code>autoplay</code>, <code>controls</code>, <code>muted</code>, <code>readonly</code>, <code>multiple,</code> and <code>selected</code>. […] If the attribute value is false, omit the attribute. If the attribute is true, include the attribute but don’t provide a value.</p>
</blockquote>
<p>I never thought of these as boolean, but of course that makes sense. There were two attributes in that list I didn’t recognize: <code>default</code> and <code>multiple</code>.</p>
<p>The <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/track#default"><code>default</code> attribute</a> belongs to the <code>&lt;track&gt;</code> element (which I’ve never used), according to MDN indicates “Indicates that the track should be enabled unless the user’s preferences indicate something different”.</p>
<p>The <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/multiple"><code>multiple</code> attribute</a> is valid for the <code>email</code> or <code>file</code> input type and <code>&lt;select&gt;</code>. according to MDN “if set, means the form control accepts one or more values”. OK, I should’ve known that one! Maybe I did and didn’t remember? Either way, noted!</p>

      <div class="heading-wrapper">
        <h2 id="enumerated-attributes">Enumerated attributes
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/hot-html-summer-attributes/#enumerated-attributes">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Go to this <a href="https://web.dev/learn/html/attributes/#enumerated_attributes">section at Learn HTML</a>.</p>
<blockquote>
<p>Enumerated attributes are sometimes confused with boolean attributes. They are HTML attributes that have a limited set of predefined valid values.</p>
</blockquote>
<p>Another name I didn’t know. I feel like I’m getting a low-key Basics of Computer Science lesson by learning all the proper names. I feel confident in my ability to sling the HTML, but knowing the proper names for things is an unexpected confidence booster. I think it’s good to find confidence boosters in general, but they can be especially helpful if you’re self taught.</p>

      <div class="heading-wrapper">
        <h2 id="global-attributes">Global attributes
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/hot-html-summer-attributes/#global-attributes">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Go to this <a href="https://web.dev/learn/html/attributes/#global_attributes">section at Learn HTML</a>.</p>
<blockquote>
<p>Global attributes are attributes that can be set on any HTML element, including elements in the <code>&lt;head&gt;</code>. There are more than <a href="https://developer.mozilla.org/docs/Web/HTML/Global_attributes#list_of_global_attributes">30 global attributes</a>.</p>
</blockquote>
<p>I knew the name for this one! I mention this section because I visited the <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes#list_of_global_attributes">linked list of global attributes</a> at MDN and recommend taking a look. It includes warhorses like <code>class</code> and <code>id</code>. There’s the well known, but use sparingly (<code>role</code>) or ideally not at all (<code>autofocus</code>, <code>style</code>, <code>title</code>). And there are plenty that I’ve seen mentioned not had the occasion to use.</p>
<p>A group that seemed particularly interesting were <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/itemscope"><code>itemscope</code></a>, <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/itemprop"><code>itemprop</code></a>, and <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/itemtype"><code>itemtype</code></a>. These attributes allow you to add structured <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Microdata">microdata</a>.</p>
<p>SEO appears to be the most prominent use case. In a post from 2018 <a href="https://brucelawson.co.uk/2018/content-needs-a-publication-date/">Bruce Lawson gives an example</a>, with example markup, where a combination of microdata and keeping your publication and modification dates up to date may help prioritize content in search results.</p>
<p>In a post from 2020 Scott Vinkle shows some <a href="https://scottvinkle.me/blogs/work/how-html-microdata-helps-with-accessibility">examples where microdata can help with accessibility</a>, most notably by improving Reader View. As a heavy Reader View user I’m adding this to my “try this out” list (Hot Microdata Summer?).</p>

      <div class="heading-wrapper">
        <h2 id="link-fragment-identifier">Link fragment identifier
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/hot-html-summer-attributes/#link-fragment-identifier">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Go to this <a href="https://web.dev/learn/html/attributes/#link_fragment_identifier">section at Learn HTML</a>.</p>
<blockquote>
<p>When a URL includes a hash mark (<code>#</code>) followed by a string of characters, that string is a fragment identifier. If that string matches an <code>id</code> of an element in the web page, the fragment is an anchor, or bookmark, to that element. The browser will scroll to the point where the anchor is defined.</p>
</blockquote>
<p>I always thought of this as the anchor link, so notch another “I learned the official name” on my HTML belt. The real reason I mention this section is that want to note how useful anchors are on content sites.</p>
<p>I use anchors here and find them handy when referencing something from a previous post. You’ll notice too that all my “Go to this section at Learn HTML” go directly the relevant section in the course thanks to the use of anchors (go link fragments identifiers!). This is allows me to create a good user experience, if you want to read the relevant passage you don’t have to scroll around the page to find it.</p>

      <div class="heading-wrapper">
        <h2 id="%3Clabel%3E"><code>&lt;label&gt;</code>
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/hot-html-summer-attributes/#%3Clabel%3E">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Go to this <a href="https://web.dev/learn/html/attributes/#label">section at Learn HTML</a>.</p>
<blockquote>
<p>While each label can be associated with exactly one form control, a form control may have more than one associated label.</p>
</blockquote>
<p>I did not know this, and I find it a little surprising to be honest. Off the top of my head I can’t think of an example where this would’ve been useful, but of course that doesn’t mean there aren’t valid or useful scenarios.</p>
<p>I’ll be on the lookout for examples in the wild, but I did find these handy <a href="https://scottaohara.github.io/tests/html-inputs/double-label.html">screen reader test cases and results</a> by Scott O’Hara from 2019. In most cases both labels were announced, but Safari and IE 11 only exposes one of the two labels. A few browser and screen reader combinations may have updated since then, but good to keep in mind if you find yourself wanting to use this approach.</p>

      <div class="heading-wrapper">
        <h2 id="contenteditable"><code>contenteditable</code>
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/hot-html-summer-attributes/#contenteditable">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Go to this <a href="https://web.dev/learn/html/attributes/#contenteditable">section at Learn HTML</a>.</p>
<blockquote>
<p>An element with the <code>contenteditable</code> attribute set to <code>true</code> is editable, is focusable, and is added to the tab order as if <code>tabindex=&quot;0&quot;</code> were set.</p>
</blockquote>
<p>I knew that you could make an element editable, but never had the occasion to do it, so I never looked it up. There’s a fun style editor example that might give you some clever ideas for next all your upcoming how-to posts.</p>
<p><strong>Update</strong>: Manuel Matuzović has a nice <code>contenteditable</code> <a href="https://codepen.io/matuzo/pen/YzaoRLJ">example CodePen</a> that includes custom data attributes discussed below. There’s also a <a href="https://www.matuzo.at/blog/2022/counting-children/">post with more details</a>.</p>

      <div class="heading-wrapper">
        <h2 id="custom-attributes">Custom attributes
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/hot-html-summer-attributes/#custom-attributes">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Go to this <a href="https://web.dev/learn/html/attributes/#custom-attributes">section at Learn HTML</a>.</p>
<blockquote>
<p>You can create any custom attribute you want by adding the <a href="https://developer.mozilla.org/docs/Web/HTML/Global_attributes/data-*"><code>data-</code></a> prefix. You can name your attribute anything that starts with <code>data-</code> followed by any lowercase series of characters that don’t start with <code>xml</code> and don’t contain a colon (<code>:</code>).</p>
</blockquote>
<p>I’ve used these! If you’ve used Bootstrap, especially anything involving toggling, like their <a href="https://getbootstrap.com/docs/5.3/components/collapse/">collapse component</a>, you probably have too. Because, as the course suggests…</p>
<blockquote>
<p>Custom properties are an excellent way of communicating application-specific information via JavaScript.</p>
</blockquote>
<p>Someday I’ll get around to creating something with these. Maybe.</p>

      ]]></content>
    </entry>
	
    
    <entry>
      <title>Hot HTML Summer: Headings and sections</title>
      <link href="https://danabyerly.com/notes/hot-html-summer-headings-and-sections/"/>
      <updated>2023-07-03T13:00:00Z</updated>
      <id>https://danabyerly.com/notes/hot-html-summer-headings-and-sections/</id>
      <content type="html"><![CDATA[
        <p class="caption">This post is a <a href="https://danabyerly.com/tag/hot-html-summer/">part of a series</a> where I write a post for each module of the <a href="https://web.dev/learn/html/">web.dev Learn HTML course</a>. I'll note things I didn't know, highlight interesting items, and generally enjoy having a Hot HTML Summer.</p>
<p>This post covers the <a href="https://web.dev/learn/html/headings-and-sections/">Headings and sections module of Learn HTML</a>. Each section below corresponds to a section in this module of the course. The quoted items are relevant passages from the course.</p>

      <div class="heading-wrapper">
        <h2 id="site-%3Cfooter%3E">Site <code>&lt;footer&gt;</code>
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/hot-html-summer-headings-and-sections/#site-%3Cfooter%3E">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Go to this <a href="https://web.dev/learn/html/headings-and-sections/#site_header">section at Learn HTML</a>.</p>
<blockquote>
<p>The implicit <code>role</code> for the site footer is <code>contentinfo</code>.</p>
</blockquote>
<p>Ha, answering a question I had in the <a href="https://danabyerly.com/notes/hot-html-summer-semantic-htmlml/">previous section</a>! And building on that information with more context…</p>
<blockquote>
<p>When a <code>&lt;footer&gt;</code> is a descendant of an <code>&lt;article&gt;</code>, <code>&lt;aside&gt;</code>, <code>&lt;main&gt;</code>, <code>&lt;nav&gt;</code>, or <code>&lt;section&gt;</code>, it’s not a landmark. If the post appears on its own, depending on the markup, that footer might get promoted.</p>
</blockquote>

      <div class="heading-wrapper">
        <h2 id="document-structure">Document structure
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/hot-html-summer-headings-and-sections/#document-structure">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Go to this <a href="https://web.dev/learn/html/headings-and-sections/#document_structure">section at Learn HTML</a>.</p>
<blockquote>
<p>A layout with a header, two sidebars, and a footer, is known as the <a href="https://web.dev/patterns/layout/holy-grail/">holy grail layout</a>.</p>
</blockquote>
<p>I did not know this had a name, although that layout was prominent during my time away from web dev. But I also didn’t know <a href="https://web.dev/patterns/layout/">these patterns had these names</a>. A bit searching shows holy grail to be a commonly used name, but not so much for the other ones, like <a href="https://web.dev/patterns/layout/fluffy-center/">Fluffy Center</a> and <a href="https://web.dev/patterns/layout/deconstructed-pancake/">Deconstructed Pancake</a>. I’ll look them over more closely (Hot Layout Patterns Summer!), but <a href="https://every-layout.dev/">Every Layout</a> is my go-to for layout patterns. Check it out if you haven’t already.</p>

      <div class="heading-wrapper">
        <h2 id="%3Csection%3E"><code>&lt;section&gt;</code>
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/hot-html-summer-headings-and-sections/#%3Csection%3E">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Go to this <a href="https://web.dev/learn/html/headings-and-sections/#section">section at Learn HTML</a>.</p>
<blockquote>
<p>The <code>&lt;section&gt;</code> element is used to encompass generic standalone sections of a document when there is no more specific semantic element to use. Sections should have a heading, with very few exceptions.</p>
</blockquote>
<p>Using the “should have a heading” guideline is a very easy and useful way to frame it. I can think of a few places where I’m using <code>&lt;section&gt;</code> incorrectly.</p>

      <div class="heading-wrapper">
        <h2 id="headings-%3Ch1%3E-%3Ch6%3E">Headings: <code>&lt;h1&gt;</code>-<code>&lt;h6&gt;</code>
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/hot-html-summer-headings-and-sections/#headings-%3Ch1%3E-%3Ch6%3E">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Go to this <a href="https://web.dev/learn/html/headings-and-sections/#headings_h1-h6">section at Learn HTML</a>.</p>
<blockquote>
<p>When a heading is nested in a document banner <code>&lt;header&gt;</code>, it is the heading for the application or site. When nested in <code>&lt;main&gt;</code>, whether or not it is nested within a <code>&lt;header&gt;</code> in <code>&lt;main&gt;</code>, it is the header for that page, not the whole site.</p>
</blockquote>
<p>I didn’t know this. I tend to keep my <code>&lt;h1&gt;</code> in <code>&lt;main&gt;</code> and treat it as a page title, but good to keep in mind for designs where it could be tempting to put the <code>&lt;h1&gt;</code> in <code>&lt;header&gt;</code>.</p>

      ]]></content>
    </entry>
	
    
    <entry>
      <title>Hot HTML Summer: Semantic HTML</title>
      <link href="https://danabyerly.com/notes/hot-html-summer-semantic-html/"/>
      <updated>2023-06-30T13:15:00Z</updated>
      <id>https://danabyerly.com/notes/hot-html-summer-semantic-html/</id>
      <content type="html"><![CDATA[
        <p class="caption">This post is a <a href="https://danabyerly.com/tag/hot-html-summer/">part of a series</a> where I write a post for each module of the <a href="https://web.dev/learn/html/">web.dev Learn HTML course</a>. I'll note things I didn't know, highlight interesting items, and generally enjoy having a Hot HTML Summer.</p>
<p>This post covers the <a href="https://web.dev/learn/html/semantic-html/">Semantic HTML module of Learn HTML</a>. Each section below corresponds to a section in this module of the course. The quoted items are relevant passages from the course.</p>

      <div class="heading-wrapper">
        <h2 id="accessibility-object-model-aom">Accessibility object model (AOM)
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/hot-html-summer-semantic-html/#accessibility-object-model-aom">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Go to this <a href="https://web.dev/learn/html/semantic-html/#accessibility_object_model_aom">section at Learn HTML</a>.</p>
<p>The thing I learned here is how detailed Chrome’s version of the accessibility tree is DevTools. By default you can only view one expanded node at a time, but there’s an explainer with video of the two-step process to enable the full tree view <a href="https://developer.chrome.com/blog/full-accessibility-tree/#full_accessibility_tree_in_devtools">in this Chrome Blog post</a>.</p>
<p>Also, after poking around with the accessibility tree in both Chrome and Firefox (my primary browser), I was wondering why the <code>&lt;footer&gt;</code> was displaying as <code>contentinfo</code> rather than <code>footer</code> when <code>&lt;main&gt;</code> displays as <code>main</code>.</p>
<p>I discovered the <a href="https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/Contentinfo_role">answer at MDN</a>…</p>
<blockquote>
<p>The <code>contentinfo</code> role defines a footer, containing identifying information such as copyright information, navigation links, and privacy statements, found on every document within a site. This section is commonly called a footer.</p>
</blockquote>
<p>I should probably improve my <a href="https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles">aria role</a> understanding with a Hot Aria Role Summer too.</p>
<p>I’ve decided to not to publish on weekends, the next post will be on Monday. Enjoy your Hot HTML Weekend!</p>

      ]]></content>
    </entry>
	
    
    <entry>
      <title>Hot HTML Summer: Metadata</title>
      <link href="https://danabyerly.com/notes/hot-html-summer-metadata/"/>
      <updated>2023-06-29T13:15:00Z</updated>
      <id>https://danabyerly.com/notes/hot-html-summer-metadata/</id>
      <content type="html"><![CDATA[
        <p class="caption">This post is a <a href="https://danabyerly.com/tag/hot-html-summer/">part of a series</a> where I write a post for each module of the <a href="https://web.dev/learn/html/">web.dev Learn HTML course</a>. I'll note things I didn't know, highlight interesting items, and generally enjoy having a Hot HTML Summer.</p>
<p>This post covers the <a href="https://web.dev/learn/html/metadata/">Metadata module of Learn HTML</a>. Each section below corresponds to a section in this module of the course. The quoted items are relevant passages from the course.</p>

      <div class="heading-wrapper">
        <h2 id="the-required-%3Cmeta%3E-tags-revisited">The required <code>&lt;meta&gt;</code> tags, revisited
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/hot-html-summer-metadata/#the-required-%3Cmeta%3E-tags-revisited">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Go to this <a href="https://web.dev/learn/html/metadata/#the_required_meta_tags_revisited">section at Learn HTML</a>.</p>
<blockquote>
<p>The <code>charset</code> attribute of the <code>&lt;meta&gt;</code> element came about in a unique manner. Originally the character set meta data was written as <code>&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=&lt;characterset&gt;&quot; /&gt;</code>, but so many developers mis-typed the <code>content</code> attribute as <code>content=&quot;text/html&quot; charset=&quot;&lt;characterset&gt;&quot;</code> that browsers began supporting charset as an attribute. It is standardized now in the HTML living standard as <code>&lt;meta charset=&lt;charset&gt;&quot; /&gt;</code>, where, for HTML,<code>&lt;charset&gt;</code> is the case-insensitive string “utf-8”.</p>
</blockquote>
<p>I’m enjoying the history and tea spilling aspects of this series.</p>

      <div class="heading-wrapper">
        <h2 id="pragma-directives">Pragma directives
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/hot-html-summer-metadata/#pragma-directives">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Go to this <a href="https://web.dev/learn/html/metadata/#pragma_directives">section at Learn HTML</a>.</p>
<blockquote>
<p>The <code>http-equiv</code> attribute has as its value a pragma directive. These directives describe how the page should be parsed. Supported <code>http-equiv</code> values enable setting directives when you are unable to set HTTP headers directly.</p>
</blockquote>
<p>What interests me about this is the flexibility.</p>
<blockquote>
<p>The specification defines seven <a href="https://html.spec.whatwg.org/multipage/semantics.html#pragma-directives">pragma directives</a>, most of which have other methods of being set. For example, while you can include a language directive with <code>&lt;meta http-equiv=&quot;content-language&quot; content=&quot;en-us&quot; /&gt;</code>, we have already discussed using the lang attribute on the HTML element, which is what should be used instead.</p>
</blockquote>
<p>For example, if you don’t have access to <code>&lt;html&gt;</code> to set the language at the site level (using the <a href="https://web.dev/learn/html/document-structure/#content_language">language attribute</a>, e.g., <code>&lt;html lang=&quot;en&quot;&gt;</code>), but you had the ability to add a <code>meta</code> tag, you could use <code>&lt;meta http-equiv=&quot;content-language&quot; content=&quot;en&quot; /&gt;</code>.</p>

      <div class="heading-wrapper">
        <h2 id="open-graph">Open Graph
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/hot-html-summer-metadata/#open-graph">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Go to this <a href="https://web.dev/learn/html/metadata/#open_graph">section at Learn HTML</a>.</p>
<blockquote>
<p>You can have different card images, titles, and descriptions for different social media sites or for different link parameters. For example, <a href="https://perfmattersconf.com/">https://perfmattersconf.com</a> sets different values for <code>og:image</code>, <code>og:title</code>, and <code>og:description</code> based on the parameter of the URL.</p>
</blockquote>
<p>Neat! I didn’t know about the URL parameter. Examples…</p>
<blockquote>
<p>If you enter <a href="https://perfmattersconf.com/?name=erica">https://perfmattersconf.com?name=erica</a> and <a href="https://perfmattersconf.com/?name=melanie">https://perfmattersconf.com?name=melanie</a> in <a href="https://cards-dev.twitter.com/validator">Twitter’s Card Validator</a>, you will see these two different cards; we provided different content even though they both link to the same conference home page.</p>
</blockquote>
<p>The Twitter Card Validator no longer works, but you can take a peak in DevTools to see the difference. Developer browsers such as <a href="https://polypane.app/">PolyPane</a> or <a href="https://sizzy.co/">Sizzy</a> include handy social card views as well.</p>
<p>I was pleased with myself that I didn’t find any surprises in the <a href="https://web.dev/learn/html/metadata/#open_graph">Open Graph section</a> (other than the URL parameter), or in the <a href="https://web.dev/learn/html/metadata/#other-useful-meta-information">Other useful meta information section</a>. They’re worth checking out if you haven’t worked with social cards or mobile icons often. Or even if you have!</p>

      ]]></content>
    </entry>
	
    
    <entry>
      <title>Hot HTML Summer: Document structure</title>
      <link href="https://danabyerly.com/notes/hot-html-summer-document-structure/"/>
      <updated>2023-06-28T13:30:00Z</updated>
      <id>https://danabyerly.com/notes/hot-html-summer-document-structure/</id>
      <content type="html"><![CDATA[
        <p class="caption">This post is a <a href="https://danabyerly.com/tag/hot-html-summer/">part of a series</a> where I write a post for each module of the <a href="https://web.dev/learn/html/">web.dev Learn HTML course</a>. I'll note things I didn't know, highlight interesting items, and generally enjoy having a Hot HTML Summer.</p>
<p>This post covers the <a href="https://web.dev/learn/html/document-structure/">Document structure module of Learn HTML</a>. Each section below corresponds to a section in this module of the course. The quoted items are relevant passages from the course.</p>

      <div class="heading-wrapper">
        <h2 id="%3Cdoctype-html%3E"><code>&lt;!DOCTYPE html&gt;</code>
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/hot-html-summer-document-structure/#%3Cdoctype-html%3E">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Go to this <a href="https://web.dev/learn/html/document-structure/#lessdoctype-htmlgreater">section at Learn HTML</a>.</p>
<blockquote>
<p>If omitted, browsers will use a different rendering mode known as <a href="https://developer.mozilla.org/docs/Web/HTML/Quirks_Mode_and_Standards_Mode">quirks mode</a></p>
</blockquote>
<p>I didn’t know this. And, I can’t say that I could explain quirks mode in detail if asked about it, so off to the <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Quirks_Mode_and_Standards_Mode">quirks mode page</a>…</p>
<blockquote>
<p>There are now three modes used by the layout engines in web browsers: quirks mode, limited-quirks mode, and no-quirks mode. In <strong>quirks mode</strong>, layout emulates behavior in Navigator 4 and Internet Explorer 5. This is essential in order to support websites that were built before the widespread adoption of web standards. In <strong>no-quirks mode</strong>, the behavior is (hopefully) the desired behavior described by the modern HTML and CSS specifications. In <strong>limited-quirks mode</strong>, there are only a very small number of quirks implemented.</p>
</blockquote>
<p>Fascinating. Off to the<a href="https://quirks.spec.whatwg.org/#history"> history section of the WHATWG quirks spec</a> to learn more…</p>
<blockquote>
<p>Browsers have several rendering modes to render HTML documents. The reason for this is basically a historical accident. The CSS specification was incompatible with the behavior of existing browsers which existing Web content relied on. In order to comply with the specification while not breaking existing content, browsers introduced a new rendering mode (no-quirks mode).</p>
</blockquote>
<p>It’s great to know the backstory of how things came about. The particulars of the <a href="https://quirks.spec.whatwg.org/">spec for quirks mode</a> are worth a look if you’ve never read it, or had to deal with it directly.</p>

      <div class="heading-wrapper">
        <h2 id="content-language">Content language
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/hot-html-summer-document-structure/#content-language">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Go to  this <a href="https://web.dev/learn/html/document-structure/#content_language">section at Learn HTML</a>.</p>
<blockquote>
<p>The <code>lang</code> attribute is not limited to the <code>&lt;html&gt;</code>tag. If there is text within the page that is in a language different from the main document language, the <code>lang</code> attribute should be used to identify exceptions to the main language within the document.</p>
</blockquote>
<p>I only recently learned this because some smart person somewhere included it in article I was reading, or mentioned it on Mastodon, although I can’t remember who or where. But I do remember thinking I should make note and check some of my sites to see where to add it, specifically in my <a href="https://danabyerly-junkdrawer.website/tag/tv/">TV posts at the Junk Drawer</a> where I try to use the language of the country of origin for the title of non-US shows.</p>

      <div class="heading-wrapper">
        <h2 id="other-uses-of-the-%3Clink%3E-element">Other uses of the <code>&lt;link&gt;</code> element
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/hot-html-summer-document-structure/#other-uses-of-the-%3Clink%3E-element">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Go to this <a href="https://web.dev/learn/html/document-structure/#other_uses_of_the_link_element">section at Learn HTML</a>.</p>
<blockquote>
<p>There are currently <a href="https://html.spec.whatwg.org/multipage/links.html#linkTypes">25 available values for the <code>rel</code> attribute</a> that can be used with <code>&lt;link&gt;</code>, <code>&lt;a&gt;</code> and <code>&lt;area&gt;</code>, or <code>&lt;form&gt;</code>, with a few that can be used with all.</p>
</blockquote>
<p>I’ve used around 10 or so of the 25, and after <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel">reviewing them all more closely at MDN</a> I will be on the lookout for examples of <code>rel=&quot;author&quot;</code> and <code>rel=&quot;bookmark&quot;</code> in the wild.</p>

      <div class="heading-wrapper">
        <h2 id="scripts">Scripts
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/hot-html-summer-document-structure/#scripts">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Go to this <a href="https://web.dev/learn/html/document-structure/#scripts">section at Learn HTML</a>.</p>
<blockquote>
<p>With <code>defer</code>, HTML rendering is not blocked during the download, and the JavaScript only executes after the document has otherwise finished rendering. With <code>async</code>, rendering isn’t blocked during the download either, but once the script has finished downloading, the rendering is paused while the JavaScript is executed.</p>
</blockquote>
<p>There’s a good image illustrating the difference in rendering between the <code>defer</code> and <code>async</code> attributes of <code>&lt;script&gt;</code>.  The written description above is good too, but the illustration locked it in for me.</p>

      ]]></content>
    </entry>
	
    
    <entry>
      <title>Hot HTML Summer: Overview</title>
      <link href="https://danabyerly.com/notes/hot-html-summer-overview/"/>
      <updated>2023-06-27T14:00:00Z</updated>
      <id>https://danabyerly.com/notes/hot-html-summer-overview/</id>
      <content type="html"><![CDATA[
        <p class="caption">This post is a <a href="https://danabyerly.com/tag/hot-html-summer/">part of a series</a> where I write a post for each module of the <a href="https://web.dev/learn/html/">web.dev Learn HTML course</a>. I'll note things I didn't know, highlight interesting items, and generally enjoy having a Hot HTML Summer.</p>
<p>This post covers the <a href="https://web.dev/learn/html/overview/">Overview module of Learn HTML</a>. Each section below corresponds to a section in this module of the course. The quoted items are relevant passages from the course.</p>

      <div class="heading-wrapper">
        <h2 id="elements">Elements
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/hot-html-summer-overview/#elements">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Go to this <a href="https://web.dev/learn/html/overview/#elements">section at Learn HTML</a>.</p>
<blockquote>
<p>The entire thing—the opening tag, closing tag, and the content—is the element.</p>
</blockquote>
<p>I thought only the “tag” was the element.</p>
<blockquote>
<p>There are two types of elements: replaced and non-replaced.</p>
</blockquote>
<p>I also didn’t know of this categorization!</p>
<blockquote>
<p>Void elements are all self-closing elements and are represented by one tag. This means there is no such thing as a closing tag for a void element.</p>
</blockquote>
<p>I didn’t know the name for this either. Should I be embarrassed yet?</p>
<blockquote>
<p>The slash at the end is old school.</p>
</blockquote>
<p>My new band name.</p>

      <div class="heading-wrapper">
        <h2 id="elements-attributes-and-javascript">Elements, attributes, and JavaScript
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/hot-html-summer-overview/#elements-attributes-and-javascript">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Go to this <a href="https://web.dev/learn/html/overview/#element,-attributes,-and-javascript">section at Learn HTML</a>.</p>
<blockquote>
<p>There is an interface to define the functionality of every HTML element. The HTML DOM API provides access to and control of every HTML element via the DOM, providing interfaces for the HTML element and all the HTML classes that inherit from it.</p>
</blockquote>
<p>The areas where HTML and JavaScript intersect are my weakest. I only know rudimentary JavaScript, mostly just light DOM manipulation. My current HTML skills are focused on markup and document structure rather than the programatic aspects. Perhaps Hot HTML Summer will change that.</p>
<p>All of the sections or passages that cover APIs are likely to be ones where I’m learning the most. In this section I stepped away to read the <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTML_DOM_API">MDN DOM API page</a>, and then came back to re-read the section again. I’ll probably be doing a lot of this.</p>
<p>I have a joke with myself that I’ve had for last 25 or so years… “Some day I will learn JavaScript”. I half-heartedly started trying to learn JavaScript with the O’Reilly Definitive Guide first edition in the late 90s. I got rid of it during a move, but I still have the slim Pocket Reference as a reminder.</p>
<p>Admittedly the way I’ve tried to learn JavaScript is probably how most JavaScript developers try to learn CSS, by poking at it and treating as a collection of “tricks”. I really should give it a non-half-hearted try, but we’ll save that for another day, or summer.</p>

      ]]></content>
    </entry>
	
    
    <entry>
      <title>Hot HTML Summer</title>
      <link href="https://danabyerly.com/notes/hot-html-summer/"/>
      <updated>2023-06-26T15:00:00Z</updated>
      <id>https://danabyerly.com/notes/hot-html-summer/</id>
      <content type="html"><![CDATA[
        <p>Nothing says summer like sitting in a cool, shaded room while writing some HTML.</p>
<p>Last fall when Estelle Weyl’s <a href="https://web.dev/learn/html/">Learn HTML course</a> was <a href="https://web.dev/introducing-learn-html/">announced at Google’s web.dev</a> I took a quick look and made a mental note to come back to it.</p>
<blockquote>
<p>If you’ve been building websites for years, this course may fill in gaps in knowledge that you didn’t even know you had.</p>
</blockquote>
<p>The content I’m here for! Despite writing HTML for over 25 years I have no doubt there are plenty of things I don’t know.</p>
<p>Part of the reason I started this site was to have a place to write about things I’m working on or learning. It’s been both fun and helpful. There’s always something to learn, even in areas where I’m the most comfortable and familiar.</p>
<p>With that in mind I’m going write a post for each section of <a href="https://web.dev/learn/html/">Learn HTML</a>, 20 in all. I’ll note things I didn’t know, highlight interesting items and generally enjoy having a Hot HTML Summer. I’ve already written the first five as a test to see if the series would be worthy blog fodder. I’ll let you be the judge of that!</p>
<p>I don’t have a time frame other than “summer”. I’ll publish the first five over the coming days, one per day, and then the rest as I complete them. Who knows, I might even find an idea for this year’s <a href="https://mastodon.social/@matuzo@front-end.social/110537092117831699">HTMHell Advent calendar</a>! Happy Hot HTML Summering.</p>

      ]]></content>
    </entry>
	
    
    <entry>
      <title>Junk Drawer updates</title>
      <link href="https://danabyerly.com/notes/junk-drawer-updates/"/>
      <updated>2023-05-05T00:00:00Z</updated>
      <id>https://danabyerly.com/notes/junk-drawer-updates/</id>
      <content type="html"><![CDATA[
        <p>After several weeks of futzing with the homepage layout, I finally integrated some new features over at the <a href="https://danabyerly-junkdrawer.website/">Junk Drawer</a>. Earlier in the year I mentioned <a href="https://danabyerly.com/notes/regaining-momentum/#the-junk-drawer">wanting to add a couple new things</a>, both using Airtable as a content source. Since then I also decided to pull in my most recent <a href="https://pixelfed.social/i/web/profile/396067586349556009">image from Pixelfed</a>.</p>
<p>The Junk Drawer is now pulling the <a href="https://danabyerly-junkdrawer.website/blog/">blog</a> from WordPress, two different sources from Airtable (<a href="https://danabyerly-junkdrawer.website/tv-blurbs/">TV Blurbs</a> and <a href="https://danabyerly-junkdrawer.website/wake-up-songs/">Wake Up Songs</a>), and the latest photo from Pixelfed (on the <a href="https://danabyerly-junkdrawer.website/">homepage only</a>). It also includes some markdown here and there. <a href="https://www.11ty.dev/">Eleventy</a> not only makes this possible, it makes it very easy. If you’re interested in using WordPress with Eleventy I wrote a two part series (<a href="https://danabyerly.com/articles/wordpress-and-eleventy-part-one-wordpress/">part one</a>, <a href="https://danabyerly.com/articles/wordpress-and-eleventy-part-two-eleventy/">part two</a>).</p>

      <div class="heading-wrapper">
        <h2 id="tv-blurbs-and-wake-up-songs">TV Blurbs and Wake Up Songs
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/junk-drawer-updates/#tv-blurbs-and-wake-up-songs">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>I talked a bit about each of these sections <a href="https://danabyerly.com/notes/regaining-momentum/#the-junk-drawer">at this site</a>, and at the <a href="https://danabyerly-junkdrawer.website/blog/new-junk-in-the-drawer/">Junk Drawer</a>. Content and concept wise they’re both straightforward, and are pretty much what they sound like. Each has a listing on the homepage and each has its own listing page.</p>
<p>The integration was also straightforward since I’ve used Airtable and Eleventy in the past. I’m using the <a href="https://danabyerly.com/articles/using-airtable-with-eleventy/#api-call-and-listing-records">same call to Airtable</a> that I included in my 2020 article on using <a href="https://danabyerly.com/articles/using-airtable-with-eleventy/">Airtable and Eleventy</a>. I <a href="https://support.airtable.com/docs/how-to-create-a-form-in-airtable">created a form</a> for each base to make adding new songs or blurbs easy. Deployments at Netlify are triggered by a new row using Zapier.</p>
<p>Right now both are just a list in chronological order on their respective listing pages. I’m currently thinking about ways to improve organization, particularly to the TV Blurbs. My current thinking is to add a way to view all blurbs for a single series or film and a permalink for each blurb.</p>

      <div class="heading-wrapper">
        <h2 id="the-latest-from-pixelfed">The latest from Pixelfed
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/junk-drawer-updates/#the-latest-from-pixelfed">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>When I started using Mastodon with regularity I thought about bringing my toots into the Junk Drawer using RSS. That lead me to a helpful article by Raymond Camden on <a href="https://www.raymondcamden.com/2022/03/08/including-rss-content-in-your-eleventy-site">bringing RSS content into an Eleventy site</a>. I ditched the idea, but kept the link, and it came in handy when when I decided to pull photos in from Pixelfed.</p>
<p>While going the RSS route is easy from an integration standpoint, there are some limitations and annoyances. The ones I encountered were:</p>
<ul>
<li>Only the first 10 entries are available via RSS.</li>
<li>The image and summary are a single element, meaning there’s no way to display only the image (or rather, if there is a way, I didn’t find it).</li>
<li>But, you can display only the summary text without the image.</li>
<li>There are inline styles and line breaks in the summary text.</li>
<li>The images are fairly big file size wise and only available in JPG format.</li>
</ul>
<p>Since I’m only pulling in one image I can live with the downsides for now. I was able to make some adjustments to the inline styles by holding my nose and typing <code>!important</code>, and I optimize the images before uploading to the Pixelfed to help with performance.</p>
<p>I might look into using the <a href="https://docs.pixelfed.org/technical-documentation/api/">Pixelfed API</a> in combination with <a href="https://www.11ty.dev/docs/plugins/fetch/">eleventy-fetch</a> and <a href="https://www.11ty.dev/docs/plugins/image/">eleventy-img</a>, but  ultimately I’d really like to go full-on  <a href="https://indieweb.org/POSSE">POSSE</a> and create a photo section or standalone site to syndicate elsewhere. I’m not going to get to that anytime soon, but for now having the latest image from Pixelfed in the Junk Drawer in a step in that direction.</p>

      <div class="heading-wrapper">
        <h2 id="homepage-layout">Homepage layout
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/junk-drawer-updates/#homepage-layout">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Working out how to integrate the new elements into the homepage was the most challenging part. Originally I imaged it as three listing columns, but that was boring even by my boring standards. Once I got the hero area settled the rest of it fell into place.</p>
<p>I still might work on the background image of the “writing” section, but think the graph paper is OK for now. I’m not a clever visual designer, but I would be happy if I could figure out how make it feel more like a junk drawer, whatever that means.</p>
<p>One quasi-junk drawer visual element is the quasi-Polaroid framing for the Pixelfed image. I wanted it to look like a Polaroid photo was thrown on a table, or in a junk drawer. Fortunately Set Studio’s weekly mailing, <a href="https://set.studio/the-index-issue-8/">The Index</a>, included the homepage for <a href="https://shantellsans.com/">Shantell Sans</a>, a lovely new hand-written font, around the time I was trying to figure this out. Using a hand-written font for the the “Latest from Pixelfed…” heading in combination with the Polaroid frame brought the exact vibe I was trying to create.</p>

      <div class="heading-wrapper">
        <h2 id="whats-next">What’s next
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/junk-drawer-updates/#whats-next">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>I don’t have a timeline for adding some better organization to TV Blurbs or figuring out how to do a photo site or section. With the new additions I do have a nice low key groove of posing Blurbs, Wake Up Songs and the occasional Pixelfed image, which feels nice.</p>
<p>Around here I’m hoping to <a href="https://danabyerly.com/notes/year-two-in-the-books/#whats-next">finally do a little tidying</a> in the Projects section a tidying. I’ve already <a href="https://danabyerly.com/changelog/2023-03-20/">removed some older projects</a> that are no longer active, and next up I’d like to spruce up the landing page a bit.</p>

      ]]></content>
    </entry>
	
    
    <entry>
      <title>Upgrading to Eleventy 2.0.0</title>
      <link href="https://danabyerly.com/notes/upgrading-to-eleventy-2-0-0/"/>
      <updated>2023-02-26T00:00:00Z</updated>
      <id>https://danabyerly.com/notes/upgrading-to-eleventy-2-0-0/</id>
      <content type="html"><![CDATA[
        <p>Ah, Eleventy. Just like the <a href="https://danabyerly.com/notes/upgrading-to-eleventy-1-0-0/">upgrade to v1.0.0</a>, you could not ask for an easier and less problematic major upgrade. Eric Bailey put it best in a <a href="https://social.ericwbailey.website/@eric/109914908787346813">three toot thread</a></p>
<blockquote>
<p>When I update the site to use version 2.0.0 I’ll actually be removing dependencies, and not adding more. I am also anticipating next to no adjustments to the site’s underlying code.</p>
<p>That’s rare and special.</p>
</blockquote>
<p>Indeed. Just like the update to v1.0.0 I only encountered a couple of build fails at Netlify that were easy to overcome. I also tracked the node_modules directory size reduction for each of the eight sites I updated. More on both of those in a bit.</p>
<p>If you’re not sure what’s new in v2.0.0 the Eleventy blog lists all the <a href="https://www.11ty.dev/blog/eleventy-v2/">features and breaking changes</a>. Stephanie Eckles also has a useful in-depth look at the <a href="https://11ty.rocks/posts/new-features-upgrade-considerations-eleventy-version-2/">new features and considerations</a> at 11ty Rocks.</p>

      <div class="heading-wrapper">
        <h2 id="step-by-step-upgrade">Step-by-step upgrade
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/upgrading-to-eleventy-2-0-0/#step-by-step-upgrade">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Also <a href="https://danabyerly.com/notes/upgrading-to-eleventy-1-0-0/">like last time</a>, I made a little step-by-step cheat sheet for myself so I  could easily copy and paste commands, snippets and the like. It’s based on the instructions in the <a href="https://github.com/11ty/eleventy-upgrade-help">Eleventy Upgrade Helper plugin</a>.</p>
<ol>
<li>Upgrade Eleventy to v2.0.0</li>
<li>Install Eleventy Upgrade Help plugin</li>
<li>Add Eleventy Upgrade Help plugin to your site</li>
<li>Run <code>build</code> command and evaluate plugin output, address any issues</li>
<li>Uninstall Eleventy Upgrade Help plugin and remove from your site</li>
<li>Optional: Uninstall Browsersync and remove any configurations from your site</li>
</ol>

      <div class="heading-wrapper">
        <h3 id="upgrade-to-version-200">Upgrade to version 2.0.0
      </h3>
        <a class="anchor-link" href="https://danabyerly.com/notes/upgrading-to-eleventy-2-0-0/#upgrade-to-version-200">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Unlike the the v1.0.0 upgrade, Eleventy gets upgraded first.</p>
<pre class="language-bash"><code class="language-bash"><span class="token function">npm</span> <span class="token function">install</span> @11ty/eleventy@2</code></pre>
<p>A couple of my sites I had some security warnings that were easy to fix with <code>npm audit fix</code>, mostly for Luxon. I chose to address those at this step.</p>

      <div class="heading-wrapper">
        <h3 id="install-the-upgrade-help-plugin-and-configure">Install the Upgrade Help plugin and configure
      </h3>
        <a class="anchor-link" href="https://danabyerly.com/notes/upgrading-to-eleventy-2-0-0/#install-the-upgrade-help-plugin-and-configure">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><pre class="language-bash"><code class="language-bash"><span class="token function">npm</span> <span class="token function">install</span> @11ty/eleventy-upgrade-help@2</code></pre>
<p>Add the plugin to your <code>.eleventy.js</code> or newly available naming of <code>eleventy.config.js</code>:</p>
<pre class="language-js"><code class="language-js"><span class="token keyword">const</span> UpgradeHelper <span class="token operator">=</span> <span class="token function">require</span><span class="token punctuation">(</span><span class="token string">"@11ty/eleventy-upgrade-help"</span><span class="token punctuation">)</span><span class="token punctuation">;</span><br /><br />module<span class="token punctuation">.</span><span class="token function-variable function">exports</span> <span class="token operator">=</span> <span class="token keyword">function</span><span class="token punctuation">(</span><span class="token parameter">eleventyConfig</span><span class="token punctuation">)</span> <span class="token punctuation">{</span><br /> <span class="token comment">// Should be the last plugin if there are existing plugins</span><br />  eleventyConfig<span class="token punctuation">.</span><span class="token function">addPlugin</span><span class="token punctuation">(</span>UpgradeHelper<span class="token punctuation">)</span><span class="token punctuation">;</span><br /><span class="token punctuation">}</span><span class="token punctuation">;</span></code></pre>

      <div class="heading-wrapper">
        <h3 id="run-the-build-command-and-evaluate-the-plugin-output">Run the build command and evaluate the plugin output
      </h3>
        <a class="anchor-link" href="https://danabyerly.com/notes/upgrading-to-eleventy-2-0-0/#run-the-build-command-and-evaluate-the-plugin-output">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>I only had <code>serve</code> and <code>production</code> commands for my sites, so I added a <code>build</code> command. I don’t know if it’s problematic to run serve instead of build for this step. I’m guessing not, but if you don’t have a build command you can add one to the <code>scripts</code> section of your <code>package.json</code> file:</p>
<pre class="language-json"><code class="language-json"><span class="token property">"scripts"</span><span class="token operator">:</span> <span class="token punctuation">{</span><br />	<span class="token property">"start"</span><span class="token operator">:</span> <span class="token string">"npx eleventy --serve"</span><span class="token punctuation">,</span><br />	<span class="token property">"build"</span><span class="token operator">:</span> <span class="token string">"npx eleventy"</span><span class="token punctuation">,</span> <span class="token comment">/* &lt;--- add this! */</span><br />	<span class="token property">"production"</span><span class="token operator">:</span> <span class="token string">"NODE_ENV=production eleventy"</span><br /><span class="token punctuation">}</span><span class="token punctuation">,</span></code></pre>
<p>Then run the build command:</p>
<pre class="language-bash"><code class="language-bash"><span class="token function">npm</span> run build</code></pre>
<p>The output for this version is pretty verbose compared to v1.0.0 and includes a lot helpful information should you encounter issues. Instead of adding it here I <a href="https://gist.github.com/superterrific/238c880e7b9542c96558153a5983c73b">created a Gist </a> if you’d like see what to expect.</p>
<p>Since I didn’t have any issues this was pretty much a formality. If you use Liquid, Silvestar Bistrović <a href="https://www.silvestar.codes/articles/migrating-to-eleventy-2-0/">has a helpful post</a> on the issues he encountered and how he addressed them.</p>

      <div class="heading-wrapper">
        <h3 id="uninstall-the-upgrade-help-plugin-and-remove-from-config-file">Uninstall the Upgrade Help plugin and remove from config file
      </h3>
        <a class="anchor-link" href="https://danabyerly.com/notes/upgrading-to-eleventy-2-0-0/#uninstall-the-upgrade-help-plugin-and-remove-from-config-file">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><pre class="language-bash"><code class="language-bash"><span class="token function">npm</span> uninstall @11ty/eleventy-upgrade-help@2</code></pre>
<p>And remove the configuration from your <code>.eleventy.js</code> or <code>eleventy.config.js</code> file.</p>
<p>At this point I also removed my configuration for Browsersync and uninstalled it.</p>
<pre class="language-bash"><code class="language-bash"><span class="token function">npm</span> uninstall browser-sync</code></pre>
<p>One thing I’m hoping to see added soon is the ability to configure the new <a href="https://www.11ty.dev/docs/dev-server/">Eleventy Dev Server</a> to open when the server starts. This is the only thing I miss from Browsersync, but it’s not worth using Browsersync just for that. There’s currently a feature request if you’d to <a href="https://github.com/11ty/eleventy-dev-server/issues/28">add your comment or vote</a> (by adding a thumbs up emoji).</p>

      <div class="heading-wrapper">
        <h2 id="failed-builds-at-netlify">Failed builds at Netlify
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/upgrading-to-eleventy-2-0-0/#failed-builds-at-netlify">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>When I upgraded to v1.0.0 one site had <a href="https://danabyerly.com/notes/upgrading-to-eleventy-1-0-0/#failed-build">failed builds at Netlify</a> due to a unsupported Node version. And of course the Eleventy community came through with several options on how to handle the situation.</p>
<p>This time around I had two sites that failed because they were trying to build with an older version of Node. I knew what to do to fix the issue, but I wanted to understand why it was happening.</p>
<p>Dan Urbanowicz has a handy post that covers three options for <a href="https://danurbanowicz.com/posts/2022/10/19/how-to-manually-set-the-node-version-for-your-netlify-builds/">manually setting the Node version for Netlify builds</a>.</p>
<ul>
<li>Using a .nvmrc file</li>
<li>Setting a build environment variable for the site in Netlify’s admin section</li>
<li>Adding a build.environment to the netlify.toml file</li>
</ul>
<p>Another option is to set it in the engines section of your <code>package.json</code> file, but apparently that approach isn’t currently supported by Netlify (long standing <a href="https://github.com/netlify/build-image/issues/53">open issue here</a>).</p>
<p>Neither of my failed build sites specified the Node version in any of these places.  And since the site passed on Node version in the Upgrade Help plugin I moved on to Netlify to find an anwser.</p>
<p>When there is no Node version specified, Netlify will use the default version set for the site’s build image. The current build image is Ubuntu Focal 20.04. The <a href="https://docs.netlify.com/configure-builds/available-software-at-build-time/">default Node version</a> for this build image is 16. The version installed for my failed build sites is 12.18.0.</p>
<p>My deploy logs show that the build is using a cached version of 12.18.0</p>
<pre class="language-html"><code class="language-html">12:32:47 PM: Started restoring cached Node.js version<br />12:32:49 PM: Finished restoring cached Node.js version<br />12:32:49 PM: v12.18.0 is already installed.<br />12:32:49 PM: Now using node v12.18.0 (npm v6.14.4)</code></pre>
<p>Once I figured this out I removed the explicitly set Node version from my site and tried a build again, knowing it would fail. Then I retried the build with the <a href="https://docs.netlify.com/site-deploys/manage-deploys/#retry-deploy-from-latest-branch-commit">option to clear the cache</a>, but no luck. After rummaging around the Netlify Support Forum I found a <a href="https://answers.netlify.com/t/build-fails-with-focal-image-due-to-unwanted-old-ruby/40682">similar issue that turned out to be on point</a>.</p>
<blockquote>
<p>Why is my build using all these old versions by default, rather than the Focal defaults?  It feels like Netlify somehow cached dependency versions from Trusty (older build image) but isn’t updating them for Focal defaults?</p>
</blockquote>
<p>This is what I suspected was happening for my failed builds too. The <a href="https://answers.netlify.com/t/build-fails-with-focal-image-due-to-unwanted-old-ruby/40682/4">suggested fix</a> for this issue also worked for mine.</p>
<blockquote>
<p>go to <strong>Site settings &gt; Build &amp; deploy &gt; Build settings</strong> , select <strong>Link to a different repository</strong> , and then select the same repository to re-link your site to it.</p>
</blockquote>
<p>According to the reply from support, the versions for major languages is set when a site is first created. My sites with build fails were created a few years ago when the default build image was Ubuntu Xenial. When I updated those sites to Ubuntu Focal the cached major language versions were not updated to match the Focal defaults. By reconnecting the repository I  was able to get the updated default language versions.</p>
<p>If you have this issue and don’t feel like reconnecting your repos you can always set your Node version using one of the methods mentioned above (.nvrmc file, netlify.toml or build environment variable). If you use one of these methods Dan Urbanowicz’s article tipped a handy set and forget approach.</p>
<p>Instead of setting an explicit version, e.g., 18.12.1, the LTS or latest version can be set using <code>lts/*</code>. Before I discovered the repo reconnection fix I added a <code>build.environment</code> section my <code>netlify.toml</code>, which worked like a charm.</p>
<pre class="language-js"><code class="language-js"><span class="token punctuation">[</span>build<span class="token punctuation">.</span>environment<span class="token punctuation">]</span><br />  <span class="token constant">NODE_VERSION</span> <span class="token operator">=</span> <span class="token string">"lts/*"</span></code></pre>

      <div class="heading-wrapper">
        <h2 id="spring-cleaning-for-node_modules">Spring cleaning for node_modules
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/upgrading-to-eleventy-2-0-0/#spring-cleaning-for-node_modules">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Back to Eleventy, I had a <a href="https://mastodon.social/@superterrific/109899278884322557">little thread at Mastodon</a> (OK, two toots) as I updated my sites throughout week, mainly to share my awe at the massive reduction in dependencies. As promised, here are all the sites I updated with the before and after size of the node_modules directory (in disk size).</p>
<table>
<thead>
<tr>
<th>Site</th>
<th>Original Size</th>
<th>New Size</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="http://danabyerly.com/">danabyerly.com</a></td>
<td>92.7 MB</td>
<td>45.8 MB</td>
</tr>
<tr>
<td><a href="https://danabyerly-junkdrawer.website/">danabyerly-junkdrawer.website</a></td>
<td>92.4 MB</td>
<td>40.4 MB</td>
</tr>
<tr>
<td><a href="http://cats-in-residence.org/">cats-in-residence.org</a></td>
<td>86.2 MB</td>
<td>38.6 MB</td>
</tr>
<tr>
<td><a href="http://horseracingdatasets.com/">horseracingdatasets.com</a></td>
<td>59.6 MB</td>
<td>32.5 MB</td>
</tr>
<tr>
<td><a href="http://omnisurface-stars.com/">omnisurface-stars.com</a></td>
<td>82.6 MB</td>
<td>33.2 MB</td>
</tr>
<tr>
<td><a href="http://pile-of-hrefs.com/">pile-of-hrefs.com</a></td>
<td>123.3 MB 👀</td>
<td>30.7 MB</td>
</tr>
<tr>
<td><a href="http://rhondalieberman.com/">rhondalieberman.com</a></td>
<td>83.7 MB</td>
<td>33.2 MB</td>
</tr>
<tr>
<td><a href="http://stakes-profiles.com/">stakes-profiles.com</a></td>
<td>90.5 MB</td>
<td>41.3 MB</td>
</tr>
</tbody>
</table>

      <div class="heading-wrapper">
        <h2 id="happy-upgrading">Happy upgrading
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/upgrading-to-eleventy-2-0-0/#happy-upgrading">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>You may encounter issues I didn’t depending on your set-up. If that’s the case I wish you luck!</p>

      ]]></content>
    </entry>
	
    
    <entry>
      <title>Regaining momentum</title>
      <link href="https://danabyerly.com/notes/regaining-momentum/"/>
      <updated>2023-02-10T00:00:00Z</updated>
      <id>https://danabyerly.com/notes/regaining-momentum/</id>
      <content type="html"><![CDATA[
        <p>After a little break during the holidays I had some nice blogging momentum over at the <a href="https://danabyerly-junkdrawer.website/">Junk Drawer</a> in the beginning of January. And then Covid <a href="https://danabyerly-junkdrawer.website/blog/the-kraken-got-me/">finally caught up with me</a>.</p>
<p>Before that unfortunate moment I was gearing up to do a post here. Now that I’m slowly regaining a reasonable amount of energy it seems like a good time for an update.</p>

      <div class="heading-wrapper">
        <h2 id="the-studio">The Studio
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/regaining-momentum/#the-studio">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>I’m still noodling on a site for freelancing. At the end of last year I replaced the Featured Projects section of the homepage with a <a href="https://danabyerly.com/notes/shifting-things-around/">From the Studio</a> section. I’ve been focusing mostly on figuring what I’ll be offering and how to position it.</p>
<p>I have a current client that’s on hold due to their enormous workload and a potential change in their business. We’ve already done research and I’ve shared my findings and recommendations. We had worked through that and had a plan when the sudden onslaught and potential shift happened. So for now that’s on hold, which is fine and worked out well with my needing to take time off thanks to Covid.</p>
<p>I would like to have that site finished to round out my example offerings before rolling out a studio site. I currently have a personal site for a creative professional, a site for an art project and the new one is for a small business (a Lawyer). This is a good collection of the types of sites I’d like to be doing. Everyone deserves a nice site, not just people and small businesses who can afford agencies (who frequently build inaccessible, slow, bloated sites “that look nice”).</p>

      <div class="heading-wrapper">
        <h2 id="the-junk-drawer">The Junk Drawer
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/regaining-momentum/#the-junk-drawer">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>So far the <a href="https://danabyerly-junkdrawer.website/">Junk Drawer</a> is just a <a href="https://danabyerly-junkdrawer.website/blog/">blog</a>. Not that that’s a bad thing! I’d like to also do some sort of archive-like thing, but I haven’t come up with anything yet. In the meantime I had a couple of fun ideas that I’m going to add.</p>
<p>Last year I put together an Airtable base to track the song in my head when I wake up. I had a couple of days where I noticed that whatever song was in my head when I woke up seemed so random. I hadn’t heard it or thought of it in a while, yet there it was. I did it for a little while but since I didn’t have a plan it was easy to let it slip.</p>
<p>In the beginning of the year I was thinking about microblogging and quickly came up with an idea. I thought it would be fun to a TV blurbs microblog. Basically just small, random thoughts I have while watching TV, something <a href="https://danabyerly-junkdrawer.website/tag/tv/">I do a lot of</a>. My tendency is always “I’ll just start a new site!” but then I decided it seemed like good Junk Drawer fodder and decided to integrate it there.</p>
<p>The Junk Drawer is already using WordPress so my first thought was to create a new category in WordPress (TV Blurbs) and handle it like a separate collection in Eleventy, similar to how I have <a href="https://danabyerly.com/notes/">Notes</a> and <a href="https://danabyerly.com/articles/">Articles</a> here. I anticipate that my main publishing use case will be firing off blurbs from my phone as I lay in bed and watch TV. I’ve heard the WordPress iOS app is nice to use so I took a look.</p>
<figure class="fig-container">
  <picture>
    <source srcset="https://danabyerly.com/img/wp-app-store.avif" type="image/avif" />
    <source srcset="https://danabyerly.com/img/wp-app-store.webp" type="image/web" />
    <img src="https://danabyerly.com/img/wp-app-store.jpg" alt="The data linked to you section of the WordPress iOS application. Contact info, search history, identifiers, diagnostics, user content, browsing history and usage data are listed as data linked to your identity and sent to WordPress." loading="lazy" />
  </picture>
  <figcaption>
    Does WordPress really need to collect all that data and link it to your identity to let you post to your own site? No, it doesn't.
  </figcaption>
</figure>
<p>Yeah. No. Automatic does not need that much of my data. Since I already know how to pull data into Eleventy from Airtable this was my next thought. I wrote an article about <a href="https://danabyerly.com/articles/using-airtable-with-eleventy/">using Airtable with Eleventy</a> a couple of years that’s still probably mostly relevant if you’re interested. Airtable’s iOS app is not much better…</p>
<figure class="fig-container">
  <picture>
    <source srcset="https://danabyerly.com/img/airtable-app-store.avif" type="image/avif" />
    <source srcset="https://danabyerly.com/img/airtable-app-store.webp" type="image/web" />
    <img src="https://danabyerly.com/img/airtable-app-store.jpg" alt="The data linked to you section of the Airtable iOS application. Contact info, contacts, identifiers, diagnostics, user content and usage data are listed as data linked to your identity and sent to Airtable." loading="lazy" />
  </picture>
  <figcaption>
    A little less than WordPress but still too much. I do have this app installed but am not using (and will not install it when I get a new phone).
  </figcaption>
</figure>
<p>But with Airtable I can <a href="https://support.airtable.com/docs/how-to-create-a-form-in-airtable">create a form</a> and fire off TV blurbs from the comfort of a browser without having to use a data hungry app. And I can trigger a deploy at Netlify when a new record is added to the Airtable base using Zapier.</p>
<p>Once I settled on Airtable for the TV blurbs I decided I could also pull the wake up songs in too since they were already in Airtable. My plan is to rework the Junk Drawer homepage. The blog list will be the primary focus with TV Blurbs and the Wake Up Song as secondary lists, each with their own listing page. I don’t have a timeline for this at the moment, but it’s nice to have a plan.</p>

      <div class="heading-wrapper">
        <h2 id="tweetback">Tweetback
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/regaining-momentum/#tweetback">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>I recently created a Twitter archive locally using Zach Leatherman’s <a href="https://github.com/tweetback/tweetback">Tweetback project</a>. I’ve fiddled around with some of the CSS and may restructure it a bit. I like how Henry Deroches added navigation to the top of his <a href="https://tweets.henry.codes/">Twitter archive</a>, so I may use a similar approach. Although I may not be brave enough to muck around with the layout as its using <a href="https://www.11ty.dev/docs/languages/javascript/">Javascript as the templating language</a>. I could very easily mess that up! I may just stick to fiddling with the CSS, we’ll see.</p>
<p>Fiddling aside, I’m not 100% convinced that I’ll make it public. I’ve been active on Twitter since the spring of 2007, but honestly most of it’s just chit chat and blather. I’m not a Thought Leader or a Big Account. I didn’t share any meaningful insights. I had no viral shitposts, notable bangers or things generally worthy of a public archive for all eternity. However, in the spirit of IndieWeb, I may tack it on to this site with a subdomain. Again, we’ll see.</p>
<p>More importantly, you should <a href="https://github.com/tweetback/tweetback">check it out if</a> you have a Twitter account. Even if you don’t make it public, having a nice searchable archive your Tweets that you can update and modify as you see fit is terrific. And it looks like there could be some <a href="https://github.com/tweetback/tweetback/labels/enhancement">nice enhancements</a> in the pipeline (I would be very interested in <a href="https://github.com/tweetback/tweetback/issues/15">this one</a>).</p>
<p>One of the best parts of the archive are the stats. Here are a few from mine…</p>

      <div class="heading-wrapper">
        <h3 id="top-5-emoji-used-in-tweets">Top 5 Emoji Used in Tweets
      </h3>
        <a class="anchor-link" href="https://danabyerly.com/notes/regaining-momentum/#top-5-emoji-used-in-tweets">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><ol>
<li>👍🏼 used 115 times on 104 tweets</li>
<li>🎉 used 107 times on 103 tweets</li>
<li>🤓 used 34 times on 34 tweets</li>
<li>💸 used 33 times on 19 tweets</li>
<li>👇🏼 used 28 times on 18 tweets
207 unique emoji on 680 tweets (2.4% of all tweets, not including retweets)</li>
</ol>

      <div class="heading-wrapper">
        <h3 id="top-5-swear-words">Top 5 Swear Words
      </h3>
        <a class="anchor-link" href="https://danabyerly.com/notes/regaining-momentum/#top-5-swear-words">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><ol>
<li><code>d_mn</code> used 149 times on 148 tweets</li>
<li><code>h_ll</code> used 76 times on 75 tweets</li>
<li><code>a_s</code> used 49 times</li>
<li><code>s_it</code> used 47 times on 46 tweets</li>
<li><code>b_tching</code> used 16 times on 15 tweets
412 swear words on 403 tweets (1.4% of all tweets, not including retweets)</li>
</ol>
<p>And 49.2% of my tweets are replies (×16,027), potentially putting me in Reply Person territory?</p>

      <div class="heading-wrapper">
        <h2 id="and-finally">And finally
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/regaining-momentum/#and-finally">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>I’ve (hopefully!) hooked up this site to post to <a href="https://mastodon.social/@superterrific">my Mastodon account</a> using IFTTT. This post will be the maiden voyage if I’ve set it up correctly. Fingers crossed that the formatting turns out as intended. Thanks to Matthias Ott’s <a href="https://matthiasott.com/notes/syndicating-posts-personal-website-twitter-mastodon">handy how-to post</a> for setting me in the right direction. You’ll also want to check out Kelson Vibber’s post, <a href="https://hyperborea.org/journal/2017/12/mastodon-ifttt/">How to post to Mastodon from anything using IFTTT</a> as there is updated information on how to set-up the webhook portion as well as some additional formatting tips.</p>
<p>If you’re feeling adventurous Jeremy Keith has a post on <a href="https://adactio.com/journal/19645">using Mastodon’s API and Bridgy</a> and Nicolas Hoizey has one on <a href="https://nicolas-hoizey.com/articles/2023/01/07/let-s-posse-to-mastodon-with-a-feed-and-a-github-action/">using a feed and GitHub action</a>.</p>
<p>Originally I was going to use Zapier as it’s my go to automation tool, but webhooks are a premium feature and I’m not ready to upgrade there at the moment. Webhooks are available on the free tier at IFTTT. If it works out I’ll also set up posts from <a href="https://danabyerly-junkdrawer.website/">Junk Drawer</a> to post at Mastodon as well. Or even it doesn’t go well I’ll try to improve it at the Junk Drawer as I’m more likely post there next than posting here. Wish me luck!</p>
<p><strong>Update February 17, 2024</strong>: Webhooks are <a href="https://www.reddit.com/r/ifttt/comments/1as8emd/no_more_free_webhook_applets/">no longer available</a> on the free tier at IFTTT. The Pro plan is relatively affordable. Pipedream currently offers webhooks <a href="https://pipedream.com/pricing">on the free tier</a>.</p>
<p><strong>Update Feburary 11, 2023</strong>: After fiddling around with several test posts, I finally got posting to work correctly. However, only using the post title and URL. I couldn’t get content to display without it including the wrapping HTML.</p>
<p>I found conflicting examples for how to add your access token in the webhook settings. Adding it in the URL field (?access_token=XXXXX) is what worked for me. And this is how I set-up the Body field:</p>
<pre class="language-html"><code class="language-html">status=📝 New post: &lt;&lt;<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>{{EntryTitle}}</span><span class="token punctuation">></span></span>>><br /><br />&lt;&lt;<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>{{EntryUrl}}</span><span class="token punctuation">></span></span>>></code></pre>

      ]]></content>
    </entry>
	
    
    <entry>
      <title>HTMHell: Reading the meter</title>
      <link href="https://danabyerly.com/notes/htmhell-reading-the-meter/"/>
      <updated>2022-12-05T00:00:00Z</updated>
      <id>https://danabyerly.com/notes/htmhell-reading-the-meter/</id>
      <content type="html"><![CDATA[
        <p>I have a new post at HTMHell for the 2022 Advent Calendar…</p>
<blockquote>
<p>On first glance the <code>&lt;meter&gt;</code> element might seem straightforward for accessibility given that it’s a semantic element, but testing has shown the support is not uniform.</p>
</blockquote>
<p><a href="https://www.htmhell.dev/adventcalendar/2022/5/">Reading the meter</a></p>
<p>This post turned out to be a bit of whopper. When I first thought about proposing a contribution I decided to pick an element I didn’t know about, research it and write about it. Manuel Matuzovic, creator of <a href="https://www.htmhell.dev/">HTMHell</a>, takes this approach frequently and I’ve always enjoyed reading those types of posts.</p>
<p>To find a subject I scrolled through the <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element">MDN element list</a> in search of something to learn about. When I saw the <code>&lt;meter&gt;</code> element I thought “Oh cool, it’s semantic and I don’t know anything about it, should be fun!”. Ha, little did I know.</p>
<p>About a month and a half later, what I thought would be a straightforward little explainer turned out to be a deep dive, complete with a lot of screen reader testing and CodePen examples. The post also includes potential color contrast issues, how the attributes work, examples of styling and use cases.</p>
<p>A big thanks goes to <a href="https://ericwbailey.website/">Eric Bailey</a> for his supportive and thoughtful review. With his feedback I was able to tighten up the post as well as dig a little deeper to come up with a recommendation that would likely result in improved accessibility.</p>
<p>And of course a big thanks goes to <a href="https://www.matuzo.at/">Manuel Matuzovic</a>, it’s not easy to pull off a big editorial effort like the <a href="https://www.htmhell.dev/adventcalendar/">HTMHell Advent Calendar</a>. Additionally his dedication to creating helpful front-end content is greatly appreciated!</p>

      ]]></content>
    </entry>
	
    
    <entry>
      <title>Shifting things around</title>
      <link href="https://danabyerly.com/notes/shifting-things-around/"/>
      <updated>2022-11-27T00:00:00Z</updated>
      <id>https://danabyerly.com/notes/shifting-things-around/</id>
      <content type="html"><![CDATA[
        <p>I recently <a href="https://danabyerly.com/notes/year-two-in-the-books/">mentioned two things</a> I wanted to do at this site. Remove the “Featured Projects” section from the homepage and figure out how to integrate my freelance work.</p>
<p>My original thought was that I’d remove “Featured Projects” to make room for more than two posts in “Recent Writing”. Then I realized I could change the “Featured Projects” cards to “From the Studio” and give my freelance projects a little visibility here while I work on a site for the studio.</p>
<p>I still have a few adjustments I want to make, like integrating <a href="https://danabyerly-junkdrawer.website/">the Junk Drawer</a> and reworking the “Recent Writing” section, but this is a step in the right direction.</p>

      <div class="heading-wrapper">
        <h2 id="toot-toot">Toot toot
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/shifting-things-around/#toot-toot">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>In other new directions I’ve slowly been moving most of my social attention to Mastodon. I <a href="https://mastodon.social/@superterrific">created an account</a> in April, found a few people I know who were crossposting from Twitter. I also found several people who hadn’t posted in a long time. It felt like I got to the party well after it was over, but it turned out to be opposite. It’s jumpin’ over there now, but in a much different way than Twitter, and I like it.</p>
<p>I still have my Twitter account, and still check in almost as much as before. Most of my web dev follows and mutuals have moved to Mastodon, and most of my non-web dev mutuals have not.</p>
<p>I’ll be curious to see where my friends and follows not currently on Mastodon end up, or if they leave Twitter at all. Tumblr will be <a href="https://techcrunch.com/2022/11/21/tumblr-to-add-support-for-activitypub-the-social-protocol-powering-mastodon-and-other-apps/">adding support for ActivityPub</a>, the protocol that powers the <a href="https://en.wikipedia.org/wiki/Fediverse">Fediverse</a>, making it possible to follow Tumblr accounts from Mastodon and (presumably) vice versa. A few of my pals are already on Tumblr, and I think the ones hesitant to try Mastodon would be more likely to move to Tumblr.</p>
<p>As much as I’m enjoying it over there, it’s not without its problems. In addition to the <a href="https://mxb.dev/blog/the-indieweb-for-everyone/">high barrier to entry</a> there’s also the often inhospitable <a href="https://techpolicy.press/the-whiteness-of-mastodon/">whiteness of Mastodon</a>, as well as the <a href="https://twitter.com/Amy_Hupe/status/1594986169888116736">potential echo chamber</a> effect. Hopefully all of these issues will improve with time and effort, but they serve as good reminders that technology, in this case the Fediverse, doesn’t solve problems in and of itself.</p>

      <div class="heading-wrapper">
        <h2 id="and-elsewhere">And elsewhere
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/shifting-things-around/#and-elsewhere">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>I recently wrote an article that will be published elsewhere in the coming weeks. It’s my first web dev byline! I didn’t have a goal of publishing elsewhere, but an opportunity came up at a project  I like and I thought “what the hell”.  I threw my hat in the ring and my proposal was accepted.</p>
<p>One thing that came out of that effort was that I discovered <a href="https://assistivlabs.com/">Assistiv Labs</a>.</p>
<blockquote>
<p>Assistiv Labs remotely connects you to real assistive technologies, like NVDA, JAWS, and Windows High Contrast Mode, using any modern web browser. Forget maintaining your own expensive devices &amp; complicated virtual machines. Start testing in seconds.</p>
</blockquote>
<p>I’m a Mac user, so I can’t test with screen readers other than VoiceOver, or in Windows High Contrast Mode. I have a Windows machine for work but I don’t have admin rights to install anything on it, and I don’t want to use it for personal use, like testing my projects. I’ve been considering getting <a href="https://www.parallels.com/products/desktop/">Parallels</a> to run Windows on my Mac, but honestly that just seems like a pain in the ass.</p>
<p>Assistiv Labs solves this problem as I can test using a browser and without having to install anything, or keep anything up to date. You can also test locally <a href="https://assistivlabs.com/support/assistivtunnel">using a CLI</a> (OK, you have to install that, but once and it’s easy!). It costs more than Parallels, but it’s worth for it for me given the lack of hassle.</p>
<p>Prior to discovering Assistiv Labs I had only tested my projects using VoiceOver. I’ve now tested them using NVDA and was happy to not find any issues. Of course I haven’t tested every page, and I’m not a screen reader user, so there’s always a chance there are issues.</p>
<p>The big area of improvement came from testing with Windows High Contrast Mode. I was able to make adjustments here and at other sites to make sure links, focus and hover states were visible. I found these articles helpful for fixing and understanding issues:</p>
<ul>
<li>Piccalilli: <a href="https://piccalil.li/quick-tip/use-transparent-borders-and-outlines-to-assist-with-high-contrast-mode/">Use transparent borders and outlines to assist with high contrast mode</a></li>
<li>Manuel Matuzovic: <a href="https://www.matuzo.at/blog/2022/focus-outline/">Outline is your friend</a></li>
<li>Smashing Magazine: <a href="https://www.smashingmagazine.com/2022/06/guide-windows-high-contrast-mode/">Guide to Windows High Contrast Mode</a></li>
</ul>
<p>Happy outlining!</p>

      ]]></content>
    </entry>
	
    
    <entry>
      <title>Logical Junk Drawer</title>
      <link href="https://danabyerly.com/notes/logical-junk-drawer/"/>
      <updated>2022-10-02T00:00:00Z</updated>
      <id>https://danabyerly.com/notes/logical-junk-drawer/</id>
      <content type="html"><![CDATA[
        <p>A couple of weeks ago Jeremy Keith had a <a href="https://adactio.com/journal/19457">post on refactoring an existing site</a> to use logical properties. Not entirely sure about logical properties? web.dev has a <a href="https://web.dev/learn/css/logical-properties/">nice summation</a>…</p>
<blockquote>
<p>Logical, flow relative properties and values are linked to the flow of text, rather than the physical shape of the screen.</p>
</blockquote>
<p>Instead of using <code>margin-top: 1rem;</code> it would be <code>margin-block-start: 1rem;</code>, using a relative “start” instead of physical “top” to indicate direction. Using relative direction better supports language translation and multi-lingual sites. The post at web.dev has a <a href="https://web.dev/learn/css/logical-properties/">good overview that includes examples</a>. MDN also has a <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Logical_Properties">good overview</a> that includes links to all the properties.</p>
<p>Jeremy’s refactor seemed to go well, including some interesting observations. He had a nice follow-up post on <a href="https://adactio.com/journal/19487">browser support and progressive enhancement using feature queries</a> that should be noted, especially for the how-to on using <code>@supports</code>.</p>
<p>Around these parts I went (almost!) all in on logical properties for my new blog thingie, affectionately known as the <a href="https://danabyerly-junkdrawer.website/">Junk Drawer</a>. Initially I wrote all the styles using logical properties, but after reading Jeremy’s posts I realized that the styles from my <a href="https://www.11ty.dev/">Eleventy</a> starter needed to be converted. Feel free to <a href="https://github.com/superterrific/danabyerly-junkdrawer/tree/main/src/_includes/css">take a peak at Github</a>.</p>
<p>The one thing I didn’t convert were units, they were <a href="https://web.dev/learn/css/logical-properties/#units">mentioned in the web.dev post</a> but upon further investigation <a href="https://caniuse.com/mdn-css_types_length_vi">vi (view inline)</a> and <a href="https://caniuse.com/mdn-css_types_length_vb">vb (view block)</a> are not yet as widely supported as <a href="https://caniuse.com/?search=block-size">sizing</a>, <a href="https://caniuse.com/?search=margin-block">spacing</a> and <a href="https://caniuse.com/?search=border-block">borders</a>.</p>
<p>Overall it was easier than I thought to remap my mind to write logical properties, at least for spacing. No doubt using flexbox and grid made the mental leap easier. In the flurry of new CSS things to keep up with I missed <a href="https://web.dev/learn/css/logical-properties/#sizing">sizing</a>, <a href="https://web.dev/learn/css/logical-properties/#borders">borders</a> and <a href="https://web.dev/learn/css/logical-properties/#start-and-end">text-align start end</a>.</p>
<p>Borders and <code>text-align</code> were easy enough to absorb, but something about sizing (width and height) didn’t easily fit in my head. It’s like when you meet someone and get their name slightly wrong, and then they’re always the wrong name to you. My mind wants to type max-size-inline or size-block instead of the correct <code>max-inline-size</code> or <code>block-size</code>. I regret even typing the incorrect examples! But I’m sure I can make them mental muscle memory in good time.</p>
<p>Another thing I noticed is that the shorthand  for “start” and “end” can be used within the spacing logical shorthand. Let’s say your original padding is this…</p>
<pre class="language-css"><code class="language-css"><span class="token comment">/* shorthand order is top right bottom left */</span><br /><span class="token selector">.my-class</span> <span class="token punctuation">{</span><br />  <span class="token property">padding</span><span class="token punctuation">:</span> 1rem 2rem 3rem .5rem<span class="token punctuation">;</span><br /><span class="token punctuation">}</span></code></pre>
<p>According to the <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/padding-block">examples at MDN</a> you can use the shorthand to include both the start and end values within the overall logical shorthand. Making your original example…</p>
<pre class="language-css"><code class="language-css"><span class="token comment">/* shorthand order is start end */</span><br /><span class="token selector">.my-class</span> <span class="token punctuation">{</span><br />  <span class="token property">padding-block</span><span class="token punctuation">:</span> 1rem 3rem<span class="token punctuation">;</span><br />  <span class="token property">padding-inline</span><span class="token punctuation">:</span> .5rem 2rem<span class="token punctuation">;</span><br /><span class="token punctuation">}</span></code></pre>
<p>I made a <a href="https://codepen.io/superterrific/pen/vYjjgMW">quick Pen to validate this example</a> because I tripped up on the order for inline. I was looking at the physical example while typing and initially put the “end” value first, but the logical shorthand order is “start end”.</p>
<p>Back to <a href="https://adactio.com/journal/19487">Jeremy’s second post</a> about browser support. The Junk Drawer is a very, very low traffic personal site, which makes for a great low stakes way to get used to using logical properties. I checked my stats to see if I’ve had any visitors using browsers that don’t support the logical properties I used, and I haven’t had any yet.</p>
<p>The current version of the new <a href="https://spreadprivacy.com/introducing-duckduckgo-for-mac/">DuckDuckGo Mac browser</a> doesn’t support yet them, and the only visitor I’ve had using it was me while doing my test. I sent feedback about it! None of the DuckDuckGo browsers are listed at <a href="https://caniuse.com/css-logical-props">Can I Use</a> but my test of the iOS version shows support, at least for spacing, sizing and borders. Best guess is that the Android versions support it too?</p>
<p>At any rate, I found logical properties easy to use and am look forward to using them more in the future. And speaking of the future, Miriam Suzanne <a href="https://www.miriamsuzanne.com/2022/09/16/tpac-logical/">had a good reply post</a> to Jeremy’s original post to discuss longer terms plans from the CSS and Internationalization working groups. If you have any opinions on the matter you should let them know.</p>

      ]]></content>
    </entry>
	
    
    <entry>
      <title>Year two in the books</title>
      <link href="https://danabyerly.com/notes/year-two-in-the-books/"/>
      <updated>2022-09-06T00:00:00Z</updated>
      <id>https://danabyerly.com/notes/year-two-in-the-books/</id>
      <content type="html"><![CDATA[
        <p>It’s been <a href="https://danabyerly.com/articles/finally-a-new-site/">two years</a> since I created this site! Things have slowed down a bit around here, mostly because some of the goals I created last year turned out to warrant <a href="https://danabyerly-junkdrawer.website/">a new site</a> (with another on the way!).</p>
<p>How did I stack up to last year’s “<a href="https://danabyerly.com/notes/year-one-in-the-books/#whats-next">What’s next</a>”?</p>
<ul>
<li>Tinkering? Check.</li>
<li>Writing more about other topics? Check, but <a href="https://danabyerly-junkdrawer.website/">elsewhere</a>.</li>
<li>Freelancing? Check.</li>
</ul>

      <div class="heading-wrapper">
        <h2 id="tinkering">Tinkering
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/year-two-in-the-books/#tinkering">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Here’s a non-complete list of some of the tinkering I did over the past year, in no particular order…</p>
<ul>
<li>Added a <a href="https://danabyerly.com/notes/finally-adding-a-dark-theme/">dark theme</a></li>
<li>Added a <a href="https://danabyerly.com/contact/">contact form</a> (and discovered that the email address I used in the contact link previously was configured wrong, in the unlikely event that you emailed me and never heard back, sorry!)</li>
<li>Added <a href="https://danabyerly.com/changelog/2021-11-01/">web monetization</a> (and have made a whopping $0.02!)</li>
<li>Added <a href="https://plausible.io/">Plausible Analytics</a></li>
<li>Added <a href="https://danabyerly.com/changelog/2021-10-29/">Kofi link to posts</a> (and <a href="https://ko-fi.com/danabyerly">got a tip</a> from my big fan!)</li>
<li>Added <a href="https://danabyerly.com/changelog/2021-11-14/">IndieWeb markup</a></li>
<li>Did a lot of <a href="https://danabyerly.com/changelog/2022-05-02/">spring cleaning</a></li>
</ul>
<p>I also added a <a href="https://danabyerly.com/notes/the-accidental-project/">new accidental project</a>. More about the project on <a href="https://danabyerly.com/projects/stakes-profiles/">the project page</a>.</p>

      <div class="heading-wrapper">
        <h2 id="writing">Writing
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/year-two-in-the-books/#writing">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Instead of trying to incorporate non-web dev writing here I created a new site, <a href="https://danabyerly-junkdrawer.website/">Dana Byerly’s Digital Junk Drawer</a>. I wrote a bit about <a href="https://danabyerly.com/notes/behold-the-junk-drawer/">the decision at this site</a>, and about using WordPress as a headless content management system for Eleventy (<a href="https://danabyerly.com/articles/wordpress-and-eleventy-part-one-wordpress/">Part one: WordPress set up</a> and <a href="https://danabyerly.com/articles/wordpress-and-eleventy-part-two-eleventy/">Part two: Eleventy set-up</a>).</p>
<p>Since I added <a href="https://plausible.io/">Plausible Analytics</a> to the site in the past year I now know which posts were popular. Here are the top three:</p>
<ul>
<li><a href="https://danabyerly.com/articles/using-airtable-with-eleventy/">Using Airtable with Eleventy</a></li>
<li><a href="https://danabyerly.com/notes/dear-html-element/">Dear HTML element</a></li>
<li><a href="https://danabyerly.com/articles/wordpress-and-eleventy-part-one-wordpress/">WordPress &amp; Eleventy part one: WordPress</a></li>
</ul>
<p>I also updated the <a href="https://danabyerly.com/about/">About page</a> to reflect a bit about my work experience since I don’t have a proper portfolio or resume listed here. I’m not necessarily looking to change jobs, but wanted to make it easier to get a sense of my skills, experience and approach.</p>

      <div class="heading-wrapper">
        <h2 id="freelancing">Freelancing
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/year-two-in-the-books/#freelancing">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>This year I launched <a href="https://danabyerly.com/notes/two-new-sites/">two new sites</a> for a friend, effectively starting on a path towards freelancing.</p>
<ul>
<li><a href="https://rhondalieberman.com/">Rhonda Lieberman’s site</a></li>
<li><a href="https://cats-in-residence.org/">The Cats-in-Residence Program</a></li>
</ul>
<p>I don’t think I’ll be ditching the day job to freelance full time in the near future, but as mentioned before, “I would like to continue to do little, well-crafted sites for individuals or small businesses”.</p>
<p>I’m currently working on a new site for a small business. It’s still in the early stages but it will be built with <a href="https://www.11ty.dev/">Eleventy</a> and might use WordPress for some content management.</p>
<p>After that I’m hoping to launch a site specifically for freelancing. I’m tentatively thinking of calling it Dana Byerly Studio. Unimaginative, I know. But straightforward and clear. And broad enough that it could encompass more than I’m currently imagining.</p>

      <div class="heading-wrapper">
        <h2 id="whats-next">What’s next
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/year-two-in-the-books/#whats-next">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>The tinkering will continue to continue! Along those lines I do have some plans to revamp the <a href="https://danabyerly.com/projects/">Projects section</a>. I’m going to archive some old projects, rearchitect some of the data and give the listing page a slight redesign.</p>
<p>I’m also going to rework the homepage to focus more on writing and minimize projects. Writing and projects currently have equal billing but there hasn’t been much traffic from the homepage to either of the featured project pages. Most of the individual project page traffic is from search.</p>
<p>I also want to integrate links to the <a href="https://danabyerly-junkdrawer.website/">Junk Drawer</a> and the eventual Studio site, and am working on how best to do that.</p>
<p>The writing around here will remain  “Hey I figured this out” type of web dev stuff, and a place to write about my side projects. Bloggy types of writing will be <a href="https://danabyerly-junkdrawer.website/">at the Junk Drawer</a>.</p>
<p>Here’s to another year!</p>

      ]]></content>
    </entry>
	
    
    <entry>
      <title>WordPress &amp; Eleventy part two: Eleventy</title>
      <link href="https://danabyerly.com/articles/wordpress-and-eleventy-part-two-eleventy/"/>
      <updated>2022-08-08T00:00:00Z</updated>
      <id>https://danabyerly.com/articles/wordpress-and-eleventy-part-two-eleventy/</id>
      <content type="html"><![CDATA[
        <p><a href="https://danabyerly.com/articles/wordpress-and-eleventy-part-one-wordpress/">Part one: Wordpress</a></p>
<p>As mentioned in <a href="https://danabyerly.com/articles/wordpress-and-eleventy-part-one-wordpress/">part one</a>, I recently created <a href="https://danabyerly-junkdrawer.website/">blog for myself</a> using <a href="https://wordpress.com/">WordPress</a> as a content management system (CMS) for <a href="https://www.11ty.dev/">Eleventy</a>. This two part series covers the things I learned and encountered along the way. It’s not a step-by-step how-to guide, but rather a collection of considerations and tips. I’ve included links to how-to articles where available within the context of each post and in the Useful resources section.</p>
<p>This article assumes you already know how to use Eleventy, how to install packages and are familiar with how to use <a href="https://github.com/motdotla/dotenv">dotenv</a>.</p>

      <div class="heading-wrapper">
        <h2 id="table-of-contents">Table of contents
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/articles/wordpress-and-eleventy-part-two-eleventy/#table-of-contents">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><ul>
<li><a href="https://danabyerly.com/articles/wordpress-and-eleventy-part-two-eleventy/#intro">Intro</a></li>
<li><a href="https://danabyerly.com/articles/wordpress-and-eleventy-part-two-eleventy/#caveat-about-my-dev-skills">Caveat about my dev skills</a></li>
<li><a href="https://danabyerly.com/articles/wordpress-and-eleventy-part-two-eleventy/#fetching-the-data">Fetching the data</a></li>
<li><a href="https://danabyerly.com/articles/wordpress-and-eleventy-part-two-eleventy/#dates">Dates</a></li>
<li><a href="https://danabyerly.com/articles/wordpress-and-eleventy-part-two-eleventy/#change-fully-qualified-urls">Change fully qualified URLs</a>
<ul>
<li><a href="https://danabyerly.com/articles/wordpress-and-eleventy-part-two-eleventy/#env-with-a-useful-assist">.env with a useful assist</a></li>
</ul>
</li>
<li><a href="https://danabyerly.com/articles/wordpress-and-eleventy-part-two-eleventy/#images">Images</a>
<ul>
<li><a href="https://danabyerly.com/articles/wordpress-and-eleventy-part-two-eleventy/#hosting-images-at-your-eleventy-site">Hosting images at your Eleventy site</a></li>
</ul>
</li>
<li><a href="https://danabyerly.com/articles/wordpress-and-eleventy-part-two-eleventy/#tags">Tags</a>
<ul>
<li><a href="https://danabyerly.com/articles/wordpress-and-eleventy-part-two-eleventy/#tags-included-in-a-post">Tags included in a post</a></li>
<li><a href="https://danabyerly.com/articles/wordpress-and-eleventy-part-two-eleventy/#listing-page-for-tagged-posts">Listing page for tagged posts</a></li>
</ul>
</li>
<li><a href="https://danabyerly.com/articles/wordpress-and-eleventy-part-two-eleventy/#rss">RSS</a></li>
<li><a href="https://danabyerly.com/articles/wordpress-and-eleventy-part-two-eleventy/#hosting">Hosting</a>
<ul>
<li><a href="https://danabyerly.com/articles/wordpress-and-eleventy-part-two-eleventy/#netlify-build-hook">Netlify build hook</a></li>
</ul>
</li>
<li><a href="https://danabyerly.com/articles/wordpress-and-eleventy-part-two-eleventy/#useful-resources-and-wrap-up">Useful resources and wrap-up</a></li>
</ul>

      <div class="heading-wrapper">
        <h2 id="intro">Intro
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/articles/wordpress-and-eleventy-part-two-eleventy/#intro">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>I highly recommend that you read <a href="https://davedavies.dev/post/how-to-use-11ty-with-headless-wordpress/">How to use 11ty with Headless WordPress and deploy to Netlify</a> by Dave Davies first. It will walk you through the step-by-step to of how to fetch data from your WordPress site, display a list of posts and create a page for each post in Eleventy.</p>
<p>I used the <a href="https://github.com/thedavedavies/Headless-WordPress-11ty">example repository</a> from the  article as a proof of concept. Once I had it in good shape I integrated it into my personal Eleventy starter to use my go-to filters, base styles, etc. The post covers the things I encountered.</p>

      <div class="heading-wrapper">
        <h2 id="caveat-about-my-dev-skills">Caveat about my dev skills
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/articles/wordpress-and-eleventy-part-two-eleventy/#caveat-about-my-dev-skills">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>I’m not very good at JavaScript. One of the great things about Eleventy is that I don’t have to be to get a lot of it! It’s worth noting that there are likely to be other ways to handle the scenarios I encountered, especially if you have JavaScript skills. I’ll point out the obvious ones along the way.</p>

      <div class="heading-wrapper">
        <h2 id="fetching-the-data">Fetching the data
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/articles/wordpress-and-eleventy-part-two-eleventy/#fetching-the-data">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Using the <a href="https://github.com/thedavedavies/Headless-WordPress-11ty">example repository</a> mentioned above, I used <a href="https://www.npmjs.com/package/node-fetch">Node Fetch</a>. I’m not covering the step-by-step here, but highlighting a few options.</p>
<p>You can use your favorite method to fetch the data. Eleventy has an <a href="https://www.11ty.dev/docs/plugins/fetch/">Eleventy Fetch</a> plugin, which also includes caching. There’s also a <a href="https://www.wpgraphql.com/">GraphQL plugin for WordPress</a>.</p>
<p>I covered some considerations for the accessing the WordPress endpoints in the <a href="https://danabyerly.com/articles/wordpress-and-eleventy-part-one-wordpress/#select-your-endpoints">Select your endpoints</a> section of part one. If you have more than 100 records in an endpoint, there’s an example of using Promise.all with pagination to bring them all back in Craig Buckler’s <a href="https://www.sitepoint.com/wordpress-headless-cms-eleventy/">How to use WordPress as a Headless CMS for Eleventy</a> that could be helpful.</p>
<p>As a reference for upcoming code examples here are the names of my data files that call the Posts and Tags endpoints.</p>
<ul>
<li>Posts endpoint = posts.js</li>
<li>Tags endpoint = taglist.js</li>
</ul>
<p class="caption">
<strong>Update</strong>: <a href="https://www.mikeaparicio.com/posts/2023-11-07-using-wordpress-as-a-headless-cms-for-eleventy/">Mike Aparicio wrote a nice article</a> on setting up a headless WordPress CMS with Eleventy. His implementation used WordPress-hosted instead of self-hosted, which apparently has a different API. If you're using a set-up managed by WordPress, be sure to check the Pulling in the Content section of his post.
</p>

      <div class="heading-wrapper">
        <h2 id="dates">Dates
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/articles/wordpress-and-eleventy-part-two-eleventy/#dates">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>The first thing I noticed once I put the blog post template together was that instead of displaying the date, I was getting a <code>Invalid DateTime</code> error.</p>
<p>For my usual Eleventy set-up I use <a href="https://moment.github.io/luxon/api-docs/index.html#luxon">Luxon</a> for dates and have two filters set-up to handle formatting. I covered the full set-up including the <a href="https://danabyerly.com/articles/time-is-on-your-side/#set-up">installation of Luxon in this post</a>, but the general idea is there’s formatting for <code>datatime</code> and for display.</p>
<p>In my blog template I set the date:</p>
<pre class="language-html"><code class="language-html"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>time</span> <span class="token attr-name">datetime</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>{{ posts.date | w3Date }}<span class="token punctuation">"</span></span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>post-meta dt-published<span class="token punctuation">"</span></span><span class="token punctuation">></span></span><br />  {{ posts.date | longDate }}<br /><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>time</span><span class="token punctuation">></span></span></code></pre>
<p>This should result in <code>datetime</code> formatted as 2022-07-21T12:45:24.000Z and the display date formatted as July 21, 2022.</p>
<p>The filters I use for dates from Eleventy in <code>eleventy.js</code> are:</p>
<pre class="language-js"><code class="language-js">  eleventyConfig<span class="token punctuation">.</span><span class="token function">addFilter</span><span class="token punctuation">(</span><span class="token string">'longDate'</span><span class="token punctuation">,</span> <span class="token parameter">dateObj</span> <span class="token operator">=></span> <span class="token punctuation">{</span><br />    <span class="token keyword">return</span> DateTime<span class="token punctuation">.</span><span class="token function">fromJSDate</span><span class="token punctuation">(</span>dateObj<span class="token punctuation">,</span> <span class="token punctuation">{</span><span class="token literal-property property">zone</span><span class="token operator">:</span> <span class="token string">'utc'</span><span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">toFormat</span><span class="token punctuation">(</span><span class="token string">'LLLL dd, yyyy'</span><span class="token punctuation">)</span><span class="token punctuation">;</span><br />  <span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span><br /><br />  eleventyConfig<span class="token punctuation">.</span><span class="token function">addFilter</span><span class="token punctuation">(</span><span class="token string">'w3Date'</span><span class="token punctuation">,</span> <span class="token parameter">dateObj</span> <span class="token operator">=></span> <span class="token punctuation">{</span><br />    <span class="token keyword">return</span> DateTime<span class="token punctuation">.</span><span class="token function">fromJSDate</span><span class="token punctuation">(</span>dateObj<span class="token punctuation">,</span> <span class="token punctuation">{</span><span class="token literal-property property">zone</span><span class="token operator">:</span> <span class="token string">'utc'</span><span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">toISO</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span><br />  <span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span></code></pre>
<p>When working with dates from Eleventy  <a href="https://moment.github.io/luxon/api-docs/index.html#datetimefromjsdate">fromJSDate</a> is used because the dates are JavaScript date objects. The dates coming from WordPress are formatted as <a href="https://developer.wordpress.org/rest-api/reference/posts/#schema">ISO strings</a>. A small adjustment in your date filters will fix the issue.</p>
<pre class="language-js"><code class="language-js">  eleventyConfig<span class="token punctuation">.</span><span class="token function">addFilter</span><span class="token punctuation">(</span><span class="token string">'longDate'</span><span class="token punctuation">,</span> <span class="token parameter">dateObj</span> <span class="token operator">=></span> <span class="token punctuation">{</span><br />    <span class="token keyword">return</span> DateTime<span class="token punctuation">.</span><span class="token function">fromISO</span><span class="token punctuation">(</span>dateObj<span class="token punctuation">,</span> <span class="token punctuation">{</span><span class="token literal-property property">zone</span><span class="token operator">:</span> <span class="token string">'utc'</span><span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">toFormat</span><span class="token punctuation">(</span><span class="token string">'LLLL dd, yyyy'</span><span class="token punctuation">)</span><span class="token punctuation">;</span><br />  <span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span><br /><br />  eleventyConfig<span class="token punctuation">.</span><span class="token function">addFilter</span><span class="token punctuation">(</span><span class="token string">'w3Date'</span><span class="token punctuation">,</span> <span class="token parameter">dateObj</span> <span class="token operator">=></span> <span class="token punctuation">{</span><br />    <span class="token keyword">return</span> DateTime<span class="token punctuation">.</span><span class="token function">fromISO</span><span class="token punctuation">(</span>dateObj<span class="token punctuation">,</span> <span class="token punctuation">{</span><span class="token literal-property property">zone</span><span class="token operator">:</span> <span class="token string">'utc'</span><span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">toISO</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span><br />  <span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span></code></pre>
<p>By changing <code>fromJSDate</code> to <code>fromISO</code>, the filters output the dates correctly. But why am I using the w3Date filter to change the ISO date from WordPress to ISO? The date from WordPress comes back as <code>2022-07-21T12:45:24</code>, which includes the date and time, but not the timezone offset. There’s an <a href="https://core.trac.wordpress.org/ticket/41032">open ticket</a> to address the formatting in WordPress, but for now the filter works fine. And, you may not care if it has the timezone offset, and that’s fine too!</p>

      <div class="heading-wrapper">
        <h2 id="change-fully-qualified-urls">Change fully qualified URLs
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/articles/wordpress-and-eleventy-part-two-eleventy/#change-fully-qualified-urls">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>The <a href="https://danabyerly.com/articles/wordpress-and-eleventy-part-one-wordpress/#select-your-endpoints">Select your endpoints</a> section of part one looks at the Posts endpoint and how the content comes back. One of the things to note is that any link to another post or page within your site will have a fully qualified URL for your WordPress site.</p>
<p>One suggestion for making this a bit easier to handle in Eleventy is match your WordPress permalink structure to your Eleventy permalink structure. See the <a href="https://danabyerly.com/articles/wordpress-and-eleventy-part-one-wordpress/#permalink-and-default-category">Permalink and default category section</a> for more information about the WordPress set-up.</p>
<p>Since my permalink structures match, the only thing I have to change is the domain. If you use the <a href="https://wordpress.org/support/article/media-library-screen/">WordPress Media Library</a> any images within the content of your post will also have fully qualified URL paths. I’ll cover that in more detail in the next section. For now we’ll focus on changing URLs from your WordPress domain to your Eleventy domain.</p>
<p>This is one of those instances that could be handled in a number of ways depending on your preference and/or skill level. You could write a filter in your <code>.eleventy.js</code> file, or perhaps handle it directly in your API call. Both of those are approaches are a bit beyond my reach at the moment, so I used the <a href="https://mozilla.github.io/nunjucks/templating.html#replace">replace filter</a> in Nunjucks.</p>

      <div class="heading-wrapper">
        <h3 id="env-with-a-useful-assist">.env with a useful assist
      </h3>
        <a class="anchor-link" href="https://danabyerly.com/articles/wordpress-and-eleventy-part-two-eleventy/#env-with-a-useful-assist">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Before we get to the Nunjucks filter, this is where I found using <code>dotenv</code> most helpful. If you’re not familiar with <a href="https://github.com/motdotla/dotenv">dotenv</a> the first couple of minutes <a href="https://www.youtube.com/watch?v=zwcvXd3kGbw">of this video</a> should get you up and running (it did for me!).</p>
<p>In my <code>.env</code> file I’ve set up a key that holds the domain of my WordPress site.  It looks like this, but uses my real domain:</p>
<pre class="language-md"><code class="language-md">CMS = 'https://my-wordpress-domain.com'</code></pre>
<p>Typically environment variables are used in your JavaScript data file that contains the call to your API. But here I’m using them within a template. Fortunately it didn’t take long to figure out how to do this because someone else in the Eleventy community <a href="https://github.com/11ty/eleventy/issues/782">already discussed it</a>!</p>
<p><a href="https://github.com/11ty/eleventy/issues/782#issuecomment-1066011154">This comment and example</a> by Peter deHaan is the approach I ended up using. In my <code>.eleventy.js</code> file I have the following:</p>
<pre class="language-js"><code class="language-js"><span class="token keyword">const</span> inspect <span class="token operator">=</span> <span class="token function">require</span><span class="token punctuation">(</span><span class="token string">"node:util"</span><span class="token punctuation">)</span><span class="token punctuation">.</span>inspect<span class="token punctuation">;</span><br /><span class="token function">require</span><span class="token punctuation">(</span><span class="token string">"dotenv"</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">config</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span><br /><br /><span class="token comment">// in the module exports section</span><br />  eleventyConfig<span class="token punctuation">.</span><span class="token function">addFilter</span><span class="token punctuation">(</span><span class="token string">"inspect"</span><span class="token punctuation">,</span> <span class="token punctuation">(</span><span class="token parameter">value</span><span class="token punctuation">)</span> <span class="token operator">=></span><br />    <span class="token function">inspect</span><span class="token punctuation">(</span>value<span class="token punctuation">,</span> <span class="token punctuation">{</span><span class="token literal-property property">sorted</span><span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">}</span><span class="token punctuation">)</span><br />  <span class="token punctuation">)</span><span class="token punctuation">;</span><br /><br />  eleventyConfig<span class="token punctuation">.</span><span class="token function">addGlobalData</span><span class="token punctuation">(</span><span class="token string">"env"</span><span class="token punctuation">,</span> process<span class="token punctuation">.</span>env<span class="token punctuation">)</span><span class="token punctuation">;</span><br /></code></pre>
<p>And then in my template I can use the environment variables within the Nunjucks replace filter:</p>
<pre class="language-html"><code class="language-html">{{ posts.content.rendered | replace(env.CMS, '') | safe }}</code></pre>
<p>This filter strips out all instances of my WordPress domain and leaves all of the links and images using relative URLs. If you’ve set up your WordPress permalinks to match your Eleventy permalinks your links and images should now use relative URLs and point to pages within your Eleventy domain.</p>

      <div class="heading-wrapper">
        <h2 id="images">Images
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/articles/wordpress-and-eleventy-part-two-eleventy/#images">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>The <a href="https://danabyerly.com/articles/wordpress-and-eleventy-part-one-wordpress/#images">Images section</a> of part one provides some details and options for how to set-up images within your WordPress admin. How you handle images in Eleventy will depend on what you decide to do in WordPress.</p>
<p>The easiest way to handle images is with Cloudinary, and its easy to use <a href="https://cloudinary.com/documentation/wordpress_integration">WordPress plugin</a>, or your favorite media platform. You use the WordPress <a href="https://wordpress.org/support/article/media-library-screen/">Media Library</a> as you normally would and Cloudinary optimizes and serves the images. A few things to note if you use Cloudinary…</p>
<ul>
<li>Turn off Lazy Loading (on by default)</li>
<li>By default it will optimize all of your WordPress themes, plugins, etc, which will eat into the limits of your free tier, you can easily opt out</li>
</ul>
<p>The Lazy Loading feature displays a loading gif in WordPress until your image loads, but in the API the image source includes the path the loading gif and not the path to the image, so your images will be broken unless you turn lazy loading off (the image tag itself uses <code>loading=&quot;lazy&quot;</code>).</p>
<p>Another option is to just let your images be served from your WordPress domain. If you decided to go with this approach you’d have to adjust your link filtering to only change the domain on links and not in the image tags.</p>
<p>While Cloudinary offers ease of use and performance gains, I opted to serve images from the domain of my Eleventy site, mostly because I want all of my content in one place on my server. This does make extra work for me, and if I were setting it up for a client who didn’t want the extra work, I would definitely choose Cloudinary.</p>
<p>On the off chance you’d like also like to host images from your Eleventy site, here’s the additional set-up and steps I take… you can skip to the next section if you’re not going to self-host images.</p>

      <div class="heading-wrapper">
        <h3 id="hosting-images-at-your-eleventy-site">Hosting images at your Eleventy site
      </h3>
        <a class="anchor-link" href="https://danabyerly.com/articles/wordpress-and-eleventy-part-two-eleventy/#hosting-images-at-your-eleventy-site">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>You’ll recall our Nunjucks replace filter for turning the fully qualified URLs into relative address URLs <a href="https://danabyerly.com/articles/wordpress-and-eleventy-part-two-eleventy/#change-fully-qualified-urls">discussed above</a>. The path in our image tags now look like this: <code>/content/uploads/my-image.jpg</code> if you followed the recommendation in the <a href="https://danabyerly.com/articles/wordpress-and-eleventy-part-one-wordpress/#images">Images section</a> of part one and changed the default behavior of organizing images by year and month. If not your image path would look something like this: <code>/content/uploads/2022/08/my-image.jpg</code>, making it harder to replace the image path.</p>
<p>You could set up the image path in your Eleventy site to mirror WordPress (<code>/content/uploads</code>) and then you wouldn’t need additional filtering. I decided to use <code>/img/blog</code>, so I need to account for that.</p>
<p>In my <code>.env</code> file I added the following…</p>
<pre class="language-md"><code class="language-md">MEDIAPATH='wp-content/uploads'<br />IMAGEPATH='img/blog'</code></pre>
<p>And then in my template I add an additional “replace” for the image path:</p>
<pre class="language-html"><code class="language-html">{{ posts.content.rendered | replace(env.CMS, '') | replace(env.MEDIAPATH, env.IMAGEPATH) | safe }}</code></pre>
<p>You can probably find a better way to handle this, especially if you’re handy with JavaScript. But if not, this method works fine. I’m guessing the JavaScript filter approach offers better build-time performance, but for my tiny site I’m sure I’d never notice the difference.</p>
<p>One other thing to account for, WordPress creates several sizes of your image that are used responsively. In addition to having a copy of the original image in your Eleventy instance you’ll need to grab the additional sizes from the WordPress Media Library. I haven’t found a way to do that in the WordPress admin and grab them using FTP.</p>
<p>My image prep…</p>
<ul>
<li>Resize and maybe crop image (using <a href="https://flyingmeat.com/acorn/">Acorn</a>).</li>
<li>Optimize with <a href="https://squoosh.app/">Squoosh</a>.</li>
<li>Add to WordPress Media Library (including alt text!).</li>
<li>Download additional image sizes.</li>
<li>Add all images to Eleventy.</li>
<li>Deploy before publishing WordPress post to make the images live.</li>
</ul>
<p>Yes, that’s a lot of steps. It’s fine for me but not recommended unless you don’t mind doing that sort of thing. If it ends up being too annoying I can always switch to Cloudinary.</p>

      <div class="heading-wrapper">
        <h2 id="tags">Tags
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/articles/wordpress-and-eleventy-part-two-eleventy/#tags">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>One of <a href="https://danabyerly.com/articles/wordpress-and-eleventy-part-one-wordpress/#requirements">my requirements</a> was to include tags with my blog posts. To do this I had to include the <a href="https://developer.wordpress.org/rest-api/reference/tags/">Tags endpoint</a> because the <a href="https://developer.wordpress.org/rest-api/reference/posts/">Posts endpoint</a> includes only the ID of the tags used in post.</p>
<p>I did find a way to embed the additional tag data in the Posts endpoint, but couldn’t figure out how to render it. Check the <a href="https://danabyerly.com/articles/wordpress-and-eleventy-part-one-wordpress/#select-your-endpoints">Select your endpoints section</a> of part one for more information as you might be able to figure out how to render the additional tags data (and if you do let me know!).</p>
<p>As for my approach, if you’ve ever used a MySQL join, it’s a similar concept to access the tag name for your post. The tag ID field is the foreign key, or common element, that links the Posts and Tags endpoints.</p>
<p>I included tags for each post and a listing page per tag.</p>

      <div class="heading-wrapper">
        <h3 id="tags-included-in-a-post">Tags included in a post
      </h3>
        <a class="anchor-link" href="https://danabyerly.com/articles/wordpress-and-eleventy-part-two-eleventy/#tags-included-in-a-post">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>There could be different, and potentially better, ways to do this. But, in my blog post template I have the following code to display tags…</p>
<pre class="language-html"><code class="language-html">{% if posts.tags | length %}<br />  <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>div</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>wrapper post-tags<span class="token punctuation">"</span></span><span class="token punctuation">></span></span><br />    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>span</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>visually-hidden<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>A list of tags for this post.<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>span</span><span class="token punctuation">></span></span><br />      <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>ul</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>tag-list<span class="token punctuation">"</span></span> <span class="token attr-name">role</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>list<span class="token punctuation">"</span></span><span class="token punctuation">></span></span><br />      {% for tag in posts.tags %}<br />        {% for tagName in taglist %}<br />		  {% if tag === tagName.id %}<br />		  <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>li</span><span class="token punctuation">></span></span><br />			<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>a</span> <span class="token attr-name">href</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>/tag/{{ tagName.slug }}<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>{{ tagName.name }}<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>a</span><span class="token punctuation">></span></span><br />		  <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>li</span><span class="token punctuation">></span></span><br />		  {% endif %}<br />        {% endfor %}<br />      {% endfor %}<br />    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>ul</span><span class="token punctuation">></span></span><br />  <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>div</span><span class="token punctuation">></span></span><br />  {% endif %}</code></pre>
<p>Here’s what’s happening…</p>
<ul>
<li>The first “if statement” includes the code block if the post has any tags.</li>
<li>Create a “for loop” to call all the tags on the post from the Posts endpoint.</li>
<li>Create an additional “for loop” for a the Tags endpoint.</li>
<li>Use an “if statement” to make sure the ID(s) from the Posts endpoint matches an ID in the Tags endpoint.</li>
<li>Assuming the IDs match, use the name and slug from the Tags endpoint to display the tag name and link to the listing page for the tag.</li>
</ul>

      <div class="heading-wrapper">
        <h3 id="listing-page-for-tagged-posts">Listing page for tagged posts
      </h3>
        <a class="anchor-link" href="https://danabyerly.com/articles/wordpress-and-eleventy-part-two-eleventy/#listing-page-for-tagged-posts">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>I’ve made the tags on my posts links, which points to a listing page for the tag (for example my <a href="https://danabyerly.com/tag/eleventy">Eleventy tag here at this site</a>!). I think of this as a publishing best practice and highly recommend that when you tag your content that you also give visitors the ability to browse your content by tag.</p>
<p>Creating a tag listing page is similar to creating blog posts in that <a href="https://www.11ty.dev/docs/pages-from-data/">pagination is used to create the individual pages</a>. There are two parts, the markdown that includes the pagination and the template or layout. My preferred method is two files but you can also combine them in a single <code>.njk</code> file assuming you’re using Nunjucks.</p>
<p>The markdown…</p>
<pre class="language-json"><code class="language-json">---<br />summary<span class="token operator">:</span> <span class="token string">"A list of posts by tag"</span><br />pagination<span class="token operator">:</span><br />    data<span class="token operator">:</span> taglist<br />    size<span class="token operator">:</span> <span class="token number">1</span><br />    alias<span class="token operator">:</span> taggy<br />permalink<span class="token operator">:</span> <span class="token string">"tag/{{ taggy.slug }}/"</span><br />layout<span class="token operator">:</span> 'layouts/tag-listing.html'<br />---</code></pre>
<p>Here’s what’s happening</p>
<ul>
<li>I’ve created a summary to use in the meta description (not relevant to actual tag listing but wanted to mention it).</li>
<li>The pagination uses <code>taglist.js</code> (that fetches the data from the Tags endpoint) as the data source.</li>
<li>The size is set to 1 to create a single page.</li>
<li>The alias is used as a key in the template.</li>
<li>The permalink creates the the tag listing url (e.g., /tag/my-tag/).</li>
<li>The path to my template, if you use a single <code>.njk</code> file you don’t need this.</li>
</ul>
<p>From the template that lists the tagged posts…</p>
<pre class="language-html"><code class="language-html"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>ul</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>flow<span class="token punctuation">"</span></span><span class="token punctuation">></span></span><br />  {% for posts in posts %}<br />      {% if taggy.id in posts.tags %}<br />      <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>li</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>post-summary-list<span class="token punctuation">"</span></span><span class="token punctuation">></span></span><br />        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>h2</span><span class="token punctuation">></span></span><br />          <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>a</span> <span class="token attr-name">href</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>/blog/{{ posts.slug }}<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>{{ posts.title.rendered | safe }}<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>a</span><span class="token punctuation">></span></span><br />        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>h2</span><span class="token punctuation">></span></span><br />        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>p</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>post-summary-text<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>{{ posts.acf.summary | safe }}<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>p</span><span class="token punctuation">></span></span><br />        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>div</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>post-meta<span class="token punctuation">"</span></span><span class="token punctuation">></span></span><br />          <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>p</span><span class="token punctuation">></span></span><br />            Published on <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>time</span> <span class="token attr-name">datetime</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>{{ posts.date | w3Date }}<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>{{ posts.date | longDate }}<br />          <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>time</span><span class="token punctuation">></span></span><br />        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>p</span><span class="token punctuation">></span></span><br />        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>span</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>visually-hidden<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>A list of tags for this post.<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>span</span><span class="token punctuation">></span></span><br />        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>ul</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>tag-list<span class="token punctuation">"</span></span> <span class="token attr-name">role</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>list<span class="token punctuation">"</span></span><span class="token punctuation">></span></span><br />          {% for tag in posts.tags %}<br />            {% for tagName in taglist %}<br />              {% if tag === tagName.id %}<br />              <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>li</span><span class="token punctuation">></span></span><br />                <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>a</span> <span class="token attr-name">href</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>/tag/{{ tagName.slug }}<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>{{ tagName.name }}<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>a</span><span class="token punctuation">></span></span><br />              <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>li</span><span class="token punctuation">></span></span><br />              {% endif %}<br />            {% endfor %}<br />          {% endfor %}<br />        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>ul</span><span class="token punctuation">></span></span><br />      <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>li</span><span class="token punctuation">></span></span><br />      {% endif %}<br />    {% endfor %}<br />  <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>ul</span><span class="token punctuation">></span></span></code></pre>
<p>Here’s what’s happening…</p>
<ul>
<li>A “for loop” calls the posts from the Posts endpoint.</li>
<li>The “if statement” checks if the ID from the Tags endpoint is present in the post (using the ‘taggy’ alias from the markdown pagination in markdown).</li>
<li>Display information about the post (title, summary, date).</li>
<li>The rest is the same code used in the blog post example to display all the tags for each post (which lives in a <a href="https://learneleventyfromscratch.com/lesson/6.html">partial</a> for easy reuse).</li>
</ul>
<p>Here’s an example at my blog, the <a href="https://danabyerly-junkdrawer.website/tag/home-zoo/">listing page for the Home Zoo tag</a>.</p>
<p>If you wanted to use categories instead of, or in addition to, tags in WordPress it would be the same concept.</p>

      <div class="heading-wrapper">
        <h2 id="rss">RSS
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/articles/wordpress-and-eleventy-part-two-eleventy/#rss">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>The last thing on my <a href="https://danabyerly.com/articles/wordpress-and-eleventy-part-one-wordpress/#requirements">requirements list</a> was to include RSS. Eleventy has a nice <a href="https://www.11ty.dev/docs/plugins/rss/">RSS plugin</a> that I’ve used on most of my sites. It uses <a href="https://www.11ty.dev/docs/collections/">collections</a>, so I had to do two things to get it to work with my WordPress data…</p>
<ul>
<li>Create a collection from the posts data</li>
<li>Use <a href="https://www.11ty.dev/docs/data-computed/">computed data</a> to make the data available to the RSS template</li>
</ul>
<p>Here’s a example of a feed template from the <a href="https://www.11ty.dev/docs/plugins/rss/#sample-feed-templates">Eleventy site</a>…</p>
<pre class="language-rss"><code class="language-rss"><span class="token prolog">&lt;?xml version="1.0" encoding="utf-8"?></span><br /><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>feed</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>http://www.w3.org/2005/Atom<span class="token punctuation">"</span></span> <span class="token attr-name"><span class="token namespace">xml:</span>base</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>{{ metadata.url }}<span class="token punctuation">"</span></span><span class="token punctuation">></span></span><br />  <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>title</span><span class="token punctuation">></span></span>{{ metadata.title }}<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>title</span><span class="token punctuation">></span></span><br />  <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>subtitle</span><span class="token punctuation">></span></span>{{ metadata.subtitle }}<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>subtitle</span><span class="token punctuation">></span></span><br />  <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>link</span> <span class="token attr-name">href</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>{{ permalink | url | absoluteUrl(metadata.url) }}<span class="token punctuation">"</span></span> <span class="token attr-name">rel</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>self<span class="token punctuation">"</span></span><span class="token punctuation">/></span></span><br />  <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>link</span> <span class="token attr-name">href</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>{{ metadata.url }}<span class="token punctuation">"</span></span><span class="token punctuation">/></span></span><br />  <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>updated</span><span class="token punctuation">></span></span>{{ collections.posts | getNewestCollectionItemDate | dateToRfc3339 }}<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>updated</span><span class="token punctuation">></span></span><br />  <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>id</span><span class="token punctuation">></span></span>{{ metadata.url }}<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>id</span><span class="token punctuation">></span></span><br />  <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>author</span><span class="token punctuation">></span></span><br />    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>name</span><span class="token punctuation">></span></span>{{ metadata.author.name }}<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>name</span><span class="token punctuation">></span></span><br />    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>email</span><span class="token punctuation">></span></span>{{ metadata.author.email }}<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>email</span><span class="token punctuation">></span></span><br />  <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>author</span><span class="token punctuation">></span></span><br />  {%- for post in collections.posts | reverse %}<br />  {%- set absolutePostUrl = post.url | url | absoluteUrl(metadata.url) %}<br />  <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>entry</span><span class="token punctuation">></span></span><br />    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>title</span><span class="token punctuation">></span></span>{{ post.data.title }}<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>title</span><span class="token punctuation">></span></span><br />    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>link</span> <span class="token attr-name">href</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>{{ absolutePostUrl }}<span class="token punctuation">"</span></span><span class="token punctuation">/></span></span><br />    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>updated</span><span class="token punctuation">></span></span>{{ post.date | dateToRfc3339 }}<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>updated</span><span class="token punctuation">></span></span><br />    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>id</span><span class="token punctuation">></span></span>{{ absolutePostUrl }}<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>id</span><span class="token punctuation">></span></span><br />    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>content</span> <span class="token attr-name"><span class="token namespace">xml:</span>lang</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>{{ metadata.language }}<span class="token punctuation">"</span></span> <span class="token attr-name">type</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>html<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>{{ post.templateContent | htmlToAbsoluteUrls(absolutePostUrl) }}<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>content</span><span class="token punctuation">></span></span><br />  <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>entry</span><span class="token punctuation">></span></span><br />  {%- endfor %}<br /><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>feed</span><span class="token punctuation">></span></span></code></pre>
<p>The relevant parts are…</p>
<ul>
<li>Setting the collection in <code>&lt;updated&gt;</code></li>
<li>The “for loop” of collection data</li>
<li>The <code>&lt;entry&gt;</code> section</li>
</ul>
<p>Since you don’t need to create a collection to use data files I wasn’t sure how to go about it. I found a couple of options in <a href="https://11ty.rocks/">11ty Rocks</a>, a useful resource created by <a href="https://twitter.com/5t3ph">Stephanie Eckles</a>. In  <a href="https://11ty.rocks/posts/creating-and-using-11ty-collections/">Creating and Using Eleventy Collections</a> there are examples and explanations of the many ways to make a collection.</p>
<p>Creating a collection <a href="https://11ty.rocks/posts/creating-and-using-11ty-collections/#collections-from-local-data">from local data</a>, or data in your <code>_data</code> directory, seemed like a clear choice, but I couldn’t figure out how to do the filtering part. Luckily there’s also an example for <a href="https://11ty.rocks/posts/creating-and-using-11ty-collections/#collections-from-template-front-matter-data">making a collection from a Front Matter key</a>. I added <code>blog: true</code> to the Front Matter of my blog post page and created the collection that way.</p>
<p>In my <code>.eleventy.js</code> file I added the following to create the collection…</p>
<pre class="language-js"><code class="language-js">eleventyConfig<span class="token punctuation">.</span><span class="token function">addCollection</span><span class="token punctuation">(</span><span class="token string">"blog"</span><span class="token punctuation">,</span> <span class="token keyword">function</span> <span class="token punctuation">(</span><span class="token parameter">collection</span><span class="token punctuation">)</span> <span class="token punctuation">{</span><br />  <span class="token keyword">return</span> collection<span class="token punctuation">.</span><span class="token function">getAll</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">filter</span><span class="token punctuation">(</span><span class="token punctuation">(</span><span class="token parameter">item</span><span class="token punctuation">)</span> <span class="token operator">=></span> item<span class="token punctuation">.</span>data<span class="token punctuation">.</span>blog<span class="token punctuation">)</span><span class="token punctuation">;</span><br /><span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span></code></pre>
<p>It was easy enough to add the collection in the RSS template (changing collections.posts to collections.blog) but nothing was working when I plugged in my data elements. This is where <a href="https://www.11ty.dev/docs/data-computed/">computed data</a> came in. To populate the <code>&lt;entry&gt;</code> I needed to map the data from the Posts endpoint to something useable.</p>
<p>The updated Front Matter for blog posts…</p>
<pre class="language-json"><code class="language-json">---<br />layout<span class="token operator">:</span> 'layouts/blog-single.html'<br />pagination<span class="token operator">:</span><br />  data<span class="token operator">:</span> posts<br />  size<span class="token operator">:</span> <span class="token number">1</span><br />  alias<span class="token operator">:</span> posts<br />  addAllPagesToCollections<span class="token operator">:</span> <span class="token boolean">true</span><br />permalink<span class="token operator">:</span> <span class="token string">"blog/{{ posts.slug }}/"</span><br />eleventyComputed<span class="token operator">:</span><br />  title<span class="token operator">:</span> <span class="token string">"{{ posts.title.rendered | safe }}"</span><br />  summary<span class="token operator">:</span> <span class="token string">"{{ posts.acf.summary | safe }}"</span><br />  blogContent<span class="token operator">:</span> <span class="token string">"{{ posts.content.rendered | safe }}"</span><br />  blogDate<span class="token operator">:</span> <span class="token string">"{{ posts.date }}"</span><br />blog<span class="token operator">:</span> <span class="token boolean">true</span><br />---</code></pre>
<p>I already had the layout; the data, size and alias for pagination, and the permalink. I added the following…</p>
<ul>
<li>Setting  <code>alladdAllPagesToCollections</code> to true in pagination, this ensures all of the pages end up in the RSS feed.</li>
<li>The computed data in <code>eleventyComputed</code>
<ul>
<li>The title of the post.</li>
<li>The summary (not used for RSS but useful elsewhere).</li>
<li>The full content.</li>
<li>The publish date.</li>
</ul>
</li>
<li>The <code>blog</code> key to create the collection.</li>
</ul>
<p>And then added the new keys from computed data to the RSS template. The  <code>&lt;entry&gt;</code> part of my RSS template looks like this…</p>
<pre class="language-rss"><code class="language-rss"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>entry</span><span class="token punctuation">></span></span><br />  <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>title</span><span class="token punctuation">></span></span>{{ post.data.title | safe }}<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>title</span><span class="token punctuation">></span></span><br />  <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>link</span> <span class="token attr-name">href</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>{{{ absolutePostUrl }}<span class="token punctuation">"</span></span><span class="token punctuation">/></span></span><br />  <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>updated</span><span class="token punctuation">></span></span>{{ post.data.blogDate | w3Date }}<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>updated</span><span class="token punctuation">></span></span><br />  <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>id</span><span class="token punctuation">></span></span>{{ absolutePostUrl }}<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>id</span><span class="token punctuation">></span></span><br />  <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>content</span> <span class="token attr-name">type</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>html<span class="token punctuation">"</span></span><span class="token punctuation">></span></span><br />    {{ post.data.blogContent | replace(env.CMS, site.url) | replace(env.MEDIAPATH, env.IMAGEPATH) | safe }}<br />  <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>content</span><span class="token punctuation">></span></span><br /><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>entry</span><span class="token punctuation">></span></span></code></pre>
<p><strong>Note</strong>: I also use CDATA within <code>&lt;content&gt;</code> but including it in this code snippet created an error in my RSS feed. You can view the <a href="https://github.com/superterrific/danabyerly-junkdrawer/blob/main/src/rss.html">full code at GitHub</a>.</p>
<p>Here’s what’s happening…</p>
<ul>
<li>The <code>&lt;title&gt;</code> picks up the RSS page title (in this case Dana Byerly’s Digital Junk Drawer)</li>
<li>The <code>&lt;updated&gt;</code> uses the computed data for the publish date and the date filter that converts the date to ISO including the timezone offset (<a href="https://danabyerly.com/articles/wordpress-and-eleventy-part-two-eleventy/#dates">discussed here</a>), you could also leave the filter off if you don’t care about the timezone offset</li>
<li>The <code>&lt;content&gt;</code> uses the computed data for the post content and the two Nunjucks replace filters to update the fully qualified URLs (<a href="https://danabyerly.com/articles/wordpress-and-eleventy-part-two-eleventy/#change-fully-qualified-urls">discussed here</a>).</li>
</ul>
<p>Now your RSS feed should pick up the posts coming from WordPress.</p>

      <div class="heading-wrapper">
        <h2 id="hosting">Hosting
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/articles/wordpress-and-eleventy-part-two-eleventy/#hosting">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>My WordPress site is hosted at <a href="https://dreamhost.com/">Dreamhost</a> and the Eleventy site is hosted at <a href="https://netlify.com/">Netlify</a>. Dreamhost is where I register domains, and typically when I set-up a site at Netlify I point the Dreamhost registration to Netlify nameservers, which is easy and does the job.</p>
<p>The WordPress site uses a sub-domain of the Eleventy site. I had my WordPress site up and running well before I hooked up my Eleventy site. Once I deployed the Eleventy site and added the domain with my usual method, the WordPress site went down. Since I had pointed the nameservers to Netlify the entire domain was pointed at Netlify, which included my sub-domain at Dreamhost. Whoops!</p>
<p>After some frantic research I found a <a href="https://superchlorine.com/2021/01/how-to-set-up-netify-custom-domain-via-dreamhost/">How to set up a custom domain for Netlify site using DreamHost as a domain registrar</a>. Instead of pointing the entire domain to Netlify nameservers, I had to create an individual A record for my Eleventy domains:</p>
<ul>
<li>danabyerly-junkdrawer.website</li>
<li>www.danabyerly-junkdrawer.website</li>
</ul>
<p>And then point my WordPress sub-domain back to the Dreamhost nameservers. Regardless of where you host your sites, if you use a sub-domain of your public site for your WordPress site, this is something to keep in mind.</p>

      <div class="heading-wrapper">
        <h3 id="netlify-build-hook">Netlify build hook
      </h3>
        <a class="anchor-link" href="https://danabyerly.com/articles/wordpress-and-eleventy-part-two-eleventy/#netlify-build-hook">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>I like to have a <a href="https://docs.netlify.com/configure-builds/build-hooks/">build hook</a> for all my sites that use remote data. It’s helpful to be able to trigger a build without doing a deploy. In the <a href="https://danabyerly.com/articles/wordpress-and-eleventy-part-one-wordpress/#deployments">Deployments section of part one</a> I cover some plugins that help by triggering builds from within WordPress, and to use them you need build hook.</p>

      <div class="heading-wrapper">
        <h2 id="useful-resources-and-wrap-up">Useful resources and wrap-up
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/articles/wordpress-and-eleventy-part-two-eleventy/#useful-resources-and-wrap-up">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>That’s everything I encountered as I built my site. Your requirements might be different, and you might encounter different issues, but hopefully this series helped answer some questions or flagged issues to consider.</p>
<p>I’m enjoying using WordPress with <a href="https://danabyerly-junkdrawer.website/">my new site</a> and would definitely use WordPress as a headless CMS for Eleventy again.</p>
<p>A list of resources mentioned in this article…</p>

      <div class="heading-wrapper">
        <h3 id="how-tos-and-repositories">How-tos and repositories
      </h3>
        <a class="anchor-link" href="https://danabyerly.com/articles/wordpress-and-eleventy-part-two-eleventy/#how-tos-and-repositories">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><ul>
<li><a href="https://davedavies.dev/post/how-to-use-11ty-with-headless-wordpress/">How to use 11ty with Headless WordPress and deploy to Netlify</a> and <a href="https://github.com/thedavedavies/Headless-WordPress-11ty">corresponding repository</a> by Dave Davies</li>
<li><a href="https://www.sitepoint.com/wordpress-headless-cms-eleventy/">How to Use WordPress as a Headless CMS for Eleventy</a> by Craig Buckler</li>
<li><a href="https://github.com/superterrific/danabyerly-junkdrawer">Repository for my WordPress &amp; Eleventy site</a></li>
<li><a href="https://www.mikeaparicio.com/posts/2023-11-07-using-wordpress-as-a-headless-cms-for-eleventy/">Using Wordpress as a headless CMS for Eleventy</a> by Mike Aparicio</li>
</ul>

      <div class="heading-wrapper">
        <h3 id="wordpress-documentation-and-plugins">WordPress documentation and plugins
      </h3>
        <a class="anchor-link" href="https://danabyerly.com/articles/wordpress-and-eleventy-part-two-eleventy/#wordpress-documentation-and-plugins">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><ul>
<li><a href="https://developer.wordpress.org/rest-api/">Rest API documentation site</a></li>
<li><a href="https://wordpress.org/support/article/media-library-screen/">Media Library</a></li>
<li><a href="https://cloudinary.com/documentation/wordpress_integration">Cloudinary plugin</a></li>
<li><a href="https://www.wpgraphql.com/">GraphQL plugin</a></li>
</ul>

      <div class="heading-wrapper">
        <h3 id="eleventy-resources-and-tools">Eleventy resources and tools
      </h3>
        <a class="anchor-link" href="https://danabyerly.com/articles/wordpress-and-eleventy-part-two-eleventy/#eleventy-resources-and-tools">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><ul>
<li><a href="https://github.com/motdotla/dotenv">dotenv</a></li>
<li><a href="https://github.com/11ty/eleventy/issues/782">Discussion on using environment variables in content</a></li>
<li><a href="https://www.npmjs.com/package/node-fetch">Node Fetch</a></li>
<li><a href="https://www.11ty.dev/docs/plugins/fetch/">Eleventy Fetch</a></li>
<li><a href="https://moment.github.io/luxon/api-docs/index.html#luxon">Luxon</a></li>
<li><a href="https://learneleventyfromscratch.com/lesson/6.html">Partials</a></li>
<li><a href="https://mozilla.github.io/nunjucks/templating.html#replace">Nunjucks replace filter</a></li>
<li><a href="https://www.11ty.dev/docs/pages-from-data/">Create data from pages</a></li>
<li><a href="https://www.11ty.dev/docs/plugins/rss/">RSS plugin</a></li>
<li><a href="https://11ty.rocks/posts/creating-and-using-11ty-collections/">11ty Rocks - Creating and using Eleventy Collections</a></li>
<li><a href="https://www.11ty.dev/docs/collections/">Collections</a></li>
<li><a href="https://www.11ty.dev/docs/data-computed/">Computed data</a></li>
</ul>

      ]]></content>
    </entry>
	
    
    <entry>
      <title>WordPress &amp; Eleventy part one: WordPress</title>
      <link href="https://danabyerly.com/articles/wordpress-and-eleventy-part-one-wordpress/"/>
      <updated>2022-08-05T00:00:00Z</updated>
      <id>https://danabyerly.com/articles/wordpress-and-eleventy-part-one-wordpress/</id>
      <content type="html"><![CDATA[
        <p>After a quick proof of concept using <a href="https://wordpress.com/">WordPress</a> as content management system (CMS) for <a href="https://www.11ty.dev/">Eleventy</a> I built a <a href="https://danabyerly-junkdrawer.website/">little blog</a> for myself. This two part series covers the things I learned and encountered along the way. It’s not a step-by-step how-to guide, but rather a collection of considerations and tips. I’ve included links to how-to articles where available within the context of each post and in the <a href="https://danabyerly.com/articles/wordpress-and-eleventy-part-one-wordpress/#useful-resources-and-wrap-up">Useful resources</a> section.</p>
<p>This article assumes you already know how to use Eleventy and WordPress, and that you have a high-level understanding of headless content management as well as accessing data via API.</p>
<p>Part one (this article) covers WordPress set-up and concepts, <a href="https://danabyerly.com/articles/wordpress-and-eleventy-part-two-eleventy/">part two covers Eleventy</a>.</p>

      <div class="heading-wrapper">
        <h2 id="table-of-contents">Table of contents
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/articles/wordpress-and-eleventy-part-one-wordpress/#table-of-contents">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><ul>
<li><a href="https://danabyerly.com/articles/wordpress-and-eleventy-part-one-wordpress/#intro">Intro</a></li>
<li><a href="https://danabyerly.com/articles/wordpress-and-eleventy-part-one-wordpress/#requirements">Requirements</a></li>
<li><a href="https://danabyerly.com/articles/wordpress-and-eleventy-part-one-wordpress/#basic-concepts">Basic concepts</a></li>
<li><a href="https://danabyerly.com/articles/wordpress-and-eleventy-part-one-wordpress/#setting-up-wordpress">Setting up WordPress</a>
<ul>
<li><a href="https://danabyerly.com/articles/wordpress-and-eleventy-part-one-wordpress/#permalink-and-default-category">Permalink and default category</a></li>
<li><a href="https://danabyerly.com/articles/wordpress-and-eleventy-part-one-wordpress/#images">Images</a></li>
<li><a href="https://danabyerly.com/articles/wordpress-and-eleventy-part-one-wordpress/#previewing-and-themes">Previewing and themes</a></li>
<li><a href="https://danabyerly.com/articles/wordpress-and-eleventy-part-one-wordpress/#plugins">Plugins</a>
<ul>
<li><a href="https://danabyerly.com/articles/wordpress-and-eleventy-part-one-wordpress/#disable-the-wordpress-front-end-or-redirect">Disable the Wordpress front-end or redirect</a></li>
<li><a href="https://danabyerly.com/articles/wordpress-and-eleventy-part-one-wordpress/#deployments">Deployments</a></li>
<li><a href="https://danabyerly.com/articles/wordpress-and-eleventy-part-one-wordpress/#advanced-custom-fields">Advanced Custom Fields</a></li>
</ul>
</li>
<li><a href="https://danabyerly.com/articles/wordpress-and-eleventy-part-one-wordpress/#other-settings">Other settings</a></li>
</ul>
</li>
<li><a href="https://danabyerly.com/articles/wordpress-and-eleventy-part-one-wordpress/#select-your-endpoints">Select your endpoints</a></li>
<li><a href="https://danabyerly.com/articles/wordpress-and-eleventy-part-one-wordpress/#useful-resources-and-wrap-up">Useful resources and wrap-up</a></li>
</ul>

      <div class="heading-wrapper">
        <h2 id="intro">Intro
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/articles/wordpress-and-eleventy-part-one-wordpress/#intro">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Finding a good content management system (CMS) to use with <a href="https://www.11ty.dev/">Eleventy</a> has been an area of interest around here for some time. Last year I did a <a href="https://danabyerly.com/notes/testing-forestry-cms-with-eleventy/">test with Forestry</a>, and eventually did a test with <a href="https://www.netlifycms.org/">Netlify CMS</a> that I didn’t write about it. Both were decent options. I still want to try some of the API-based solutions like <a href="https://www.sanity.io/">Sanity</a> or <a href="https://www.contentful.com/">Contentful</a>. Testing out <a href="https://wordpress.org/">WordPress</a> was also on my list.</p>
<p>At the end of last year I found this <a href="https://davedavies.dev/post/how-to-use-11ty-with-headless-wordpress/">article by Dave Davies</a> and <a href="https://github.com/thedavedavies/Headless-WordPress-11ty">corresponding repository</a>. I grabbed the repo and followed along with the article, plugging in one of my existing WordPress endpoints. It went smoothly and was a nice, quick validation of “yeah, that seems worth a try”. I put it aside until a good use case came up.</p>
<p>My test run with Dave’s example is what eventually became my new blog, <a href="https://danabyerly-junkdrawer.website/">Dana Byerly’s Digital Junk Drawer</a>, affectionately known as the Junk Drawer.</p>

      <div class="heading-wrapper">
        <h2 id="requirements">Requirements
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/articles/wordpress-and-eleventy-part-one-wordpress/#requirements">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>My site is a simple blog with fairly straightforward requirements. I’m not planning on using anything like carousels or galleries, and my content structure is flat. It’s a vanilla blog.</p>
<ul>
<li>Include posts from WordPress</li>
<li>Include pages from WordPress</li>
<li>Include tags from WordPress</li>
<li>Easy to include images in posts or pages</li>
<li>RSS</li>
</ul>

      <div class="heading-wrapper">
        <h2 id="basic-concepts">Basic concepts
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/articles/wordpress-and-eleventy-part-one-wordpress/#basic-concepts">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>You’re setting up two sites…</p>
<ul>
<li>WordPress site for content management</li>
<li>Eleventy site to display content</li>
</ul>
<p>You can use two different domains or a domain and sub-domain. I went the sub-domain route. For hosting I have a <a href="https://www.dreamhost.com/">Dreamhost account</a> and decided to host my WordPress site there, my Eleventy site is hosted at <a href="https://netlify.com/">Netlify</a>.  If you wanted to run WordPress locally <a href="https://www.sitepoint.com/wordpress-headless-cms-eleventy/">this article should be helpful</a>.</p>
<p>The content at the WordPress site is accessed via the <a href="https://developer.wordpress.org/rest-api/">WordPress REST API</a> to use as <a href="https://www.11ty.dev/docs/data-js/">global data</a> in your Eleventy site. If you’re wondering how to handle having the same content at two different site (as I was before I started this process), I’ll cover that in the <a href="https://danabyerly.com/articles/wordpress-and-eleventy-part-one-wordpress/#useful-resources-and-wrap-up">Plugins section</a> and in the <a href="https://danabyerly.com/articles/wordpress-and-eleventy-part-two-eleventy/#hosting">Hosting section of part two</a>.</p>

      <div class="heading-wrapper">
        <h2 id="setting-up-wordpress">Setting up WordPress
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/articles/wordpress-and-eleventy-part-one-wordpress/#setting-up-wordpress">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>There are a few considerations when setting up Wordpress.</p>
<ul>
<li>Consider your permalink structure</li>
<li>Consider your default category</li>
<li>Decide how you want to handle images</li>
<li>Pick a theme for previewing your posts</li>
<li>Add some helpful plugins</li>
<li>A few potentially useful settings</li>
</ul>

      <div class="heading-wrapper">
        <h3 id="permalink-and-default-category">Permalink and default category
      </h3>
        <a class="anchor-link" href="https://danabyerly.com/articles/wordpress-and-eleventy-part-one-wordpress/#permalink-and-default-category">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>There’s more details about accessing the API in the <a href="https://danabyerly.com/articles/wordpress-and-eleventy-part-one-wordpress/#select-your-endpoints">Select your endpoints section</a>, but an important thing to note is any link to other posts or pages within your site will be fully qualified, or the full address of the url of your WordPress site.</p>
<p>Let’s say your WordPress site is uses the domain <code>editor.mysite.com</code> and your public site uses <code>mysite.com</code>. Any link to your other posts or pages within the content of a post will point to <code>editor.mysite.com</code>.</p>
<p>There are a couple of options for handling this in the <a href="https://danabyerly.com/articles/wordpress-and-eleventy-part-two-eleventy/#change-fully-qualified-urls">Change fully qualified URLs</a> section of part two, but you can make things easier on yourself by setting up the permalink structure in WordPress to match the permalink structure in your Eleventy site.</p>
<p>In my Eleventy site I’m using the permalink structure of <code>/blog/post-name</code>. For example, I have a post at this address: <a href="https://danabyerly-junkdrawer.website/blog/welcome-to-the-junk-drawer/">https://danabyerly-junkdrawer.website/blog/welcome-to-the-junk-drawer/</a>. If I linked to it from within another post, the link would point to <code>https://wpsite.danabyerly-junkdrawer.website/blog/welcome-to-the-junk-drawer/</code> (not the actual domain!). Because the permalink structure is the same the only thing I have to worry about changing in Eleventy is the domain.</p>
<p>Every post in WordPress has a category, and the default category is “uncategorized”. By changing the default category to “blog” every post I publish will have the “blog” category. Then, by changing the WordPress permalink structure to <code>/category/post-name</code> it will match my Eleventy permalinks.</p>
<figure class="fig-container">
  <picture>
    <source srcset="https://danabyerly.com/img/wp-permalink.avif" type="image/avif" />
    <source srcset="https://danabyerly.com/img/wp-permalink.webp" type="image/webp" />
    <img src="https://danabyerly.com/img/wp-permalink.png" alt="Custom permalink structure setting in WordPress set to category and post title" width="1188" height="138" loading="lazy" />
  </picture>
  <figcaption>
    There are a variety of ways to set up your permalink in WordPress, category and post title matches my Eleventy set-up.
  </figcaption>
</figure>
<p>WordPress has a variety of options for <a href="https://wordpress.org/support/article/using-permalinks/">permalink structures</a> to help you match the permalink structure you plan to use in Eleventy.</p>

      <div class="heading-wrapper">
        <h3 id="images">Images
      </h3>
        <a class="anchor-link" href="https://danabyerly.com/articles/wordpress-and-eleventy-part-one-wordpress/#images">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>If you use a <a href="https://developer.wordpress.org/themes/functionality/featured-images-post-thumbnails/">Featured Image</a> in WordPress it’s treated as unique element within Posts endpoint, but images within the content of the post are part of the content. Similar to links, if you use the <a href="https://wordpress.org/support/article/media-library-screen/">Media Library</a>, the image path will be fully qualified to your WordPress site. This also means they’ll be served from your WordPress site. This may be fine for you and just something to note.</p>
<p>I didn’t want to take this route and ultimately decided on using the WordPress Media Library, but serving the images from my Eleventy site. And since I couldn’t figure out how to download the images from the <a href="https://developer.wordpress.org/rest-api/reference/media/">Media endpoint</a>, I have a little extra manual work to do on my end, and I’m OK with that. (And least for now, I guess we’ll see how it works out!).</p>
<p>If you decide to host images from your Eleventy site I recommend unchecking the “Organize my uploads into month- and year-based folders” option in <a href="https://wordpress.org/support/article/settings-media-screen/">Media settings</a>. This will put all of your images in the <code>/wp-content/uploads</code> directory and make it easier to either mirror that path or replace it in your Eleventy site.</p>
<p>If I were setting up a similar site for a client I would use <a href="https://cloudinary.com/">Cloudinary</a>, which has an easy to use <a href="https://cloudinary.com/documentation/wordpress_integration">WordPress plugin</a>. I gave it a test run and it produced some nice performance gains. One thing to note with this plugin is to turn off <a href="https://cloudinary.com/documentation/wordpress_integration#lazy_loading">Lazy Loading</a>, which is enabled by default. It’s useful within a WordPress site but in the API your images will only show the placeholder image that’s used before loading. If you’re an <a href="https://imagekit.io/">ImageKit</a> user there is also a <a href="https://docs.imagekit.io/platform-guides/wordpress/">WordPress plugin</a>. I also gave that try but found the Cloudinary plugin much easier to use.</p>

      <div class="heading-wrapper">
        <h3 id="previewing-and-themes">Previewing and themes
      </h3>
        <a class="anchor-link" href="https://danabyerly.com/articles/wordpress-and-eleventy-part-one-wordpress/#previewing-and-themes">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>This may or may not matter to you, but the previewing at your WordPress site will look different than your Eleventy site, unless you want to create a similar WordPress theme. I chose a simple theme and made a few small adjustments in the <a href="https://wordpress.org/support/article/appearance-customize-screen/">new Appearances editor</a>. It’s fine, it’s not a one-to-one but it’s close enough.</p>

      <div class="heading-wrapper">
        <h3 id="plugins">Plugins
      </h3>
        <a class="anchor-link" href="https://danabyerly.com/articles/wordpress-and-eleventy-part-one-wordpress/#plugins">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>There are several useful Jamstack plugins to help with some of the details.</p>

      <div class="heading-wrapper">
        <h4 id="disable-the-wordpress-front-end-or-redirect">Disable the Wordpress front-end or redirect
      </h4>
        <a class="anchor-link" href="https://danabyerly.com/articles/wordpress-and-eleventy-part-one-wordpress/#disable-the-wordpress-front-end-or-redirect">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>When it comes to figuring out how to handle having the same content at two sites, there are a couple of options. I went with a plugin called <a href="https://wordpress.org/plugins/headless-wp/">Headless WordPress</a> that allows you disable the front-end of your WordPress site and display a 403 page. You can still access the admin area of WordPress by going directly to the sign-in screen (example: <code>your-wordpress-site.com/wp-login.php</code>).</p>
<p>Once signed in you can also preview your posts and view your full site. But anyone trying to view the site will get the 403 error. The plugin has some other features that I’m not using, like creating custom endpoints.</p>
<p>Another option that I saw mentioned by didn’t try is a plugin called <a href="https://wordpress.org/plugins/headless-mode/">Headless Mode</a> that redirects urls from your WordPress site to your Eleventy site.</p>

      <div class="heading-wrapper">
        <h4 id="deployments">Deployments
      </h4>
        <a class="anchor-link" href="https://danabyerly.com/articles/wordpress-and-eleventy-part-one-wordpress/#deployments">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>So far I’ve been doing manual deployments using a <a href="https://docs.netlify.com/configure-builds/build-hooks/">Netlify build hook</a>. Once I have a new post in good shape I’ll publish it and then fire up my Eleventy site locally to proofread and fine tune. Once I’m happy with everything I’ll run the build hook in Terminal, which triggers a build and effectively published the WordPress post to the Eleventy site.</p>
<p>This is fine because it’s the way I like to work, but there are other options to make the deploy and publish to Eleventy much easier. I found two plugins that look useful, but I haven’t tried either. Both offer fairly fine-grained control over what triggers a deploy, and both have repositories if you want look over the code. Neither has been updated recently, and there might also be other options.</p>
<ul>
<li><a href="https://wordpress.org/plugins/wp-jamstack-deployments/">JAMstack Deployments plugin</a></li>
<li><a href="https://wordpress.org/plugins/deploy-netlifypress/">Deploy NetiflyPress plugin</a></li>
</ul>
<p>The Deploy NetlifyPress plugin is not an official Netlify plugin. One difference from the JAMstack Deployments plugin is that it allows for triggering a manual deploy from within the WordPress admin, a feature that could be especially handy for non-technical users.</p>

      <div class="heading-wrapper">
        <h4 id="advanced-custom-fields">Advanced Custom Fields
      </h4>
        <a class="anchor-link" href="https://danabyerly.com/articles/wordpress-and-eleventy-part-one-wordpress/#advanced-custom-fields">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>I’m only using this one a little bit at the moment, but I have a couple of ideas for additions that would require adding custom fields. In my usual Eleventy sites I have a “summary” key for posts that I use on listing pages and in the meta description.</p>
<p>My first thought was to use the WordPress “Excerpt” field, but I couldn’t find a way to make it required that didn’t involve mucking around with WordPress code. If you don’t populate the Excerpt field WordPress will use the <a href="https://wordpress.org/support/article/excerpt/">first 55 characters of your post</a>, which might be fine for your use case, but I wanted to make sure I always included it.</p>
<p>To make minimize the inevitable “ugh, forgot the excerpt again” scenario I created a “summary” field using <a href="https://wordpress.org/plugins/advanced-custom-fields/">Advanced Custom Fields</a> and made it required.</p>

      <div class="heading-wrapper">
        <h3 id="other-settings">Other settings
      </h3>
        <a class="anchor-link" href="https://danabyerly.com/articles/wordpress-and-eleventy-part-one-wordpress/#other-settings">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>There are a few other settings I’ve changed to make things a little easier.</p>
<ul>
<li>Only displaying the fields I want to capture in the create/edit post interface</li>
<li>Setting the editor to use the theme styles</li>
<li>Turn off pre-publish checklist</li>
<li>Discourage search engines from indexing the site</li>
</ul>
<p>The first three changes on my list were changed <a href="https://wordpress.org/support/article/preferences-overview/">in Preferences for the editor</a>, which can be found under the kabob icon in the upper right in create/edit post.</p>
<p>There are three sections available: General, Blocks and Panels. In General you can turn off the pre-publish checklist and change the editor to your theme styles. The pre-publish checklist adds additional steps, if you don’t find them useful it’s easy to turn them off. I wanted to write in dark mode and had set up my theme to use dark mode (you can also add a plugin to modify the entire admin area to use dark mode if you like).</p>
<p>In the Panels section of the Preferences you can specify which fields you want to display in the Post settings panel that displays in the right column (you can also hide the column all together). I’m displaying only permalink, tags and the Advance Custom Fields summary field that I added.</p>
<figure class="fig-container">
  <picture>
    <source srcset="https://danabyerly.com/img/wp-prefs.avif" type="image/avif" />
    <source srcset="https://danabyerly.com/img/wp-prefs.webp" type="image/webp" />
    <img src="https://danabyerly.com/img/wp-prefs.png" alt="WordPress preferences panel section showing the ability to customize what displays in the panel." width="800" height="732" loading="lazy" />
  </picture>
  <figcaption>
    In my set-up only the permalink, tags and summary display.
  </figcaption>
</figure>
<p>In the <a href="https://wordpress.org/support/article/settings-reading-screen">Reading section of settings</a> (from the main sidebar) I checked “Discourage search engines from indexing the site”. I don’t know if this is helpful since the content is restricted, and I didn’t look into it. File this under “just in case”.</p>

      <div class="heading-wrapper">
        <h2 id="select-your-endpoints">Select your Endpoints
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/articles/wordpress-and-eleventy-part-one-wordpress/#select-your-endpoints">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>WordPress makes a lot of data available via its REST API, and depending on what you’d like to use in your in Eleventy site you may need to access multiple endpoints. You can view <a href="https://developer.wordpress.org/rest-api/reference/">all the available endpoints in the documentation</a> as well each field included in the endpoint, for example in the <a href="https://developer.wordpress.org/rest-api/reference/posts/">Posts endpoint</a>.</p>
<p>The best way to get a sense of what’s available to you is the hit an endpoint and see how the data is returned. The general structure of the endpoints is the url for the site plus <code>/wp-json/wp/v2/posts</code> where <code>posts</code> is the endpoint.</p>
<p>I use browser extensions to format and view JSON directly in the browser, <a href="https://addons.mozilla.org/en-US/firefox/addon/basic-json-formatter/">Basic JSON formatter</a> in Firefox and <a href="https://chrome.google.com/webstore/detail/json-viewer/gbmdgpbipfallnflgajpaliibnhdgobh">JSON viewer</a> in Chrome. Using an example from <a href="https://github.com/samikeijonen/11ty-wp">this WordPress and Eleventy repository</a> by Sami Keijonen (which also has a <a href="https://11ty-wp.netlify.app/">corresponding site</a>), you can hit the following endpoint with your browser and see how the data comes back:</p>
<p><a href="https://11ty.foxnet.fi/wp-json/wp/v2/posts">https://11ty.foxnet.fi/wp-json/wp/v2/posts</a></p>
<p>Look at all those fields! Two other things to note…</p>
<ul>
<li>The content and excerpt come back as HTML</li>
<li>The default is to return 10 records</li>
</ul>
<p>I decided to return only the fields I planned on using, which can be done by using <a href="https://developer.wordpress.org/rest-api/using-the-rest-api/global-parameters/">the global parameter</a> of <code>_fields</code>. You can also return up to 100 records at a time by using <a href="https://developer.wordpress.org/rest-api/using-the-rest-api/pagination/">pagination</a>.</p>
<p>Here’s the above endpoint with fields and pagination added:</p>
<p><a href="https://11ty.foxnet.fi/wp-json/wp/v2/posts?fields=id,title,slug,date,content,tags&amp;per_page=100">https://11ty.foxnet.fi/wp-json/wp/v2/posts?fields=id,title,slug,date,content,tags&amp;per_page=100</a></p>
<p>When you hit the updated endpoint you’ll notice that it’s only including the fields specified and there are 44 records returned instead of 10.</p>
<p>The endpoints I included in my project were <a href="https://developer.wordpress.org/rest-api/reference/posts/">Posts</a>, <a href="https://developer.wordpress.org/rest-api/reference/pages/">Pages</a>, and <a href="https://developer.wordpress.org/rest-api/reference/tags/">Tags</a>. Why Tags when there’s a “tags” field in the Posts endpoint? Because in the Posts endpoint the tags field only includes the ID for each tag.</p>
<p>In the example endpoint above, in the record for the first post there is one tag with a value of “58”.  In order to display the name of the tag I need to pull it from the Tags endpoint.</p>
<p>There is a <a href="https://developer.wordpress.org/rest-api/using-the-rest-api/global-parameters/#_embed">global parameter for embedding</a>, which allows you to include linked content for authors and “terms” (categories and tags). However when combining <code>_fields</code> and <code>_embed</code>  the fields parameter is not respected. There’s no mention of how to use them together in the documentation, but I did find  <a href="https://core.trac.wordpress.org/ticket/49985">this open bug</a>  that also included <a href="https://core.trac.wordpress.org/ticket/49985#comment:1">a workaround</a>. Using our example endpoint…</p>
<p><a href="https://11ty.foxnet.fi/wp-json/wp/v2/posts?_embed=true&amp;_fields=id,title,slug,date,content,tags,_links&amp;per_page=100">https://11ty.foxnet.fi/wp-json/wp/v2/posts?_embed=true&amp;_fields=id,title,slug,date,content,tags,_links&amp;per_page=100</a></p>
<p>Now you’ll see a field named <code>_embedded</code> that includes authors and wp:term. The field wp:term includes categories (0) and tags (1). I was able to update my Posts endpoint to include the embedded content, but couldn’t figure out how to render it. Perhaps you’ll have more luck than I did! If not, it’s straightforward to include the Tags endpoint and <a href="https://danabyerly.com/articles/wordpress-and-eleventy-part-two-eleventy/#tags">reference the additional information</a>.</p>

      <div class="heading-wrapper">
        <h2 id="useful-resources-and-wrap-up">Useful resources and wrap-up
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/articles/wordpress-and-eleventy-part-one-wordpress/#useful-resources-and-wrap-up">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Depending on your set-up you could encounter additional issues and things to consider, but hopefully part one answered some of your basic questions around WordPress set-up. <a href="https://danabyerly.com/articles/wordpress-and-eleventy-part-two-eleventy/">Part two on Eleventy set-up</a> covers the things I encountered as I integrated my working proof of concept into my Eleventy starter.</p>
<p>A list of resources mentioned in this article…</p>

      <div class="heading-wrapper">
        <h3 id="how-tos-and-repositories">How-tos and repositories
      </h3>
        <a class="anchor-link" href="https://danabyerly.com/articles/wordpress-and-eleventy-part-one-wordpress/#how-tos-and-repositories">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><ul>
<li><a href="https://davedavies.dev/post/how-to-use-11ty-with-headless-wordpress/">How to use 11ty with Headless WordPress and deploy to Netlify</a> and <a href="https://github.com/thedavedavies/Headless-WordPress-11ty">corresponding repository</a> by Dave Davies</li>
<li><a href="https://www.sitepoint.com/wordpress-headless-cms-eleventy/">How to Use WordPress as a Headless CMS for Eleventy</a> by Craig Buckler</li>
<li><a href="https://11ty-wp.netlify.app/">Site - Testing WordPress as a backend and Eleventy as a frontend</a> and <a href="https://github.com/samikeijonen/11ty-wp">corresponding repository</a> by Sami Keijonen</li>
<li><a href="https://www.mikeaparicio.com/posts/2023-11-07-using-wordpress-as-a-headless-cms-for-eleventy/">Using Wordpress as a headless CMS for Eleventy</a> by Mike Aparicio</li>
</ul>

      <div class="heading-wrapper">
        <h3 id="wordpress-documentation">WordPress documentation
      </h3>
        <a class="anchor-link" href="https://danabyerly.com/articles/wordpress-and-eleventy-part-one-wordpress/#wordpress-documentation">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><ul>
<li><a href="https://developer.wordpress.org/rest-api/">Rest API documentation site</a></li>
<li><a href="https://wordpress.org/support/article/using-permalinks/">Using permalinks</a></li>
<li><a href="https://developer.wordpress.org/themes/functionality/featured-images-post-thumbnails/">Featured image</a></li>
<li><a href="https://wordpress.org/support/article/media-library-screen/">Media Library</a></li>
<li><a href="https://wordpress.org/support/article/settings-media-screen/">Media settings</a></li>
<li><a href="https://wordpress.org/support/article/preferences-overview/">Editory preferences</a></li>
<li><a href="https://wordpress.org/support/article/settings-reading-screen">Reading settings</a></li>
<li><a href="https://wordpress.org/support/article/excerpt/">Excerpts</a></li>
</ul>

      <div class="heading-wrapper">
        <h3 id="wordpress-plugins">WordPress plugins
      </h3>
        <a class="anchor-link" href="https://danabyerly.com/articles/wordpress-and-eleventy-part-one-wordpress/#wordpress-plugins">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><ul>
<li><a href="https://wordpress.org/plugins/advanced-custom-fields/">Advanced Custom Fields</a></li>
<li><a href="https://cloudinary.com/documentation/wordpress_integration">Cloudinary</a></li>
<li><a href="https://docs.imagekit.io/platform-guides/wordpress/">ImageKit</a></li>
<li><a href="https://wordpress.org/plugins/headless-wp/">Headless WordPress</a></li>
<li><a href="https://wordpress.org/plugins/headless-mode/">Headless Mode</a></li>
<li><a href="https://wordpress.org/plugins/wp-jamstack-deployments/">JAMstack Deployments</a></li>
<li><a href="https://wordpress.org/plugins/deploy-netlifypress/">Deploy NetlifyPress</a> (not an official Netlify plugin)</li>
<li><a href="https://wordpress.org/support/article/appearance-customize-screen/">Customize Appearances Screen</a></li>
</ul>

      <div class="heading-wrapper">
        <h3 id="other-resources">Other resources
      </h3>
        <a class="anchor-link" href="https://danabyerly.com/articles/wordpress-and-eleventy-part-one-wordpress/#other-resources">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><ul>
<li><a href="https://addons.mozilla.org/en-US/firefox/addon/basic-json-formatter/">Firefox extension - Basic JSON formatter</a></li>
<li><a href="https://chrome.google.com/webstore/detail/json-viewer/gbmdgpbipfallnflgajpaliibnhdgobh">Chrome extension - JSON viewer</a></li>
<li><a href="https://docs.netlify.com/configure-builds/build-hooks/">Netlify build hooks</a></li>
<li><a href="https://www.11ty.dev/docs/data-js/">Eleventy global data</a></li>
</ul>

      ]]></content>
    </entry>
	
    
    <entry>
      <title>Behold the Junk Drawer</title>
      <link href="https://danabyerly.com/notes/behold-the-junk-drawer/"/>
      <updated>2022-07-24T00:00:00Z</updated>
      <id>https://danabyerly.com/notes/behold-the-junk-drawer/</id>
      <content type="html"><![CDATA[
        <p>Apparently I’ve been on a “make new websites” kick this year. After making <a href="https://danabyerly.com/notes/two-new-sites/">two new ones</a> for a friend/client, I recently launched a <a href="https://danabyerly-junkdrawer.website/">little blog for myself</a>.</p>
<p>The idea to create a separate blog from this site crept up on me. In <a href="https://danabyerly.com/notes/year-one-in-the-books/">last year’s annual recap</a> I noted that I wanted to start writing more, and not only about web dev stuff. Yet every time I thought of writing something not specific to the web, or my projects, it felt odd to do it here. So I just didn’t.</p>
<p>The opportunity presented itself to create the new site and test out using WordPress as a headless content management system (CMS) for <a href="https://www.11ty.dev/">Eleventy</a>. I had previously played around it with enough to validate it was worth a closer look, thanks to <a href="https://davedavies.dev/post/how-to-use-11ty-with-headless-wordpress/">this article by Dave Davies</a>.</p>
<p>Overall it went pretty smoothly! I’m currently writing up the process to publish here as an <a href="https://danabyerly.com/article">article</a>, although it’s going slowly. And, it’s a bit longer than I expected. Once I have it all done I may break it into parts: one for <a href="https://danabyerly.com/articles/wordpress-and-eleventy-part-one-wordpress/">setting up WordPress</a> and one for <a href="https://danabyerly.com/articles/wordpress-and-eleventy-part-two-eleventy/">setting up Eleventy</a>. Hoping to at least be close to being done by the end of the week.</p>
<p>In the meantime, check out my new blog, the somewhat ridiculously named <a href="https://danabyerly-junkdrawer.website/">Dana Byerly’s Digital Junk Drawer</a>. So far it’s been fun having a new context-free space to emit whatever pops into my head.</p>

      <div class="heading-wrapper">
        <h2 id="whats-next">What’s next
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/behold-the-junk-drawer/#whats-next">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>It’s almost coming up on the two year mark here at this site! I’ve been kicking around some ideas for redoing, or at least tweaking the homepage. Nothing drastic, but a freshener nonetheless. I also have a plan to clean up the <a href="https://danabyerly.com/projects/">Projects section</a>.</p>
<p>I recently saw a relatable <a href="https://discord.com/channels/741017160297611315/741017160297611319/998331624641019994">post in the Eleventy discord</a>, “I have arrived at that point in my Eleventy career that I tackle computed data”. Thanks to the Junk Drawer project I recently arrived at the point too! And, it’s given me some insight on how to address something in the Projects section I’ve been wanting to figure out. I’ll talk more about that when I get to it, and about using computed data in the Junk Drawer in the upcoming WordPress/Eleventy article(s). (Articles are <a href="https://danabyerly.com/tag/wordpress/">now posted</a>!).</p>
<p>In the meantime I’m busy trying to maintain some level of composure and consciousness in the heat, hope you’re having better luck than I am!</p>

      ]]></content>
    </entry>
	
    
    <entry>
      <title>Two new sites</title>
      <link href="https://danabyerly.com/notes/two-new-sites/"/>
      <updated>2022-04-11T00:00:00Z</updated>
      <id>https://danabyerly.com/notes/two-new-sites/</id>
      <content type="html"><![CDATA[
        <p>Hello, it’s a been awhile. Burnout got the best of me earlier in the year, but not before I could launch two new sites.</p>
<p>In February I launched a personal site for my dear friend, writer extraordinaire <a href="https://rhondalieberman.com/">Rhonda Lieberman</a>. She is extremely not online, and it took several years to talk her into it. Persistence paid off and now she has a nice little “calling card” site, as she refers to it. I’m going to do a separate post about the site in the near(ish) future, But it should be no surprise that it’s built with <a href="https://www.11ty.dev/">Eleventy</a>!</p>
<p>Also in February, and also related, I redid the site for one of Rhonda’s projects, <a href="https://cats-in-residence.org/">The Cats-in-Residence Program</a>. The project ran from 2013 to 2016, but <a href="https://www.artforum.com/interviews/rhonda-lieberman-talks-about-the-cat-show-41537">started in the late 90’s</a> in an empty lot in Long Island City, Queens.</p>
<p>I’m going to write a separate post about this one too, but the gist is that the previous version was a quickly thrown together WordPress site. It had been on my list to clean up and move to <a href="https://www.11ty.dev/">Eleventy</a>, and having it prominently featured on <a href="https://rhondalieberman.com/">Rhonda’s site</a> was the push I needed.</p>
<p>Another reason I’m happy to have given it a nice clean up is that it’s a <a href="https://cats-in-residence.org/about/">really cool project</a>! And I’m proud to have been involved as a <a href="https://twitter.com/catsinresidence">Cat-Tweeter</a>, <a href="https://instagram.com/catsinresidence">Instagrammer</a>, <a href="https://cats-in-residence.org/zine/">zine contributor</a> and <a href="https://cats-in-residence.org/">Web Meowster</a> (…sorry).</p>

      <div class="heading-wrapper">
        <h2 id="whats-next">What’s next?
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/two-new-sites/#whats-next">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>I <a href="https://danabyerly.com/notes/year-one-in-the-books/#whats-next">previously mentioned</a> that I was working on a couple of projects for a friend and wanting to slowly work my way into freelancing. I’m still not currently thinking about ditching the day job, but I would like to continue to do little, well-crafted sites for individuals or small businesses. In fact I have another one in the hopper that hasn’t started yet.</p>
<p>With that in mind I’m not adding either of these sites to the <a href="https://danabyerly.com/projects/">Projects section</a> of this site. I define “projects” as sites I do for myself. This brings me to a somewhat existential question… do I add a “Work” section here or start a separate site for freelance/client work?</p>
<p>I’m leaning heavily towards a new separate site, as “Work” would imply my “Portfolio”, which would include work from my vast collection of jobs over the last twenty some years. And honestly I just don’t want to do that. Trying to figure out how to represent that feels too much like work itself.</p>
<p>I don’t have a timeline for any of this, which perhaps is the best part (see previously mentioned burnout). In the meantime, I’ve been doing a lot of digital housekeeping, and have found many an odd and hilarious item. I may start a Twitter thread of some of the better ones as I slowly emerge from burnout.</p>

      ]]></content>
    </entry>
	
    
    <entry>
      <title>Upgrading to Eleventy 1.0.0</title>
      <link href="https://danabyerly.com/notes/upgrading-to-eleventy-1-0-0/"/>
      <updated>2022-01-30T00:00:00Z</updated>
      <id>https://danabyerly.com/notes/upgrading-to-eleventy-1-0-0/</id>
      <content type="html"><![CDATA[
        <p class="caption">
<strong>Update</strong>: I've written a similar step-by-step for <a href="https://danabyerly.com/notes/upgrading-to-eleventy-2-0-0/">upgrading to Eleventy v2.0.0</a>.
</p>
<p>I spent an easy, breezy few hours updating 10 projects to the <a href="https://www.11ty.dev/blog/eleventy-one-point-oh/#install-or-upgrade">latest version of Eleventy</a>. As a hobbyist dev with limited debugging skills I live in fear of these sorts of things. I’m happy to report the process was easy and I only encountered one issue for 10 sites.</p>
<p>It’s not surprising that I couldn’t find any step-by-step posts on upgrading given how easy it was. I put the steps together for myself (to do 10 times!) so I thought I’d share them.</p>
<p>There’s a handy <a href="https://github.com/11ty/eleventy-upgrade-help">Eleventy Upgrade Helper plugin</a> that will check your site against all the breaking changes. The README serves as a good summary of breaking changes that could impact your site.</p>

      <div class="heading-wrapper">
        <h2 id="step-by-step-upgrade">Step-by-step upgrade
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/upgrading-to-eleventy-1-0-0/#step-by-step-upgrade">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><ol>
<li>Install upgrade helper plugin</li>
<li>Install upgrade</li>
<li>Remove upgrade helper plugin (or not!)</li>
</ol>

      <div class="heading-wrapper">
        <h3 id="install-upgrade-helper-plugin">Install upgrade helper plugin
      </h3>
        <a class="anchor-link" href="https://danabyerly.com/notes/upgrading-to-eleventy-1-0-0/#install-upgrade-helper-plugin">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>This part has two steps, installing the plugin and adding the plugin to your site. You can do these in either order.</p>
<pre class="language-bash"><code class="language-bash"><span class="token function">npm</span> <span class="token function">install</span> @11ty/eleventy-upgrade-help</code></pre>
<p>And then in .eleventy.js</p>
<pre class="language-js"><code class="language-js"><span class="token keyword">const</span> UpgradeHelper <span class="token operator">=</span> <span class="token function">require</span><span class="token punctuation">(</span><span class="token string">"@11ty/eleventy-upgrade-help"</span><span class="token punctuation">)</span><span class="token punctuation">;</span><br /><br />module<span class="token punctuation">.</span><span class="token function-variable function">exports</span> <span class="token operator">=</span> <span class="token keyword">function</span><span class="token punctuation">(</span><span class="token parameter">eleventyConfig</span><span class="token punctuation">)</span> <span class="token punctuation">{</span><br /> eleventyConfig<span class="token punctuation">.</span><span class="token function">addPlugin</span><span class="token punctuation">(</span>UpgradeHelper<span class="token punctuation">)</span><span class="token punctuation">;</span><br /><span class="token punctuation">}</span><span class="token punctuation">;</span></code></pre>
<p>I started up the first few sites after installing the plugin to make sure the plugin didn’t cause any issues, and it didn’t.</p>

      <div class="heading-wrapper">
        <h3 id="install-the-update">Install the update
      </h3>
        <a class="anchor-link" href="https://danabyerly.com/notes/upgrading-to-eleventy-1-0-0/#install-the-update">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Initially when I tried <code>npm update @11ty/eleventy</code> the update didn’t happen. I solved this by manually updating the version number in package.json but there’s also probably a way to do it via the command line (adding @latest? maybe?).</p>
<p>You may not need this step but if you do, update the Eleventy version in package.json</p>
<pre class="language-json"><code class="language-json"><span class="token property">"@11ty/eleventy"</span><span class="token operator">:</span> <span class="token string">"^1.0.0"</span><span class="token punctuation">,</span></code></pre>
<p>And then hold your breath and update…</p>
<pre class="language-bash"><code class="language-bash"><span class="token function">npm</span> update @11ty/eleventy</code></pre>
<p>All of my projects but one had some additional dependency updates, and all of those were straightforward and fine.</p>
<p>At this point when you hold your breath and test your site, the upgrade helper will give you guidance on any issues in your site in your terminal.</p>
<pre class="language-bash"><code class="language-bash"><span class="token punctuation">[</span>@11ty/eleventy-upgrade-help<span class="token punctuation">]</span> PASSED <span class="token variable"><span class="token variable">`</span>slug<span class="token variable">`</span></span> to <span class="token variable"><span class="token variable">`</span>slugify<span class="token variable">`</span></span> filter<br /><span class="token punctuation">[</span>@11ty/eleventy-upgrade-help<span class="token punctuation">]</span> WARNING eleventyConfig.setDataDeepMerge<span class="token punctuation">(</span>true<span class="token punctuation">)</span> is the new <span class="token number">1.0</span> default. Revert with eleventyConfig.setDataDeepMerge<span class="token punctuation">(</span>false<span class="token punctuation">)</span><span class="token punctuation">;</span><br /><span class="token punctuation">[</span>@11ty/eleventy-upgrade-help<span class="token punctuation">]</span> WARNING The liquidjs <span class="token variable"><span class="token variable">`</span>strictFilters<span class="token variable">`</span></span> option default <span class="token punctuation">(</span>in Eleventy<span class="token punctuation">)</span> changed from <span class="token boolean">false</span> to true. Revert with <span class="token variable"><span class="token variable">`</span>eleventyConfig.setLiquidOptions<span class="token punctuation">(</span><span class="token punctuation">{</span> strictFilters: <span class="token boolean">false</span> <span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token variable">`</span></span><span class="token builtin class-name">.</span><br /><span class="token punctuation">[</span>@11ty/eleventy-upgrade-help<span class="token punctuation">]</span> WARNING The liquidjs <span class="token variable"><span class="token variable">`</span>dynamicPartials<span class="token variable">`</span></span> option default changed from <span class="token boolean">false</span> to true. Functionally this means <span class="token variable"><span class="token variable">`</span>include<span class="token variable">`</span></span> statements require quotes now. Revert with <span class="token variable"><span class="token variable">`</span>eleventyConfig.setLiquidOptions<span class="token punctuation">(</span><span class="token punctuation">{</span> dynamicPartials: <span class="token boolean">false</span> <span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token variable">`</span></span><span class="token builtin class-name">.</span><br /><span class="token punctuation">[</span>@11ty/eleventy-upgrade-help<span class="token punctuation">]</span> PASSED input directory .gitignore check</code></pre>

      <div class="heading-wrapper">
        <h3 id="remove-the-upgrade-helper-plugin">Remove the upgrade helper plugin
      </h3>
        <a class="anchor-link" href="https://danabyerly.com/notes/upgrading-to-eleventy-1-0-0/#remove-the-upgrade-helper-plugin">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><ul>
<li>Remove the plugin from .eleventy.js</li>
<li>Remove the plugin as a dependency in package.json</li>
</ul>

      <div class="heading-wrapper">
        <h2 id="issues">Issues?
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/upgrading-to-eleventy-1-0-0/#issues">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>I was already using <code>slugify</code> on most of my sites and I don’t use liquid or deep data merge, so I figured I wouldn’t encounter too many issues. As it turns out, this post was a good test for <code>slugify</code>, which I was not previously using here.</p>
<p>Once I added this post the upgrade helper fired this message:</p>
<pre class="language-bash"><code class="language-bash"><span class="token string">'Upgrading to Eleventy 1.0.0'</span><br />Expected values to be strictly equal:<br />+ actual - expected<br /><br />+ <span class="token string">'upgrading-to-eleventy-1.0.0'</span><br />- <span class="token string">'upgrading-to-eleventy-1-0-0'</span></code></pre>
<p>Decision time! I could update the site to use <code>{{ title | slugify }}</code> instead of <code>{{ title | slug }}</code> for permalinks, which would change the output to drop the special characters (in this case the periods) and replace them with dashes. Or I could just leave it as is.</p>
<p>Miraculously I don’t have any other posts with special characters in the title. This made it an easy choice to update all my permalink instances from <code>slug</code> to <code>slugify</code> without having the additional step of setting up redirects for the changing urls.</p>
<p>The permalink change looks like this…</p>
<pre class="language-json"><code class="language-json"><span class="token property">"permalink"</span><span class="token operator">:</span> <span class="token string">"/notes/{{ title | slugify }}/index.html"</span></code></pre>

      <div class="heading-wrapper">
        <h3 id="failed-build">Failed build
      </h3>
        <a class="anchor-link" href="https://danabyerly.com/notes/upgrading-to-eleventy-1-0-0/#failed-build">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>The showstopper issue was that one of my site’s builds was failing at <a href="https://netlify.com/">Netlify</a>. This is the kind of debugging scenario mentioned earlier that I live in fear of.</p>
<pre class="language-bash"><code class="language-bash"><span class="token number">12</span>:57:43 PM: <span class="token operator">></span> <span class="token assign-left variable">NODE_ENV</span><span class="token operator">=</span>production eleventy<br /><span class="token number">12</span>:57:43 PM: Eleventy requires Node <span class="token number">12</span>. You will need to upgrade Node to use Eleventy<span class="token operator">!</span></code></pre>
<p>OK, but I’m using 15.3.0 locally, so I’m not sure what to make of that. Fortunately it was the Eleventy community to rescue by way of a <a href="https://www.seanmcp.com/articles/upgrading-an-eleventy-site-to-1-0-0/">post by Sean McPherson</a> on the same issue.</p>
<p>Should you encounter this issue, the fix is to add an environment variable to your Netlify deploy settings that specifies a Node version.</p>
<ol>
<li>In the settings for your site, go to Build &amp; Deploy &gt; Environment</li>
<li>In the Environment variables section click “Edit variables”, which will make the section editable</li>
<li>Click “New variable” and add the following…</li>
</ol>
<pre class="language-html"><code class="language-html">Key: NODE_VERSION<br />Value: 16.13.2</code></pre>
<p>After adding the environment variable the site deployed!</p>
<p><strong>Update</strong>: Maël Brunet <a href="https://twitter.com/MaelB/status/1488140840673452035">offered a helpful tip via Twitter</a>, pointing out that using a <code>.nvmrc</code> file to store the Node version should have the same effect. I’m not using <a href="https://heynode.com/tutorial/install-nodejs-locally-nvm/">Node Version Manager</a> (nvm), but you can create the file manually and Netlify, or presumably any host, will read the file.</p>
<p>To test it out I deleted the environment variable at Netlify and created file named <code>.nvmrc</code> at the root of my project. In the file I added the version number like so…</p>
<pre class="language-text"><code class="language-text">16.13.2</code></pre>
<p>It worked as expected! Christopher Kirk-Nielsen <a href="https://twitter.com/ckirknielsen/status/1488159743097151491">also suggests</a> checking to see if you already have a <code>.nvmrc</code> file that needs to be updated. Even if you didn’t create a file you might be using a starter project that included one.</p>
<p>Regardless of which approach you use, be sure to check the <a href="https://nodejs.org/">recommended latest version</a>, which might be different than my example.</p>

      <div class="heading-wrapper">
        <h2 id="happy-upgrading">Happy upgrading!
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/upgrading-to-eleventy-1-0-0/#happy-upgrading">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>You may encounter issues I didn’t depending on your set-up. If that’s the case I wish you luck and hope your debugging skills are better than mine! Either way, happy upgrading.</p>

      ]]></content>
    </entry>
	
    
    <entry>
      <title>Finally adding a dark theme</title>
      <link href="https://danabyerly.com/notes/finally-adding-a-dark-theme/"/>
      <updated>2021-12-31T00:00:00Z</updated>
      <id>https://danabyerly.com/notes/finally-adding-a-dark-theme/</id>
      <content type="html"><![CDATA[
        <p>Unfortunately my holiday break kicked off with a minor health scare. I was walking the dog when I started to notice some flashing in one of my eyes. There was a lot going on, and it was windy, so I didn’t think too much of it. Once I got home and sat in front of the computer I was greeted by an onslaught of <a href="https://www.nei.nih.gov/learn-about-eye-health/eye-conditions-and-diseases/floaters">eye floaters</a>. There were so many that it was difficult to see. It was a bit terrifying.</p>
<p>I was relieved to find out that the ominously named <a href="https://www.nei.nih.gov/learn-about-eye-health/eye-conditions-and-diseases/vitreous-detachment">vitreous detachment</a> that occurred is a relatively common and usually uneventful part of aging. The flashing has slowly been improving, but the floaters are here to stay. The good news is that I’ve already started noticing them less.</p>
<p>I was also diagnosed with early stage cataracts, which explains things like why I frequently ask “does it look smokey to you?”. I suppose it’s been easy to overlook that as a symptom with <a href="https://gothamist.com/news/wildfire-smoke-returns-nyc-skies">wildfire smoke regularly making its way to these parts</a>, but still an alarming indicator of what’s to come (both the cataracts and wildfires).</p>

      <div class="heading-wrapper">
        <h2 id="enter-dark-mode">Enter dark mode
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/finally-adding-a-dark-theme/#enter-dark-mode">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Dark mode and dark themes are not my personal preference, except for coding. In addition to having a bunch of dark spots and lines floating around between me and whatever I’m looking at, I’ve also become more sensitive to the glare of light themes.</p>
<p>I quickly started using dark mode and switching sites and apps to dark theme where available. And wow, I had no idea how many major sites don’t offer it. I was in no position to cast aspersions given that this site didn’t have one until yesterday.</p>
<p>I incorrectly thought of dark mode and dark themes as more of a personal preference rather than removing a barrier. I’m a bit ashamed of myself for that, and am going to write a post about what I’ve learned about dark mode and themes in the near-ish future.</p>
<p>Adding a dark theme has been on my to-do list since <a href="https://danabyerly.com/articles/finally-a-new-site/#whats-next">I launched this site</a>. I wanted to implement it with a manual toggle, but even with <a href="https://piccalil.li/tutorial/create-a-user-controlled-dark-or-light-mode/">excellent tutorials like this</a> I was still having trouble pulling it off. I want to come back and add one, but now I realize that it’s better to offer one based on user preference than to not have one at all.</p>
<p>Since I’m already using <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties">CSS custom properties</a> it was pretty easy to add another level for themes and use  <code>prefers-color-scheme:dark</code>. I also already had notes on what to make theme specific.</p>
<p>My original set-up defined a handful of colors like this…</p>
<pre class="language-css"><code class="language-css"><span class="token selector">:root</span> <span class="token punctuation">{</span><br />  <span class="token property">--color-primary</span><span class="token punctuation">:</span> #00365d<span class="token punctuation">;</span><br />  <span class="token property">--color-secondary</span><span class="token punctuation">:</span> #c07<span class="token punctuation">;</span><br />  <span class="token property">--color-primary-highlight</span><span class="token punctuation">:</span> #7cc7de<span class="token punctuation">;</span><br />  <span class="token property">--color-secondary-highlight</span><span class="token punctuation">:</span> #f2d1f5<span class="token punctuation">;</span><br />  <span class="token property">--color-primary-tint</span><span class="token punctuation">:</span> #f6f9fc<span class="token punctuation">;</span><br />  <span class="token property">--color-secondary-tint</span><span class="token punctuation">:</span> #f9e9fa<span class="token punctuation">;</span><br /><span class="token punctuation">}</span></code></pre>
<p>The original approach applied those colors directly to selectors. For example, the color for <code>a</code> was set to this…</p>
<pre class="language-css"><code class="language-css"><span class="token property">color</span><span class="token punctuation">:</span> <span class="token function">var</span><span class="token punctuation">(</span>--color-primary<span class="token punctuation">)</span><span class="token punctuation">;</span></code></pre>
<p>The update added custom properties for each item that would change based on theme. So <code>a</code> changed to this…</p>
<pre class="language-css"><code class="language-css"><span class="token property">color</span><span class="token punctuation">:</span> <span class="token function">var</span><span class="token punctuation">(</span>--link-color<span class="token punctuation">)</span><span class="token punctuation">;</span></code></pre>
<p>The default theme is light, in <code>:root {}</code> the link color is set like this…</p>
<pre class="language-css"><code class="language-css"><span class="token property">--link-color</span><span class="token punctuation">:</span> <span class="token function">var</span><span class="token punctuation">(</span>---color-primary<span class="token punctuation">)</span><span class="token punctuation">;</span></code></pre>
<p>Using <code>prefers-color-scheme</code> for dark it’s set like this (along with all the other theme specific properties)…</p>
<pre class="language-css"><code class="language-css"><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><br />  <span class="token selector">:root</span> <span class="token punctuation">{</span><br />	<span class="token property">--link-color</span><span class="token punctuation">:</span> <span class="token function">var</span><span class="token punctuation">(</span>--color-primary-highlight<span class="token punctuation">)</span><span class="token punctuation">;</span><br />  <span class="token punctuation">}</span><br /><span class="token punctuation">}</span></code></pre>
<p>It took less than five hours to get the whole thing done, and for the most part I like it. More importantly, the site is easier to use for with anyone with sight issues that make light theme hard to use, or for those of you who simply prefer it!</p>

      <div class="heading-wrapper">
        <h2 id="odds-and-ends">Odds and ends
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/finally-adding-a-dark-theme/#odds-and-ends">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>I already did a <a href="https://danabyerly.com/notes/year-one-in-the-books/">year-in-review of sorts</a> a few months ago on the one year anniversary of this site. One thing that’s changed is that I’ve added <a href="https://plausible.io/">Plausible</a> for analytics, so far so good, and Plausible has a very nice dark theme!</p>
<p>One of the things I mentioned that I hope to do more of around here is broaden my writing topics. One post I planned to do was a “Crime drama series I watched this year”. Most evenings after I step away from my computer I watch crime drama, non-American crime drama series to be specific. There’s no shortage of excellent, or at least serviceable, crime drama shows.</p>
<p>I was going to list everything I watched, including the country. Do a bar chart of countries (more for my curiosity and to use a neat <a href="https://www.11ty.dev/">Eleventy</a> trick using <a href="https://www.11ty.dev/docs/permalinks/#custom-file-formats">permalinks for custom file formats</a> ). Plus make a few recommendations as well as mention shows I stopped watching or didn’t like.</p>
<p>I might come back and do that post, but here are two recommendations that are admittedly due to <a href="https://www.learning-theories.com/recency-bias-tversky-kahneman.html">recency bias</a> since I watched them in last couple of months. But, the biggest recommendations of everything I watched in 2021 are <a href="https://www.imdb.com/title/tt5459168/">Pustina (Wasteland)</a> and <a href="https://www.imdb.com/title/tt8679520/">Bez Vedomi (The Sleepers)</a>.</p>
<p>Both are from the Czech Republic and directed by Ivan Zachariáš (Wasteland was co-directed with Alice Nellis). They’re both substantive with a strong sense of place and even with very different settings each is uniquely stylish and well seen.</p>
<p>Wasteland is set in present day in a bereft town divided on being taken over by a foreign mining company. The Sleepers is set in 1989 against the backdrop of the <a href="https://en.wikipedia.org/wiki/Velvet_Revolution">Velvet Revolution</a> and is really more of a spy games story than a crime drama. Twists and turns abound in both.</p>
<p>Without drawing this post out even further, both of these shows were the most satisfying shows I watched all year. Plot, timing, characters, acting and directing were all very well done.</p>
<p>Zachariáš has a new one in pre-production called <a href="https://www.imdb.com/title/tt10998298/">The end of the World</a> that I’m looking forward to. I’m also looking forward to the new season of the Finnish show Kaarpi (Dead Wind) on Netflix and the final season of the Welsh show Craith (Hidden), presumably on Acorn.</p>
<p>Here’s to a happy, healthy 2022 full of usable, accessible sites and satisfying crime drama series (or whatever you like)!</p>

      ]]></content>
    </entry>
	
    
    <entry>
      <title>Dear HTML element</title>
      <link href="https://danabyerly.com/notes/dear-html-element/"/>
      <updated>2021-11-20T15:00:00Z</updated>
      <id>https://danabyerly.com/notes/dear-html-element/</id>
      <content type="html"><![CDATA[
        <p>After <a href="https://danabyerly.com/articles/time-is-on-your-side/">writing about</a> <code>&lt;time&gt;</code> a few days ago I remembered that <a href="https://www.sarasoueidan.com/blog/horizontal-rules/">Sara Soueidan has a nice post</a> on <code>&lt;hr&gt;</code>. This made me wonder how many other “Dear HTML Element” love letters there were out there.</p>
<p>I only spent a couple of hours looking, so I’m sure this is nowhere close to complete, but here are a few that I found.</p>
<ul>
<li><a href="https://www.scottohara.me/blog/2021/07/16/section.html">Accessibility of the section element - Scott O’Hara</a></li>
<li><a href="https://css-tricks.com/html-inputs-and-labels-a-love-story/">HTML inputs and labels: A love story - Amber Wilson via CSS Tricks</a></li>
<li><a href="https://www.sarasoueidan.com/blog/horizontal-rules/">Not your typical horizontal rules - Sara Soueidan</a></li>
<li><a href="https://benmyers.dev/blog/on-the-dl/">On the dl - Ben Meyers</a></li>
<li><a href="https://www.htmhell.dev/tips/ol-vs-ul-vs-div/">ol vs. ul vs. dl - HTML Hell</a></li>
<li><a href="https://www.htmhell.dev/tips/the-section-element/">The section element - HTML Hell</a></li>
<li><a href="https://www.htmhell.dev/tips/the-track-element/">The track element - HTML Hell</a></li>
<li><a href="https://meiert.com/en/blog/use-i-appropriately/">Use the “i” appropriately - Jens Oliver Meiert</a></li>
<li><a href="https://www.boia.org/blog/what-are-h-tags-how-headings-affect-user-experience">What are H tags? - Bureau of Internet Accessibility</a></li>
</ul>
<p>There’s also a <a href="https://150daysofhtml.substack.com/archive">150 days of HTML Substack</a> with plenty of love letters to individual elements. Too many to list here!</p>
<p>I found many of these in the <a href="https://www.d.umn.edu/itss/training/online/webdesign/webdev_listserv.html">Webdev newsletter</a>. If you’re not familiar I wrote a bit of a love letter to it <a href="https://danabyerly.com/notes/quick-fix-and-a-test/">in a previous post</a>.</p>
<p>Am I missing a good post on a HTML element? <a href="https://twitter.com/superterrific">Let me know</a>!</p>

      ]]></content>
    </entry>
	
    
    <entry>
      <title>Time is on your side</title>
      <link href="https://danabyerly.com/articles/time-is-on-your-side/"/>
      <updated>2021-11-16T23:00:00Z</updated>
      <id>https://danabyerly.com/articles/time-is-on-your-side/</id>
      <content type="html"><![CDATA[
        <p>A couple of weeks ago creative technologist extraordinaire Henry Desroches posed the following question on Twitter…</p>
<blockquote>
<p>what’s ur favorite rare HTML tag (repeats get executed, let the games begin) — <a href="https://twitter.com/xdesro/status/1450943081553956864">@xdesro</a></p>
</blockquote>
<p><a href="https://twitter.com/superterrific/status/1450953233258754050">I answered</a> <code>&lt;time&gt;</code> (although I also like <code>&lt;hr&gt;</code> and <code>&lt;mark&gt;</code> quite a bit).</p>
<p>What is <code>&lt;time&gt;</code> and why should you use it? Henry sums it up nicely…</p>
<blockquote>
<p>perfect for communicating in both human-readable language and machine-readable language. bilingual cyborg stuff <span class="no-wrap">— <a href="https://twitter.com/xdesro/status/1450954260321951746">@xdesro</a></span></p>
</blockquote>
<p>MDN summarizes…</p>
<blockquote>
<p>The <strong><code>&lt;time&gt;</code></strong> HTML element represents a specific period in time. It may include the ‘datetime’ attribute to translate dates into machine-readable format, allowing for better search engine results or custom features such as reminders. <span class="no-wrap">— <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/time">MDN</a></span></p>
</blockquote>
<p>Cool. But how do you use it?</p>

      <div class="heading-wrapper">
        <h2 id="using-%26lt%3Btime%26gt%3B-with-eleventy">Using &lt;time&gt; with Eleventy
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/articles/time-is-on-your-side/#using-%26lt%3Btime%26gt%3B-with-eleventy">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>I use <code>&lt;time&gt;</code> on this site for publish dates. If you inspect any of the “Published on” dates, you’ll see something like this:</p>
<pre class="language-html"><code class="language-html"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>time</span> <span class="token attr-name">datetime</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>2021-09-07T00:00:00.000Z<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>September 07, 2021<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>time</span><span class="token punctuation">></span></span></code></pre>
<p>There are a <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/time#valid_datetime_values">variety of formats that can be used</a> for <code>datetime</code>. I’m using ISO date (2021-09-07) and global time (T00:00:00.000Z), which in this example is midnight UTC. More on that in a bit.</p>
<p>There are several of ways to add a date to your posts. Per the <a href="https://www.11ty.dev/docs/dates/">Eleventy Content Dates page</a> you can add a <code>date</code> key to your post’s Front Matter.</p>
<pre class="language-json"><code class="language-json">title<span class="token operator">:</span> <span class="token string">"My cool post on using the time element with Eleventy"</span><br />date<span class="token operator">:</span> <span class="token number">2021</span><span class="token number">-11</span><span class="token number">-16</span></code></pre>
<p>About the previously mentioned midnight <code>datetime</code> output, if you don’t include time with your date Eleventy will assume midnight UTC. More about UTC in <a href="https://danabyerly.com/articles/time-is-on-your-side/#time-zones">the Time Zones section</a>.</p>
<p>If you don’t explicitly add the date, Eleventy will look for a date in the file path and use the first one it finds. If there’s no date present in the path it will use the file creation date (which will include a time!).</p>

      <div class="heading-wrapper">
        <h3 id="set-up">Set up
      </h3>
        <a class="anchor-link" href="https://danabyerly.com/articles/time-is-on-your-side/#set-up">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>I use <a href="https://moment.github.io/luxon/#/?id=luxon">Luxon</a> to handle date formatting. It’s fairly straightforward and offers a <a href="https://moment.github.io/luxon/#/formatting">variety of formats</a>. To use Luxon you’ll install it and then add some filters to your <code>.eleventy.js</code> file.</p>
<pre class="language-bash"><code class="language-bash"><span class="token function">npm</span> <span class="token function">install</span> luxon</code></pre>
<p>I picked up the filter approach from the excellent <a href="https://learneleventyfromscratch.com/lesson/12.html#filters">Learn Eleventy from Scratch course</a>, but have since switched to Luxon given that <a href="https://momentjs.com/docs/#/-project-status/">Moment is now maintenance mode</a>. The general approach is still the same. Create two filters, one to display the date and one to use in the <code>datetime</code> attribute.</p>
<p>In your <code>.eleventy.js</code> file add the following</p>
<pre class="language-js"><code class="language-js"><span class="token keyword">const</span> <span class="token punctuation">{</span> DateTime <span class="token punctuation">}</span> <span class="token operator">=</span> <span class="token function">require</span><span class="token punctuation">(</span><span class="token string">'luxon'</span><span class="token punctuation">)</span><span class="token punctuation">;</span></code></pre>
<p>And then in the module.exports section of <code>eleventy.js</code>…</p>
<pre class="language-js"><code class="language-js">  eleventyConfig<span class="token punctuation">.</span><span class="token function">addFilter</span><span class="token punctuation">(</span><span class="token string">'longDate'</span><span class="token punctuation">,</span> <span class="token parameter">dateObj</span> <span class="token operator">=></span> <span class="token punctuation">{</span><br />    <span class="token keyword">return</span> DateTime<span class="token punctuation">.</span><span class="token function">fromJSDate</span><span class="token punctuation">(</span>dateObj<span class="token punctuation">,</span> <span class="token punctuation">{</span><span class="token literal-property property">zone</span><span class="token operator">:</span> <span class="token string">'utc'</span><span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">toFormat</span><span class="token punctuation">(</span><span class="token string">'LLLL dd, yyyy'</span><span class="token punctuation">)</span><span class="token punctuation">;</span><br />  <span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span><br /><br />  eleventyConfig<span class="token punctuation">.</span><span class="token function">addFilter</span><span class="token punctuation">(</span><span class="token string">'w3Date'</span><span class="token punctuation">,</span> <span class="token parameter">dateObj</span> <span class="token operator">=></span> <span class="token punctuation">{</span><br />    <span class="token keyword">return</span> DateTime<span class="token punctuation">.</span><span class="token function">fromJSDate</span><span class="token punctuation">(</span>dateObj<span class="token punctuation">,</span> <span class="token punctuation">{</span><span class="token literal-property property">zone</span><span class="token operator">:</span> <span class="token string">'utc'</span><span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">toISO</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span><br />  <span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span></code></pre>
<p>The <code>longDate</code> filter displays the date as “November 16, 2021” and the <code>w3date</code> filter displays the date in a machine readable format.</p>
<p>Post listing pages use…</p>
<pre class="language-html"><code class="language-html">Published on <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>time</span> <span class="token attr-name">datetime</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>{{ item.data.page.date | w3Date }}<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>{{ item.data.page.date | longDate }}<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>time</span><span class="token punctuation">></span></span></code></pre>
<p>Individual posts use…</p>
<pre class="language-html"><code class="language-html"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>time</span> <span class="token attr-name">datetime</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>{{ page.date | w3Date }}<span class="token punctuation">"</span></span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>dt-published<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>{{ page.date | longDate }}<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>time</span><span class="token punctuation">></span></span></code></pre>
<p>If you look at the top of this page you’ll see the output.</p>
<p>Al Power has a <a href="https://www.alpower.com/tutorials/formatting-dates-in-eleventy/">slightly different approach to formatting</a> using Luxon’s presets if you’re interested.</p>

      <div class="heading-wrapper">
        <h3 id="time-zones">Time Zones
      </h3>
        <a class="anchor-link" href="https://danabyerly.com/articles/time-is-on-your-side/#time-zones">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>As mentioned above, Eleventy assumes UTC for date and time unless you specify otherwise. If you look at the filters above you’ll notice the zone is set to UTC. Luxon gives you some options on <a href="https://moment.github.io/luxon/#/zones?id=specifying-a-zone">how to specify zone</a>.</p>
<p>For example, you could specify your local time zone by changing zone to <code>zone: 'local'</code> or more explicitly <code>zone: 'America/New York'</code> in my case. However, this approach is not recommended as it can cause your dates to be a day off.</p>
<p>The Eleventy documentation explains…</p>
<blockquote>
<p>Many date formats in Eleventy (when set in your content‘s filename as <code>YYYY-MM-DD-myfile.md</code> or in your front matter as <code>date: YYYY-MM-DD</code>) assume midnight in UTC. When displaying your dates, make sure you’re using the UTC time and not your own local time zone, which may be the default. <span class="no-wrap">— <a href="https://www.11ty.dev/docs/dates/#dates-off-by-one-day">Eleventy</a></span></p>
</blockquote>

      <div class="heading-wrapper">
        <h3 id="formats">Formats
      </h3>
        <a class="anchor-link" href="https://danabyerly.com/articles/time-is-on-your-side/#formats">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>There are plenty of ways to format your dates with Luxon. For displaying dates on the site I’ve gone with <code>LLLL dd, yyyy</code> as a token which outputs November 16, 2021. You can peruse the lengthy <a href="https://moment.github.io/luxon/#/formatting?id=table-of-tokens">table of tokens</a> as well as <a href="https://github.com/moment/luxon/blob/master/docs/formatting.md#presets">presets</a> to find your preferred format.</p>
<p>For <code>datetime</code> I’ve used <code>.toISO()</code>, which will output ISO standard date and time. If you wanted to use date without time you could use <code>.toISODate</code>. <a href="https://moment.github.io/luxon/#/formatting?id=iso-8601">Week or time only</a> are other options that aren’t a good a choice for a post’s publish date, but could be handy for other scenarios.</p>
<p>Can you use <code>&lt;time&gt;</code> without including <code>datetime</code>? Absolutely. You can wrap any date or time and get the benefit as long as you’re using <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/time#valid_datetime_values">valid values</a>.</p>
<pre class="language-html"><code class="language-html"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>p</span><span class="token punctuation">></span></span>I started working on the web in <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>time</span><span class="token punctuation">></span></span>1996<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>time</span><span class="token punctuation">></span></span>.<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>p</span><span class="token punctuation">></span></span><br /><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>p</span><span class="token punctuation">></span></span>I can barely wait until <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>time</span><span class="token punctuation">></span></span>11:00<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>time</span><span class="token punctuation">></span></span> to eat lunch.<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>p</span><span class="token punctuation">></span></span></code></pre>

      <div class="heading-wrapper">
        <h2 id="why-use-%26lt%3Btime%26gt%3B">Why use &lt;time&gt;
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/articles/time-is-on-your-side/#why-use-%26lt%3Btime%26gt%3B">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>The <code>&lt;time&gt;</code> tag makes a crucial bit of information about your post understandable to both humans and machines. You know, <a href="https://twitter.com/xdesro/status/1450954260321951746">bilingual cyborg stuff</a>.</p>

      <div class="heading-wrapper">
        <h3 id="search-engines">Search engines
      </h3>
        <a class="anchor-link" href="https://danabyerly.com/articles/time-is-on-your-side/#search-engines">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Search engines are the most ubiquitous use case. You want people to be able to find your posts, and <code>&lt;time&gt;</code> can help ensure that.</p>
<p>From the Bing Webmaster tools help &amp; how-to…</p>
<blockquote>
<p><strong>Use HTML5 semantic elements</strong> as they have am intrinsic meaning to browser, developer and search engine, especially use the following HTML5 Semantic Elements:
&lt;article&gt;, &lt;aside&gt;, &lt;details&gt;, &lt;figcaption&gt;, &lt;figure&gt;, &lt;footer&gt;, &lt;header&gt;, &lt;main&gt;, &lt;mark&gt;, &lt;nav&gt;, &lt;ection&gt;, &lt;summary&gt;, &lt;time&gt;. <span class="no-wrap">— <a href="https://www.bing.com/webmasters/help/webmasters-guidelines-30fba23a">Bing Webmaster Tools</a></span></p>
</blockquote>

      <div class="heading-wrapper">
        <h3 id="indieweb">IndieWeb
      </h3>
        <a class="anchor-link" href="https://danabyerly.com/articles/time-is-on-your-side/#indieweb">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p><a href="https://indieweb.org/">IndieWeb</a> participation is another benefit of using <code>&lt;time&gt;</code>. The basic premise of IndieWeb is that you should own and control your content rather than relying only on third party services.</p>
<p>For example, instead of posting only on a platform like Medium or <a href="http://dev.to/">Dev.to</a>, you would post on your own site and syndicate out to third parties (or not!).</p>
<blockquote>
<p>When you post something on the web, it should belong to you, not a corporation. Too many companies have gone out of business and <a href="https://indieweb.org/site-deaths" title="site-deaths">lost all of their users’ data</a>. By joining the IndieWeb, your content stays yours and in your control. <span class="no-wrap">— <a href="https://indieweb.org/">IndieWeb.org</a></span></p>
</blockquote>
<p>Owning your own site is one element of IndieWeb. There are plenty of <a href="https://spec.indieweb.org/">other aspects and ways to participate</a>. <a href="https://indieweb.org/Webmention">Webmentions</a> are the most well known, but you can also sign-in to sites using your own domain with <a href="https://indieweb.org/How_to_set_up_web_sign-in_on_your_own_domain">IndyAuth</a> and take part in the <a href="https://indieweb.org/Homebrew_Website_Club">Homebrew Website Club</a>, an active worldwide community with many chapters.</p>
<p>An easy way to get started is to use <a href="https://microformats.org/wiki/h-entry">microformats to markup your posts</a>, which makes them easier to syndicate to other sites.</p>
<blockquote>
<p>h-entry is a simple, open format for episodic or datestamped content on the web. h-entry is often used with content intended to be syndicated, e.g. blog posts. h-entry is one of several open <a href="https://microformats.org/wiki/microformats" title="microformats">microformat</a> standards suitable for embedding data in HTML. <span class="no-wrap">— <a href="https://microformats.org/wiki/h-entry">Microformats.org</a></span></p>
</blockquote>
<p>In fact I added both <code>h-entry</code> and <code>h-card</code> to my site as a result of researching for this post! Previously I had only been aware of Webmentions, so I’m happy to take some steps towards IndieWeb participation.</p>
<p>Back to <code>&lt;time&gt;</code>, there are four properties that <code>h-entry</code> needs at a minimum to be valid.</p>
<ul>
<li>The overall content needs to be indicated</li>
<li>The name of the post</li>
<li>The canonical url</li>
<li>The <code>datetime</code> the post was published</li>
</ul>
<p>Properties are marked using class names.</p>
<blockquote>
<p>The ‘dt-published’ property should be a <code>&lt;time&gt;</code> element so that you can take advantage of HTML5’s “datetime” property. <span class="no-wrap">— <a href="https://microformats.org/wiki/h-entry">Microformats.org</a></span></p>
</blockquote>
<p>If you recall the code example earlier used in the post layout to display date, the <code>dt-published</code> property is included.</p>
<pre class="language-html"><code class="language-html"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>time</span> <span class="token attr-name">datetime</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>2021-11-16T23:00:00.000Z<span class="token punctuation">"</span></span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>dt-published<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>November 16, 2021<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>time</span><span class="token punctuation">></span></span></code></pre>
<p>Here’s an example of my previous post at <a href="https://indiewebify.me/validate-h-entry/?url=https%3A%2F%2Fdanabyerly.com%2Fnotes%2Fthe-accidental-project%2F">h-entry validator</a> at <a href="https://indiewebify.me/">IndieWebify.me</a>. In-depth information and examples can be found at <a href="https://microformats.org/wiki/h-entry">the h-entry page</a> at the Microformats wiki.</p>

      <div class="heading-wrapper">
        <h3 id="events">Events
      </h3>
        <a class="anchor-link" href="https://danabyerly.com/articles/time-is-on-your-side/#events">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Time-based events are another way that <code>&lt;time&gt;</code> can be useful. Having machine-readable time elements makes things like adding an event to your calendar or viewing an event’s schedule in your local time zone possible. You can see examples of both such features at <a href="https://11tymeetup.dev/events/">THE Eleventy Meetup site</a>!</p>

      <div class="heading-wrapper">
        <h2 id="summary">Summary
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/articles/time-is-on-your-side/#summary">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>The <code>&lt;time&gt;</code> tag is a great addition to your site even if you don’t participate in IndieWeb. It <a href="https://twitter.com/seldo/status/1459987462030127105">handily won round one</a> in Laurie Voss’ impromptu HTML madness bracket game, although it <a href="https://twitter.com/seldo/status/1460394844887535626">didn’t fare as well in round two</a> and did not move on to <a href="https://twitter.com/seldo/status/1460708012482465792">round three</a>.</p>
<p><strong>Update</strong>: The <a href="https://twitter.com/seldo/status/1462149025633746951">results are in</a>! <code>&lt;a&gt;</code>, the humble workhorse <a href="https://www.w3.org/History/19921103-hypertext/hypertext/WWW/MarkUp/Tags.html">in use since Web 1.0</a>, cruised to an easy victory over the <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/marquee">deprecated</a> <code>&lt;marquee&gt;</code>.</p>

      <div class="heading-wrapper">
        <h2 id="useful-resources">Useful resources
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/articles/time-is-on-your-side/#useful-resources">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><ul>
<li><a href="https://www.htmlgoodies.com/html5/its-time-for-an-html5-time-tag/">HTML Goodies - It’s Time for an HTML5 Time Tag</a></li>
<li><a href="https://indiewebify.me/">IndieWebify.me</a> - A guide to getting you on the IndieWeb</li>
<li><a href="https://indieweb.org/why">Why IndieWeb</a></li>
<li><a href="https://www.timestamp-converter.com/">Timestamp converter</a> - Useful for troubleshooting the “day behind” problem</li>
<li><a href="https://mxb.dev/blog/using-webmentions-on-static-sites/">Max Böck - Using Webmentions in Eleventy</a></li>
<li><a href="https://sia.codes/posts/webmentions-eleventy-in-depth/">Sia Karamelegos - An in-depth tutorial on Webmentions and Eleventy</a></li>
<li><a href="https://amberwilson.co.uk/blog/grow-the-indieweb-with-webmentions/">Amber Wilson - Grow the IndieWeb with Webmentions</a></li>
<li><a href="https://darthmall.net/weblog/webmentions/">Evan Sheehan - Webmentions: Joining the IndieWeb</a></li>
<li><a href="https://benmyers.dev/blog/on-the-dl/">Ben Myers - On the dl</a> - A look at another useful semantic HTML element</li>
</ul>

      ]]></content>
    </entry>
	
    
    <entry>
      <title>The accidental project</title>
      <link href="https://danabyerly.com/notes/the-accidental-project/"/>
      <updated>2021-10-29T18:00:00Z</updated>
      <id>https://danabyerly.com/notes/the-accidental-project/</id>
      <content type="html"><![CDATA[
        <p>There I was, minding my own business working on another project when I noticed that the layout at <a href="https://danabyerly.com/projects/stakes-profiles/">Stakes Profiles</a> had taken a turn for the worse.</p>
<figure class="fig-container">
  <picture>
    <source srcset="https://danabyerly.com/img/sp-whoops.avif" type="image/avif" />
    <source srcset="https://danabyerly.com/img/sp-whoops.webp" type="image/webp" />
    <img src="https://danabyerly.com/img/sp-whoops.jpg" alt="A section with two charts overlapping each other." />
  </picture>
  <figcaption>
  Yeah, it's not supposed to look like that.
  </figcaption>
</figure>
<p>I knew this day was coming, I was just hoping it would arrive a little later. When I built them in 2017 I was <a href="https://danabyerly.com/about/#from-the-beginning">just starting to skill up</a> on webdev after a long hiatus, and I made several not-so-great choices in order to get the project done. The main not-so-great choice was mixing markup and content in WordPress. Don’t do that.</p>
<p>Despite not wanting to deal with it, the timing worked out well. The project I’m doing for a friend needed to go on hold for a few weeks so I decided to do what I thought would be a little test. A few weeks later Stakes Profiles now have <a href="https://stakes-profiles.com/">a standalone home</a>.</p>

      <div class="heading-wrapper">
        <h2 id="the-project">The project
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/the-accidental-project/#the-project">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Stakes Profiles are data visualizations of trends for Thoroughbred horse racing stakes races since 1991. They were created to answer simple questions like “how have favorites performed in this race historically?” and “what kind of running styles have performed well, or not”. The project was active between 2018 and 2019 and is not currently being updated.</p>
<p>Each profile looks at several data points, or angles as they’re called to in racing circles, to show trends using charts. For example for odds and payouts of winners I use a straightforward bar chart to show odds and then include a set of average and median odds and payouts for the full time period and the last years.</p>
<figure class="fig-container">
  <picture>
    <source srcset="https://danabyerly.com/img/sp-kyoaks-odds.avif" type="image/avif" />
    <source srcset="https://danabyerly.com/img/sp-kyoaks-odds.webp" type="image/webp" />
    <img src="https://danabyerly.com/img/sp-kyoaks-odds.jpg" alt="Bar chart showing odds of Kentucky Oaks winners from 1991-2019." loading="lazy" />
  </picture>
</figure>
<p>I built the charts using Google Charts, mostly because they were relatively easy to work with and I could get them to work within WordPress. I also wanted interactive charts rendered from data rather than having to export images. In addition to liking interactive charts, having to update the data and then export and images was one step too many. Ultimately even keeping the data up to date proved to be too much work for the amount of interest they generated (i.e., not much!).</p>
<p>The posts were essentially flat files with all of the writing and charts contained with the post. My goal for the new site was three-fold…</p>
<ol>
<li>Separate the content and layout</li>
<li>Not rework the charts and writing</li>
<li>Create a well-built, more accessible and performant site</li>
</ol>
<p>I did need to do a little tweaking here and there but overall I kept to those goals. It turned out to be easier than I imagined, but it was a journey of both good and bad. The good was <a href="https://www.11ty.dev/">Eleventy</a>, let’s start there.</p>

      <div class="heading-wrapper">
        <h2 id="the-good">The good
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/the-accidental-project/#the-good">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>The original posts lent themselves to setting up a templated layout, which kicked off the effort with a smooth start. They were written in such a way that there was very little variation in the overall structure of each section’s summary. What started as a way to make year-over-year updates manageable ended as a way to make creating an archive easy.</p>
<p>It took about a week of futzing with the template to see where I could plug in data and where it needed to be more freeform. If I were starting this project from scratch I might have gone the <a href="https://danabyerly.com/articles/using-airtable-with-eleventy/">Airtable route</a> as I’ve used Airtable with Eleventy <a href="https://horseracingdatasets.com/">with success</a> on <a href="https://pile-of-hrefs.com/">more than one</a> occasion. But I decided to go with Collections and front matter, and it worked out really well.</p>

      <div class="heading-wrapper">
        <h3 id="front-matter-to-the-rescue">Front Matter to the rescue
      </h3>
        <a class="anchor-link" href="https://danabyerly.com/notes/the-accidental-project/#front-matter-to-the-rescue">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p><a href="https://learneleventyfromscratch.com/lesson/4.html#adding-front-matter-to-our-home-page">Front Matter</a> is very versatile. In addition to allowing you to add tags, publish dates and excerpts for your posts, you can add all sorts of structured data. You can also conditionally display elements based on whether or not a post contains either a key or value in its Front Matter.</p>
<p>For example, in the Odds section, some races had longshot winners that skewed the chart, making  it hard to get a good overall understanding of the data. In those cases I left them out as outliers and noted it before the chart. Using the key of “oddsOutlier” I was able to conditionally display that info if the race has that data.</p>
<p>From the <a href="https://stakes-profiles.com/profiles/breeders-cup-mile/#winners-odds-payouts-1991-2018">Breeders’ Cup Mile Odds section</a>…</p>
<pre class="language-html"><code class="language-html">oddsOutliers: "2011 winner <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>b</span><span class="token punctuation">></span></span>Court Vision<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>b</span><span class="token punctuation">></span></span> has been excluded from the chart below as an outlier at $1 odds of 64.8-1"</code></pre>
<p>Compare that to the <a href="https://stakes-profiles.com/profiles/arlington-million/#winners-odds-payouts-1991-2018">Odds section for the Arlington Million</a>, which had no outliers in the time period.</p>
<p>There’s a standard set of key/value pairs that all profiles share, and then there are three groupings of additional key/value pairs <a href="https://stakes-profiles.com/about/#whats-included-in-each-profile">based on the type of race</a> depending on the type of race.</p>
<p>For example, races for older horses have additional sections that look at how the different age groups have fared and how “run backs”, or horses who have run in the race multiple years have performed.</p>
<p>Each section has an intro, so if the <code>ageIntro</code> key is present the age section is included.</p>
<pre class="language-js"><code class="language-js"><span class="token punctuation">{</span><span class="token operator">%</span> <span class="token keyword">if</span> ageIntro <span class="token operator">%</span><span class="token punctuation">}</span><br /> <span class="token punctuation">{</span><span class="token operator">%</span> include <span class="token string">'partials/age.html'</span><span class="token operator">%</span><span class="token punctuation">}</span><br /> <span class="token operator">&lt;</span>hr role<span class="token operator">=</span><span class="token string">"presentation"</span><span class="token operator">></span><br /><span class="token punctuation">{</span><span class="token operator">%</span> endif <span class="token operator">%</span><span class="token punctuation">}</span></code></pre>
<p>Another nice trick is that you can create arrays with key/value pairs. I used this to populate tables by looping over properties within a Front Matter key.</p>
<p>Using the Breeders’ Cup Mile again, the <a href="https://stakes-profiles.com/profiles/breeders-cup-mile/#odds-by-age-1991-2018">odds by age group</a> table uses this kind of set-up.</p>
<p>The data in Front Matter…</p>
<pre class="language-js"><code class="language-js"><span class="token literal-property property">ageOdds</span><span class="token operator">:</span> <span class="token punctuation">[</span><br /><span class="token punctuation">{</span><span class="token literal-property property">age</span><span class="token operator">:</span> <span class="token string">"3"</span><span class="token punctuation">,</span> <span class="token literal-property property">starter</span><span class="token operator">:</span> <span class="token string">"$16.40"</span><span class="token punctuation">,</span> <span class="token literal-property property">winner</span><span class="token operator">:</span> <span class="token string">"$7.70"</span><span class="token punctuation">}</span><span class="token punctuation">,</span><br /><span class="token punctuation">{</span><span class="token literal-property property">age</span><span class="token operator">:</span> <span class="token string">"4"</span><span class="token punctuation">,</span> <span class="token literal-property property">starter</span><span class="token operator">:</span> <span class="token string">"$19.30"</span><span class="token punctuation">,</span> <span class="token literal-property property">winner</span><span class="token operator">:</span> <span class="token string">"$8.30"</span><span class="token punctuation">}</span><span class="token punctuation">,</span><br /><span class="token punctuation">{</span><span class="token literal-property property">age</span><span class="token operator">:</span> <span class="token string">"5"</span><span class="token punctuation">,</span> <span class="token literal-property property">starter</span><span class="token operator">:</span> <span class="token string">"$22.30"</span><span class="token punctuation">,</span> <span class="token literal-property property">winner</span><span class="token operator">:</span> <span class="token string">"$8.30"</span><span class="token punctuation">}</span><span class="token punctuation">,</span><br /><span class="token punctuation">{</span><span class="token literal-property property">age</span><span class="token operator">:</span> <span class="token string">"6"</span><span class="token punctuation">,</span> <span class="token literal-property property">starter</span><span class="token operator">:</span> <span class="token string">"$21.00"</span><span class="token punctuation">,</span> <span class="token literal-property property">winner</span><span class="token operator">:</span> <span class="token string">"$25.70"</span><span class="token punctuation">}</span><span class="token punctuation">,</span><br /><span class="token punctuation">{</span><span class="token literal-property property">age</span><span class="token operator">:</span> <span class="token string">"7"</span><span class="token punctuation">,</span> <span class="token literal-property property">starter</span><span class="token operator">:</span> <span class="token string">"$25.70"</span><span class="token punctuation">,</span> <span class="token literal-property property">winner</span><span class="token operator">:</span> <span class="token string">"$24.30"</span><span class="token punctuation">}</span><span class="token punctuation">,</span><br /><span class="token punctuation">{</span><span class="token literal-property property">age</span><span class="token operator">:</span> <span class="token string">"8"</span><span class="token punctuation">,</span> <span class="token literal-property property">starter</span><span class="token operator">:</span> <span class="token string">"$10.70"</span><span class="token punctuation">,</span> <span class="token literal-property property">winner</span><span class="token operator">:</span> <span class="token string">"0"</span><span class="token punctuation">}</span><br /><span class="token punctuation">]</span></code></pre>
<p>And then in the partial for the Age section the table loops over the data…</p>
<pre class="language-html"><code class="language-html"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>table</span><span class="token punctuation">></span></span><br />	<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>thead</span><span class="token punctuation">></span></span><br />	  <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>tr</span><span class="token punctuation">></span></span><br />		<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>th</span><span class="token punctuation">></span></span>Age<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>th</span><span class="token punctuation">></span></span><br />		<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>th</span><span class="token punctuation">></span></span>Average Starter Odds<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>th</span><span class="token punctuation">></span></span><br />		<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>th</span><span class="token punctuation">></span></span>Average Winner Odds<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>th</span><span class="token punctuation">></span></span><br />	  <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>tr</span><span class="token punctuation">></span></span><br />	<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>thead</span><span class="token punctuation">></span></span><br />	<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>tbody</span><span class="token punctuation">></span></span><br />	  {% for item in ageOdds %}<br />	  <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>tr</span><span class="token punctuation">></span></span><br />		<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>td</span><span class="token punctuation">></span></span>{{ item.age }} year-olds<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>td</span><span class="token punctuation">></span></span><br />		<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>td</span><span class="token punctuation">></span></span>{{ item.starter }}<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>td</span><span class="token punctuation">></span></span><br />		<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>td</span><span class="token punctuation">></span></span>{{ item.winner }}<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>td</span><span class="token punctuation">></span></span><br />	  <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>tr</span><span class="token punctuation">></span></span><br />	  {% endfor %}<br />	<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>tbody</span><span class="token punctuation">></span></span><br /><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>table</span><span class="token punctuation">></span></span></code></pre>
<p>Which displays the data. You can also <a href="https://stakes-profiles.com/profiles/breeders-cup-mile/#odds-by-age-1991-2018">see it at the site</a>!</p>
<figure class="fig-container">
  <picture>
    <source srcset="https://danabyerly.com/img/sp-odds-table.avif" type="image/avif" />
    <source srcset="https://danabyerly.com/img/sp-odds-table.webp" type="image/webp" />
    <img src="https://danabyerly.com/img/sp-odds-table.jpg" alt="Table displaying average odds of starters and winners by age for the Breeders Cup Mile." loading="lazy" />
  </picture>
</figure>
<p>The Breeders’ Cup Mile is a good Front Matter example for this project in that it has several conditional sections. Feel free to <a href="https://github.com/superterrific/stakes-profiles/blob/main/src/profiles/bc-mile.md?plain=1">view it in all of its 61 lines of glory</a>!</p>

      <div class="heading-wrapper">
        <h3 id="some-improvements">Some improvements
      </h3>
        <a class="anchor-link" href="https://danabyerly.com/notes/the-accidental-project/#some-improvements">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Upgrading the basic HTML and CSS did a lot to improve the overall accessibility. And while the color contrast in the charts was pretty good the first time around, I took a closer look and made several small adjustments to try to ensure that contrast works for everyone.</p>
<p>The biggest change was in the <a href="https://stakes-profiles.com/profiles/breeders-cup-mile/#winners-bettors-choice-field-size-1991-2018">Bettors’ Choice and Field Size charts</a> which have two bars per year. The original version had enough contrast between the two bars but one was too light against the white background. Now the two bars have  3.02:1 ratio contrast between them and both are over 3:1 with the white background.</p>
<p>I also tweaked the colors in the stacked bars for Running Style and <a href="https://stakes-profiles.com/profiles/breeders-cup-mile/#all-starters-by-age-1991-2018">Age</a> to ensure that all colors have at least 3:1 contrast against the white background.</p>
<p>There are a couple of areas for improvement. The <a href="https://stakes-profiles.com/profiles/breeders-cup-mile/#winners-placing-in-prior-race-1991-2018">green and gray bar stacks</a> have 3.69:1 contrast between them but the gray does not have enough contrast against the white background. The <a href="https://stakes-profiles.com/profiles/breeders-cup-mile/#winning-running-styles-1991-2018">running style line charts</a> are a mixed bag (read probably mostly not sufficient contrast) as they colors are Google default.</p>

      <div class="heading-wrapper">
        <h2 id="the-bad">The bad
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/the-accidental-project/#the-bad">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>The “ugh” part of this project are the accessibility issues with Google Charts. The good news is that most of the chart types I used include a tabular representation of the chart data, and those are announced by screen readers.</p>
<p>The bad news is that the data is only announced after the graphical representation of the chart is announced. Every tick, every line, every image of a bar is announced as “an image”, and in some cases that can be upwards of 50 images announced as “an image” before anything useful is announced. And I couldn’t find a way to have only the data announced.</p>
<p>If I were doing this project from the start and decided to use Google Charts, I would hide the charts from screen readers and create my own tabular representation of the data for screen reader users. Unfortunately I don’t have the time or wherewithal to do that now.</p>
<p>In the Intro section of each profile I added the following text for screen readers using <a href="https://piccalil.li/quick-tip/visually-hidden/">visually hidden text</a>…</p>
<blockquote>
<p>A note to screen reader users. The interactive charts on this site are built using Google Charts. There are two major elements to each chart, the images used to display the chart and a tabular representation of the data within the chart. Unfortunately the charts are structured to announce all of the images before announcing the tabular data. In some cases this will mean upwards of 50 images get announced before the data. If you’d like to provide feedback please visit the Accessibility Statement for information.</p>
</blockquote>
<p>I’ve also included information in the <a href="https://stakes-profiles.com/accessibility-statement/">Accessibility Statement</a> (which will look familiar if you read this section since I repurposed a lot of the explanation!). I thought about hiding the charts from screen readers all together and noting it, but thought it was probably best to leave them as is and provide explanation and a method for feedback. And if you have opinions I would love to hear them!</p>
<p>Another “ugh” aspect is the pages with charts take a big performance hit, which is not a surprise considering how many charts I have the on each page. There are probably things I could do to improve performance if I were a little better at JavaScript. I did choose to use the system font stack to help with performance!</p>
<p>One thing I did try was adding <code>{async: true}</code> <a href="https://groups.google.com/g/google-visualization-api/c/WTp83sJwLP0">as suggested here</a> but I didn’t see much of a difference. Going the route of providing charts as images rather than interactive would no doubt improve performance.</p>

      <div class="heading-wrapper">
        <h2 id="whats-next">What’s next?
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/the-accidental-project/#whats-next">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>It’s nice to have the <a href="https://stakes-profiles.com/">Stakes Profiles</a> in a new home. Despite not working out the way I thought they would, they represent a lot of work and provide a different way to interact with racing data than you’ll find in the racing industry. I <a href="https://exactamundo.org/2019/03/13/in-other-racing-data-conversations/">wrote a little bit about that</a> at my semi-defunct racing blog if you’re interested.</p>
<p>I’ve also created a Ko-fi account and added it here and to most of my other projects if you’re inclined to leave me a tip!  Next up I’ll be getting back to the friend’s project and hope to have that wrapped up by the end of November.</p>

      ]]></content>
    </entry>
	
    
    <entry>
      <title>Year one in the books</title>
      <link href="https://danabyerly.com/notes/year-one-in-the-books/"/>
      <updated>2021-09-07T00:00:00Z</updated>
      <id>https://danabyerly.com/notes/year-one-in-the-books/</id>
      <content type="html"><![CDATA[
        <p>I’m happy to report that it’s been a year <a href="https://twitter.com/superterrific/status/1303032995784339458">with this version of the site</a> 🎉.</p>

      <div class="heading-wrapper">
        <h2 id="a-look-back">A look back
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/year-one-in-the-books/#a-look-back">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Initially I set out to create a place where I could share and talk about my side projects as well as whatever I was learning at the time. Over the past year that’s mostly been centered around <a href="https://www.11ty.dev/">Eleventy</a>, the static site generator used to create this site.
I don’t use any analytics on this site so I have no idea which posts were visited the most, but I do have a <a href="https://danabyerly.com/feed.xml">RSS feed</a>, and at least one follower in <a href="https://feedly.com/i/subscription/feed%2Fhttps%3A%2F%2Fdanabyerly.com%2Ffeed.xml">Feedly</a> (which is me, I am my own follower).</p>
<p>Without knowing what anyone else found helpful, here are a few posts that I found helpful and enjoyed writing.</p>
<ul>
<li><a href="https://danabyerly.com/articles/using-airtable-with-eleventy/">Using Airtable with Eleventy</a></li>
<li><a href="https://danabyerly.com/articles/dynamic-heading-levels-in-eleventy/">Dynamic heading levels in Eleventy</a></li>
<li><a href="https://danabyerly.com/notes/testing-forestry-cms-with-eleventy/">Testing Forestry CMS with Eleventy</a></li>
</ul>
<p>In addition to Eleventy I’ve also been learning more accessibility, and I’ve written about that as well. Some highlights include creating <a href="https://danabyerly.com/articles/responsive-and-accessible-data-tables/">accessible and responsive tables</a> for an Eleventy project and taking a look at the level of accessibility of <a href="https://danabyerly.com/articles/do-new-york-city-mayoral-candidates-have-accessible-campaign-sites/">NYC mayoral candidates campaign sites</a>. I’ve also created an <a href="https://danabyerly.com/accessibility-statement/">Accessibility Statement</a> for the site.</p>
<p>The other major topic has been my projects, and in the past year I’ve given four of them major updates and have one that gets updated each year.</p>
<ul>
<li><a href="https://danabyerly.com/notes/random-replay-generator-spiff-up/">Random Replay Generator spiff up</a></li>
<li><a href="https://danabyerly.com/notes/horse-racing-datasets-redesigned/">Horse Racing Datasets redesigned</a></li>
<li><a href="https://danabyerly.com/articles/responsive-and-accessible-data-tables/">Responsive and Accessible Data Tables</a></li>
<li><a href="https://danabyerly.com/notes/migrating-the-pile/">Migrating the Pile</a></li>
<li><a href="https://danabyerly.com/notes/annual-kentucky-derby-8-ball/">Annual Kentucky Derby 8 ball</a></li>
</ul>
<p>I’ve also written about little updates around here like <a href="https://danabyerly.com/notes/a-bit-of-sprucing-up/">the footer and adding a Style Guide</a>, the <a href="https://danabyerly.com/notes/the-sprucing-party-continues/">homepage and Projects landing page</a> and <a href="https://danabyerly.com/notes/fun-with-image-optimization/">optimizing images</a>.</p>
<p>When I launched the site I had an initial <a href="https://danabyerly.com/articles/finally-a-new-site/#whats-next">What’s next list</a>, here’s how it fared…</p>
<p><strong>Completed or at least worked on:</strong></p>
<ul>
<li>Tightening up the CSS</li>
<li>Improving accessibility</li>
<li>Maybe expanding the color palette a bit</li>
<li>Add more details to some of the <a href="https://danabyerly.com/projects/">Projects</a></li>
<li>Add release notes (decided to call it <a href="https://danabyerly.com/changelog/">Changelog</a>)</li>
<li>Keep on fiddling (evergreen!)</li>
</ul>
<p><strong>Still might do:</strong></p>
<ul>
<li>Adding a dark mode for the <code>prefers-color-scheme: dark</code> among you</li>
<li>Adding ability to toggle between dark and light mode</li>
<li>Depending on the volume and type of writing I end up doing I might make individual feeds for <a href="https://danabyerly.com/articles">Articles</a> and <a href="https://danabyerly.com/notes/">Notes</a> (assuming someone other than me eventually subscribes to my RSS feed)</li>
<li>Maybe eventually add a Photos section</li>
</ul>

      <div class="heading-wrapper">
        <h2 id="whats-next">What’s next
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/year-one-in-the-books/#whats-next">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>It’s been fun having the site, I’ve enjoyed tinkering and making improvements as I go. First and foremost the tinkering will continue.</p>
<p>Most of my longer form writing has been the “Hey I just figured this out” style of how-to. I love this approach  and it’s helped me to better understand what I learned as well as <a href="https://twitter.com/superterrific/status/1426199895996764171">remember what I’ve learned</a>. I’ll likely keep doing these.</p>
<p>I’m also going to try to write more observations and thoughts, and maybe even some posts that aren’t about the Web. One idea I’ve been kicking around is doing some Personal Wayback Machine posts of old work. As an Internet Old (and a plain old Old) I have projects going back to the 90s, which can be both embarrassing and awesome.</p>
<p>Now that this site is in pretty good shape and I’ve completed updates on my major side projects, I’m hoping to eventually pick up some small freelance gigs here and there. I’m currently having fun working on a couple of projects for a friend and would like to help independent creative people or small businesses have nice performant, accessible sites. I guess we’ll see how that works out in next year’s “year in review”.</p>

      ]]></content>
    </entry>
	
    
    <entry>
      <title>The sprucing party continues</title>
      <link href="https://danabyerly.com/notes/the-sprucing-party-continues/"/>
      <updated>2021-09-03T00:00:00Z</updated>
      <id>https://danabyerly.com/notes/the-sprucing-party-continues/</id>
      <content type="html"><![CDATA[
        <p>Keeping the momentum of the <a href="https://danabyerly.com/notes/a-bit-of-sprucing-up/">updated footer</a> going, I’ve also updated the <a href="https://danabyerly.com/">homepage</a> and the <a href="https://danabyerly.com/projects/">Projects</a> page. Party popper emoji! Much like the footer, I’ve wanted to update these for awhile.</p>

      <div class="heading-wrapper">
        <h2 id="the-homepage">The homepage
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/the-sprucing-party-continues/#the-homepage">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>This is more fine tuning than overhaul. The original spacing and rhythm were too tight, and the Project cards felt like a first draft, mostly because they were.</p>
<figure class="fig-container">
  <picture>
    <source srcset="https://danabyerly.com/img/HP-old-2021-08-31.avif" type="image/avif" />
    <source srcset="https://danabyerly.com/img/HP-old-2021-08-31.webp" type="image/webp" />
    <img src="https://danabyerly.com/img/HP-old-2021-08-31.jpg" alt="Original version of the homepage showing tight spacing." loading="lazy" />
  </picture>
  <figcaption>
    Not a lot of breathing room between the Recent Writing and Featured Projects section. And the project cards are just a bit too much.
  </figcaption>
</figure>
<p>A few small updates made a big difference…</p>
<ul>
<li>Removed blurbs under section headings</li>
<li>Changed section header color</li>
<li>Simplified the Featured Projects cards</li>
</ul>
<figure class="fig-container">
  <picture>
    <source srcset="https://danabyerly.com/img/HP-new.avif" type="image/avif" />
    <source srcset="https://danabyerly.com/img/HP-new.webp" type="image/webp" />
    <img src="https://danabyerly.com/img/HP-new.jpg" alt="The current version of the homepage showing improved spacing." loading="lazy" />
  </picture>
  <figcaption>
    Better spacing and rhythm with less clutter.
  </figcaption>
</figure>
<p>The updated project card is specific to the homepage. The previous version used the same layout as the Projects landing page, allowing a visitor to view the project page or visit the project directly. I left that option on the Projects landing but stripped it out here for simplicity, thinking that if someone is really interested in <a href="https://danabyerly.com/projects/">my projects</a> it might make more sense to scan them all and decide whether to read more or just visit it.</p>
<p>Since I don’t current use a stats package, mostly for mental hygiene, I have no idea if anyone ever went directly to a project from the homepage. A trade off I’m willing to make!</p>
<figure class="fig-container">
  <picture>
    <source srcset="https://danabyerly.com/img/featured-projects-hover-focus.avif" type="image/avif" />
    <source srcset="https://danabyerly.com/img/featured-projects-hover-focus.webp" type="image/webp" />
    <img src="https://danabyerly.com/img/featured-projects-hover-focus.jpg" alt="The featured projects cards showing the hover and focus state with a glowing magenta background" loading="lazy" />
  </picture>
  <figcaption>
    This is as close to delight as I get.
  </figcaption>
</figure>
<p>If you’ve ever looked around this site you may have noticed I’m a boring designer. My work is frequently devoid of all the little nice touches that put some polish on a UI. The hover and focus state on the Project card is one such detail that could be considered a nice touch, even trending towards delight. The overall approach for the card came from Adrian Roselli’s <a href="https://adrianroselli.com/2020/02/block-links-cards-clickable-regions-etc.html">Block Links, Cards, Clickable Regions, Rows, etc</a>.</p>

      <div class="heading-wrapper">
        <h2 id="projects-landing-page">Projects landing page
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/the-sprucing-party-continues/#projects-landing-page">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Once I got the Featured Project card done this was a quick update, basically just changing colors and leaving the original structure in place.</p>
<figure class="fig-container">
  <picture>
    <source srcset="https://danabyerly.com/img/project-card-old.avif" type="image/avif" />
    <source srcset="https://danabyerly.com/img/project-card-old.webp" type="image/webp" />
    <img src="https://danabyerly.com/img/project-card-old.jpg" alt="The original project card with the text on a dark blue background with light text." loading="lazy" />
  </picture>
  <figcaption>
    The original cards. <a href="https://danabyerly.com/img/projects-old-all.png">View the full page (1.9 MB)</a>
  </figcaption>
</figure>
<figure class="fig-container">
  <picture>
    <source srcset="https://danabyerly.com/img/project-card-new.avif" type="image/avif" />
    <source srcset="https://danabyerly.com/img/project-card-new.webp" type="image/webp" />
    <img src="https://danabyerly.com/img/project-card-new.jpg" alt="The new project card with the text on a light blue/gray background." loading="lazy" />
  </picture>
  <figcaption>
    The new cards. <a href="https://danabyerly.com/img/projects-new-all.png">View the full page (1.9 MB)</a>
  </figcaption>
</figure>
<p>In isolation I liked the original project cards, but a <a href="https://danabyerly.com/img/projects-old-all.png">big long page of them</a> was a bit much. The new toned-down design is a bit more boring (hello!) but overall easier to scan. And if ever get around to making a dark mode for this site that design will be coming back!</p>
<p>There are a few unsavory image sizing things that happen as the screen is resized. I’m going to come back and redo most of the images and standardize the sizing or aspect ratio a bit more to help with that.</p>
<p>I also found a bug that’s been out there this whole time. The grid container I used for the cards had the minimum width set at 18rem, which meant that on the smallest screens it was too wide. I fixed that by setting the minimum to 16rem.</p>

      <div class="heading-wrapper">
        <h2 id="whats-next">What’s next
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/the-sprucing-party-continues/#whats-next">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>It’s been a year <a href="https://danabyerly.com/articles/finally-a-new-site/">since I launched this version of the site</a>, and I’ve been doing some thinking about what I’ve learned and what to do next with the site. More on that in a bit.</p>

      ]]></content>
    </entry>
	
    
    <entry>
      <title>A bit of sprucing up</title>
      <link href="https://danabyerly.com/notes/a-bit-of-sprucing-up/"/>
      <updated>2021-08-27T00:00:00Z</updated>
      <id>https://danabyerly.com/notes/a-bit-of-sprucing-up/</id>
      <content type="html"><![CDATA[
        <p>This summer I’ve been working on a couple of fun projects for a non-technical friend. It’s been enjoyable and I’m looking forward to sharing them. One is pretty far along and the other is in the brainstorming/design phase. Both of them are on hold awaiting input, assets, feedback, etc. You know, the usual!</p>
<p>While on hold I worked on a long standing to do item for this site (redesigning the footer) as well as a bonus “what the hell!” item (a minimal <a href="https://danabyerly.com/style-guide/">Style Guide</a>).</p>

      <div class="heading-wrapper">
        <h2 id="footer">Footer
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/a-bit-of-sprucing-up/#footer">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>When I launched the current version of the site last year I rushed a couple of things at the end, one of them was the footer. The original version was OK, but a bit jumbled, especially on smaller screens.</p>
<figure class="fig-container">
  <picture>
    <source srcset="https://danabyerly.com/img/footer-orig-lg.avif" type="image/avif" />
    <source srcset="https://danabyerly.com/img/footer-orig-lg.webp" type="image/webp" />
    <img src="https://danabyerly.com/img/footer-orig-lg.png" alt="Previous version of the footer on a larger screen showing a two column layout of links with Back to top at the top of the right column." loading="lazy" />
  </picture>
  <picture>
    <source srcset="https://danabyerly.com/img/footer-orig-sm.avif" type="image/avif" />
    <source srcset="https://danabyerly.com/img/footer-orig-sm.webp" type="image/webp" />
    <img src="https://danabyerly.com/img/footer-orig-sm.png" alt="Previous version of the footer on a smaller screen showing a single column layout with Back to top between two groups of links instead of on top of the list of links." class="img-center" loading="lazy" />
  </picture>
  <figcaption>
    The previous version of the footer was OK on larger screen, but on smaller screens the "Back to top" didn't make sense between the blocks of links.
  </figcaption>
</figure>
<p>After using <a href="https://personalsit.es/">Personal Sites</a> to quickly look at a bunch of different sites I was inspired to knock out a more simplified version.</p>
<figure class="fig-container">
  <picture>
    <source srcset="https://danabyerly.com/img/footer-new-lg.avif" type="image/avif" />
    <source srcset="https://danabyerly.com/img/footer-new-lg.webp" type="image/webp" />
    <img src="https://danabyerly.com/img/footer-new-lg.png" alt="The current version of the footer on a larger screen showing a three column layout of links and Back to top." loading="lazy" />
  </picture>
  <picture>
    <source srcset="https://danabyerly.com/img/footer-new-sm.avif" type="image/avif" />
    <source srcset="https://danabyerly.com/img/footer-new-sm.webp" type="image/webp" />
    <img src="https://danabyerly.com/img/footer-new-sm.jpg" alt="The current version of the footer on a smaller screen showing a single column layout." class="img-center" loading="lazy" />
  </picture>
  <figcaption>
    The current version of the footer lays out a little a nicer.
  </figcaption>
</figure>
<p>The changes include…</p>
<ul>
<li>Moving to three columns for links</li>
<li>Removing “Back to top”</li>
<li>Removing underline from list of links, but leaving underlines in sentences</li>
</ul>
<p>Initially I was going to get rid of the icons, but I kind of like them, and the new layout addressed what was annoying me about the original layout. I’m going to add the “Back to top” within the content area for posts and project pages, probably as a text link below the “Next” and “Previous” paging, but it’s on the to do list for now.</p>

      <div class="heading-wrapper">
        <h2 id="style-guide">Style guide
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/a-bit-of-sprucing-up/#style-guide">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>This was relatively low on my list, but <a href="https://personalsit.es/">Personal Sites</a> made it so easy to look around that I got inspired <a href="https://danabyerly.com/style-guide/">to do this one too</a>. It’s minimal for now but I might come back and create a specific template to make it easier to illustrate state-specific things, like the style used for selected text.</p>

      <div class="heading-wrapper">
        <h2 id="whats-next">What’s next
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/a-bit-of-sprucing-up/#whats-next">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>It’s coming up on a year since I launched this version of site and I’m going to try to get at least one more thing on the list done before then. Wish me luck!</p>

      ]]></content>
    </entry>
	
    
    <entry>
      <title>Migrating the Pile</title>
      <link href="https://danabyerly.com/notes/migrating-the-pile/"/>
      <updated>2021-07-19T00:00:00Z</updated>
      <id>https://danabyerly.com/notes/migrating-the-pile/</id>
      <content type="html"><![CDATA[
        <p>Early in the pandemic I threw together <a href="https://pile-of-hrefs.com/">Pile of hrefs</a>, a personal bookmarking site. I had a number of different ways to save links but they were disjointed and none them worked well enough that I used them consistently.</p>
<p>Pinboard seemed like the most likely candidate as it’s easy to add and tag links, but the lack of responsiveness meant I wasn’t using it beyond adding items. There are several Pinboard apps that offer a better viewing experience, but I didn’t love any of them either. So I used the nervous “what the hell is going on??” energy of Spring 2020 to build the Pile in a week.</p>

      <div class="heading-wrapper">
        <h2 id="original-version">Original version
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/migrating-the-pile/#original-version">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>The initial version was built before I <a href="https://piccalil.li/course/learn-eleventy-from-scratch/">learned how to use Eleventy</a> and used a <a href="https://en.wikipedia.org/wiki/Rube_Goldberg_machine">Rube Goldberg-esque</a> mash-up of static site generator <a href="https://sergey.cool/">Sergey</a> with <a href="https://vuejs.org/">Vue</a> as a templating language and to grab the links from <a href="https://airtable.com/">Airtable</a>. I did an <a href="https://www.notion.so/superterrific/Pile-of-hrefs-Project-80f1667163bd41a2ac69fb3c1b4326e7">extensive write up</a> for the curious among you.</p>
<p>Part of the <a href="https://www.notion.so/superterrific/Pile-of-hrefs-Project-80f1667163bd41a2ac69fb3c1b4326e7">original write up</a> details how to save links into Airtable. At first the workflow was fine but eventually I found that I wasn’t keeping up with adding links because there was too much manual entry. I needed to figure out if there was an easier way. I thought about just using <a href="https://www.pinboard.in/api/v2/overview">Pinboard and its API</a> directly but the reason I chose Airtable was that I like having an explicit field for source and two date fields (published and added).</p>
<p>I remembered that I had a <a href="https://getpocket.com/">Pocket</a> account and started using it to save links. This turned out to be ideal for saving but not for browsing links. One problem is that’s it doesn’t link directly to the original article, but provides a reading view within Pocket. It’s fine as a reading experience, but I’d rather give my traffic to the authors directly and skip Pocket all together, especially considering that Pocket is <a href="https://themarkup.org/blacklight?url=getpocket.com">letting Google track its users around the web</a>.</p>

      <div class="heading-wrapper">
        <h2 id="enter-eleventy-and-pocket">Enter Eleventy and Pocket
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/migrating-the-pile/#enter-eleventy-and-pocket">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>If you’re trying to figure out how to do something with Eleventy there’s a good chance  someone in the Eleventy community has written about it! In fact I remembered that I had a Pocket account after seeing Michael Scharnagl’s <a href="https://justmarkup.com/articles/2021-01-19-integrate-pocket-in-eleventy/">Integrate Pocket in Eleventy</a> post earlier in the year.</p>
<p>I started by using Scharnagl’s approach in hopes that I could just do one step of saving and tagging in Pocket, create a daily build and forget the rest. Unfortunately there are a few things not available in the Pocket API that I find useful, so the next step was moving things from Pocket to Airtable, and then to Eleventy. I’ve already used <a href="https://danabyerly.com/articles/using-airtable-with-eleventy/">Airtable and Eleventy together</a> so I needed to figure out the Pocket to Airtable part.</p>

      <div class="heading-wrapper">
        <h2 id="zapped">Zapped
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/migrating-the-pile/#zapped">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p><a href="https://zapier.com/">Zapier</a> is my workflow tool of choice for Rube Goldberg Machine implementations, and it was pretty straightforward to get links from Pocket to Airtable.</p>
<p>I set it up to trigger on tagging an item with “pile”. This will bring most of the information I was already collecting into Airtable, but I’ll still need to add a few things. I’ll have to kick the tires to see if it’s an enough of an improvement to sustain regular usage but the first impression is mildly optimistic.</p>
<p>I’m currently using a <a href="https://docs.netlify.com/configure-builds/build-hooks/">Netlify build hook</a> to trigger builds via command line. This will pick up any updates in Airtable, but I plan on setting up a scheduled build using Zapier once I work out a good flow.</p>

      <div class="heading-wrapper">
        <h2 id="fingers-crossed">Fingers crossed!
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/migrating-the-pile/#fingers-crossed">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>I’ve been using the new set up for almost two weeks and so far it’s much easier to add links. And one benefit is that I can save links in Pocket when I see them and then come back to tag them and add info in Airtable later. In the last version I frequently didn’t save thing because it wasn’t the right time to do multiple steps, so the flexibility in the current set up feels like a nice improvement.</p>
<p>If you’re curious about using Airtable with Eleventy I wrote up <a href="https://danabyerly.com/articles/using-airtable-with-eleventy/">a detailed post</a>. It’s pretty straightforward to <a href="https://danabyerly.com/articles/using-airtable-with-eleventy/#api-call-and-listing-records">set up the API call</a> and I used the method to <a href="https://danabyerly.com/articles/using-airtable-with-eleventy/#listing-by-tag">set up the tag pages</a>.</p>
<p>Another benefit is that moving Eleventy makes the site super zippy. I also added pagination, which makes navigating the full set more manageable. And, I really like working with Eleventy (in case that wasn’t already apparent!).</p>
<p>You can also learn more about <a href="https://pile-of-hrefs.com/">The Pile</a> at its <a href="https://danabyerly.com/projects/pile-of-hrefs/">project page</a>.</p>

      ]]></content>
    </entry>
	
    
    <entry>
      <title>How to turn off Browsersync ghostMode in Eleventy</title>
      <link href="https://danabyerly.com/notes/how-to-turn-off-browsersync-ghostmode-in-eleventy/"/>
      <updated>2021-07-04T00:00:00Z</updated>
      <id>https://danabyerly.com/notes/how-to-turn-off-browsersync-ghostmode-in-eleventy/</id>
      <content type="html"><![CDATA[
        <p>In your <code>eleventy.js</code> file within the module.exports section add the following…</p>
<pre class="language-js"><code class="language-js">  eleventyConfig<span class="token punctuation">.</span><span class="token function">setBrowserSyncConfig</span><span class="token punctuation">(</span><span class="token punctuation">{</span><br />    <span class="token literal-property property">ghostMode</span><span class="token operator">:</span> <span class="token boolean">false</span><br />  <span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span></code></pre>
<p>Eleventy uses <a href="https://browsersync.io/">Browsersync</a> to serve your site locally. ghostMode <a href="https://browsersync.io/docs/options#option-ghostMode">is the option</a> that mirrors clicking, scrolling and other actions across devices.</p>
<p>For example, if you have the same page open in Firefox and Chrome and click a link in Firefox, both browsers will load the linked page. Scroll the page on your laptop and it will also scroll your phone or tablet, etc.</p>
<p>I’ve found this feature to be very handy but encountered a scenario where I needed to disable it. I was working on a project and fired up <a href="https://sizzy.app/">Sizzy</a> to view it across browsers and devices. It had been awhile since I used Sizzy and I was greeted with this message…</p>
<figure class="fig-container">
  <picture>
    <source srcset="https://danabyerly.com/img/ghostMode.avif" type="image/avif" />
    <source srcset="https://danabyerly.com/img/ghostMode.webp" type="image/webp" />
    <img src="https://danabyerly.com/img/ghostMode.png" alt="An informational pop-up that reads: Browsersync can conflict with Sizzy's synchronization features. We recommend turning off Browsersync's ghost mode option if you are having troubles using Sizzy." loading="lazy" />
  </picture>
</figure>
<p>I didn’t even know ghostMode was an option and thought Browsersync just worked that way! After a bit of searching I found <a href="https://github.com/11ty/eleventy/issues/841">this thread</a> about disabling it in the <a href="https://github.com/11ty/eleventy-base-blog">Eleventy Base Blog starter</a> and took the example from there.</p>
<p>There are plenty of other <a href="https://browsersync.io/docs/options">configurable options</a> in Browsersync. 11ty Rocks also has an example for <a href="https://11ty.rocks/eleventyjs/browsersync/">opening a browser on launch</a>.</p>
<p>Happy reloading!</p>

      ]]></content>
    </entry>
	
    
    <entry>
      <title>Do New York City mayoral candidates have accessible campaign sites?</title>
      <link href="https://danabyerly.com/articles/do-new-york-city-mayoral-candidates-have-accessible-campaign-sites/"/>
      <updated>2021-06-14T00:00:00Z</updated>
      <id>https://danabyerly.com/articles/do-new-york-city-mayoral-candidates-have-accessible-campaign-sites/</id>
      <content type="html"><![CDATA[
        <p>A few weeks ago I was watching the first Democratic primary debate for New York City mayor. There are nine candidates! I only knew of a few of them so I started visiting their sites to learn more.</p>
<p>Rather than learning more about their platforms, I was struck by the amount of notable accessibility issues. Suddenly I was opening DevTools to check color contrast ratios and tabbing around looking for focus indication. Before too long I created a spreadsheet to track what I was finding, and the findings were not good.</p>
<p>According to the Web Accessibility Initiative (WAI) <a href="https://www.w3.org/WAI/fundamentals/accessibility-intro/">web accessibility is defined</a> as “websites, tools, and technologies that are designed and developed so that people with disabilities can use them”. The <a href="https://www.w3.org/WAI/standards-guidelines/wcag/">Web Content Accessibility Guidelines (WCAG)</a> provide detailed information to help ensure that what we build on the web can be used by everyone.</p>
<p>Since it’s unlikely that <a href="https://twitter.com/patkiernan/status/1397700475743571969">either of the Republican candidates</a> will win, one of these nine will become the next Mayor of New York City. What does the lack of accessibility in their campaign sites say about their commitment to accessibility for the citizens of New York City? Or their commitment to an equitable and inclusive New York City?</p>
<p>Also of note, nine candidates hired nine teams to create their sites and not one of them created a fully accessible site. As much as this an unfortunate statement about the candidates, it also highlights that creating digital experiences that work for everyone is not even close to being the norm.</p>

      <div class="heading-wrapper">
        <h2 id="caveats">Caveats
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/articles/do-new-york-city-mayoral-candidates-have-accessible-campaign-sites/#caveats">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>First and foremost, I am <strong>not an accessibility expert</strong> and this is <strong>not a proper accessibility audit!</strong> I’m a designer, developer, accessibility advocate and a citizen of New York City.</p>
<ul>
<li>This is a high-level look at the basics only, For example I looked at heading levels but not the overall structure and semantics of the page.</li>
<li>The candidates could address every issue I found and their site could still not be accessible! Although any fixes would improve accessibility, which is always a good thing.</li>
<li>This is not a design review or critique.</li>
<li>The <a href="https://danabyerly.com/articles/do-new-york-city-mayoral-candidates-have-accessible-campaign-sites/#whats-being-reviewed">What’s being reviewed section</a> goes into detail about what is reviewed, but here’s what is <strong>not</strong> reviewed:
<ul>
<li>Aria usage.</li>
<li>Page structure and semantics beyond heading levels.</li>
<li>Contrast on hover states.</li>
<li>Text links visually indicated by something other than color (e.g., underline, with an icon).</li>
<li>Meaningful <code>alt</code> text, although it is mentioned in a few places.</li>
<li>Whether sites using motion respect user settings.</li>
<li>Whether a site had dark mode and respected user settings.</li>
</ul>
</li>
</ul>

      <div class="heading-wrapper">
        <h2 id="method">Method
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/articles/do-new-york-city-mayoral-candidates-have-accessible-campaign-sites/#method">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><ul>
<li>I only reviewed the homepage of each site.</li>
<li>I used a combination of manual checking, <a href="https://www.tpgi.com/arc-platform/arc-toolkit/">ARC Toolkit plugin</a>, <a href="https://wave.webaim.org/">WAVE</a>, <a href="https://validator.w3.org/">W3C HTML Validator</a> and <a href="https://developers.google.com/speed/pagespeed/insights/">Page Speed Insights</a>.</li>
<li>I only tested on desktop primarily using Chrome, Safari and Firefox (my browser of choice).
<ul>
<li>Did not review on mobile.</li>
<li>Did not review with a screen reader or any other assistive technology.</li>
</ul>
</li>
</ul>

      <div class="heading-wrapper">
        <h2 id="whats-being-reviewed">What’s being reviewed
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/articles/do-new-york-city-mayoral-candidates-have-accessible-campaign-sites/#whats-being-reviewed">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>I chose 10 items to review for each of the candidate’s sites. In the course of writing this post a few of the sites have made updates and one site was completely redesigned. The last in-depth reviews were done over the last weekend in May with spot checks done in the days leading up to publishing this post.</p>
<p>I’ve included a candidate scorecard in each review section as well as a section for <a href="https://danabyerly.com/articles/do-new-york-city-mayoral-candidates-have-accessible-campaign-sites/#results-by-candidate">each candidate</a> that includes their full results with more detail about each review.</p>
<p>Explanations in the review criteria are not inclusive of all the ways in which visitors may use the sites, and are meant to give some examples to illustrate the importance of the standards.</p>
<blockquote>
<p>As a general rule, keep in mind that you can’t predict all the ways your visitors choose to browse the web. <span class="no-wrap">— <a href="https://hiddedevries.nl/en/blog/2019-06-06-indicating-focus-to-improve-accessibility">Hidde DeVries</a></span></p>
</blockquote>

      <div class="heading-wrapper">
        <h3 id="is-there-a-skip-link">Is there a “Skip Link”?
      </h3>
        <a class="anchor-link" href="https://danabyerly.com/articles/do-new-york-city-mayoral-candidates-have-accessible-campaign-sites/#is-there-a-skip-link">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>A “Skip Link” allows people using keyboards, screen readers or other assistive input devices a way to bypass a site’s navigation and skip to the main content. A sighted person using a mouse can easily scroll to a site’s main content, but keyboards, screen readers and other assistive devices traverse the page sequentially using <a href="https://developers.google.com/web/fundamentals/accessibility/focus/">focusable elements</a> such as links, form fields and buttons. Providing a “Skip Link” ensures that everyone can easily navigate through your site.</p>
<p>To test for a “Skip Link” press the tab key after the page has loaded, if a “Skip Link” is present it will typically appear in the upper left corner or centered at the top of the screen.</p>
<figure class="fig-container">
  <picture>
    <source srcset="https://danabyerly.com/img/skip-links.avif" type="image/avif" />
    <source srcset="https://danabyerly.com/img/skip-links.webp" type="image/webp" />
    <img src="https://danabyerly.com/img/skip-links.png" alt="Examples of Skip Links from several of the candidate's sites." loading="lazy" />
  </picture>
  <figcaption>
    Examples of Skip Links from some of the candidate's sites: Dianne Morales (top left), Kathryn Garcia (top right), Ray McGuire (bottom left) and Shaun Donovan (bottom right).
  </figcaption>
</figure>

      <div class="heading-wrapper">
        <h4 id="skip-link-review-results">Skip Link review results
      </h4>
        <a class="anchor-link" href="https://danabyerly.com/articles/do-new-york-city-mayoral-candidates-have-accessible-campaign-sites/#skip-link-review-results">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Candidates passed: 4 out of 9</p>
<table>
<thead>
<tr>
<th>Candidate</th>
<th>Outcome</th>
</tr>
</thead>
<tbody>
<tr>
<td>Andrew Yang</td>
<td>Fail</td>
</tr>
<tr>
<td>Dianne Morales</td>
<td><strong>Pass</strong></td>
</tr>
<tr>
<td>Eric Adams</td>
<td>Fail</td>
</tr>
<tr>
<td>Kathryn Garcia</td>
<td><strong>Pass</strong></td>
</tr>
<tr>
<td>Maya Wiley</td>
<td>Fail</td>
</tr>
<tr>
<td>Ray McGuire</td>
<td><strong>Pass</strong></td>
</tr>
<tr>
<td>Scott Stringer</td>
<td>Fail</td>
</tr>
<tr>
<td>Shaun Donovan</td>
<td><strong>Pass</strong></td>
</tr>
</tbody>
</table>

      <div class="heading-wrapper">
        <h4 id="learn-more-about-skip-links">Learn more about Skip Links
      </h4>
        <a class="anchor-link" href="https://danabyerly.com/articles/do-new-york-city-mayoral-candidates-have-accessible-campaign-sites/#learn-more-about-skip-links">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><ul>
<li><a href="https://webaim.org/techniques/skipnav/">WebAIM: Skip Navigation Links</a></li>
<li><a href="https://www.digitala11y.com/understanding-sc-2-4-1-bypass-blocks/">Digital A11y: Understanding SC 2.4.1 Bypass Blocks</a></li>
<li><a href="https://www.youtube.com/watch?v=kVXVeq6TMJk">TetraLogical YouTube: Quick Accessibility Test - Skip Link</a></li>
<li><a href="https://css-tricks.com/how-to-create-a-skip-to-content-link/">CSS Tricks: How to Create a “Skip to Content” Link</a></li>
</ul>
<hr />

      <div class="heading-wrapper">
        <h3 id="keyboard-only-navigation">Keyboard only navigation
      </h3>
        <a class="anchor-link" href="https://danabyerly.com/articles/do-new-york-city-mayoral-candidates-have-accessible-campaign-sites/#keyboard-only-navigation">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Dexterity issues or motor impairment are a few of the reasons someone may use a keyboard, <a href="https://axesslab.com/switches/">switch</a> or other type of assistive input device to interact with your site.</p>
<p>Unlike using a mouse, a person using a keyboard or other device has to navigate sequentially through the site, tabbing through links and other <a href="https://developers.google.com/web/fundamentals/accessibility/focus/">focusable elements</a>.</p>
<p>To test the candidate’s sites I used the tab key to see if I could make it all the way through their homepage in a logical order with the ability to interact with all of their content.</p>

      <div class="heading-wrapper">
        <h4 id="keyboard-navigation-review-results">Keyboard navigation review results
      </h4>
        <a class="anchor-link" href="https://danabyerly.com/articles/do-new-york-city-mayoral-candidates-have-accessible-campaign-sites/#keyboard-navigation-review-results">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Candidates passed: 4 out of 9</p>
<table>
<thead>
<tr>
<th>Candidate</th>
<th>Outcome</th>
</tr>
</thead>
<tbody>
<tr>
<td>Andrew Yang</td>
<td><strong>Pass</strong></td>
</tr>
<tr>
<td>Dianne Morales</td>
<td>Fail</td>
</tr>
<tr>
<td>Eric Adams</td>
<td><strong>Pass</strong></td>
</tr>
<tr>
<td>Kathryn Garcia</td>
<td>Fail</td>
</tr>
<tr>
<td>Maya Wiley</td>
<td><strong>Pass</strong></td>
</tr>
<tr>
<td>Ray McGuire</td>
<td><strong>Pass</strong></td>
</tr>
<tr>
<td>Scott Stringer</td>
<td>Fail</td>
</tr>
<tr>
<td>Shaun Donovan</td>
<td>Fail</td>
</tr>
</tbody>
</table>

      <div class="heading-wrapper">
        <h4 id="learn-more-about-keyboard-navigation">Learn more about keyboard navigation
      </h4>
        <a class="anchor-link" href="https://danabyerly.com/articles/do-new-york-city-mayoral-candidates-have-accessible-campaign-sites/#learn-more-about-keyboard-navigation">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><ul>
<li><a href="https://www.youtube.com/watch?v=ahDuaWKSGZA">TetraLogical YouTube: Quick Accessibility Test - Keyboard Support</a></li>
<li><a href="https://www.nngroup.com/articles/keyboard-accessibility/">Nielson Norman Group: Keyboard-only Navigation for Improved Accessibility</a></li>
<li><a href="https://webaim.org/techniques/keyboard/">WebAIM: Keyboard Accessibility</a></li>
<li><a href="https://www.w3.org/WAI/WCAG21/Understanding/keyboard.html">W3C: Understanding Success Criterion 2.1.1: Keyboard</a></li>
</ul>
<hr />

      <div class="heading-wrapper">
        <h3 id="visible-focus-indication">Visible focus indication
      </h3>
        <a class="anchor-link" href="https://danabyerly.com/articles/do-new-york-city-mayoral-candidates-have-accessible-campaign-sites/#visible-focus-indication">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Visible focus indication goes hand in hand with keyboard and <a href="https://axesslab.com/switches/">switch</a> usage. Tabbing through a site with a keyboard navigates the page by sequentially moving through each element that can receive input. When the element is selected it is said to have “focus”.</p>
<p>Links, form fields and buttons are examples of elements that can receive input, also referred to as <a href="https://developers.google.com/web/fundamentals/accessibility/focus/">focusable elements</a>. It’s crucial to visibly indicate that an element has focus to allow sighted visitors to quickly orient their location on the page.</p>
<p><a href="https://www.w3.org/WAI/WCAG22/Understanding/focus-appearance-minimum.html">Web Content Accessibility Guidelines (WCAG) AA standards</a> requires focused elements to have a 3:1 color contrast ratio between the element and its background.</p>
<p>While tabbing through the candidate’s sites to check keyboard navigation I also checked for visible focus indication. If there was visible focus on some, but not all focusable elements it was counted as a fail. It was also counted as a fail if the visible focus did not meet the <a href="https://www.w3.org/WAI/WCAG22/Understanding/focus-appearance-minimum.html">3:1 color contrast ratio</a>.</p>
 <figure class="fig-container">
	 <picture>
		 <source srcset="https://danabyerly.com/img/focus-indication.avif" type="image/avif" />
		 <source srcset="https://danabyerly.com/img/focus-indication.webp" type="image/webp" />
		 <img src="https://danabyerly.com/img/focus-indication.png" alt="Examples of focus indication from several of the candidate's sites." loading="lazy" />
	 </picture>
	 <figcaption>
		 Examples of focus indication from some of the candidate's sites: Ray McGuire (top left), Eric Adams (top right), Maya Wiley (bottom left) and Dianne Morales (bottom right).
	 </figcaption>
 </figure>

      <div class="heading-wrapper">
        <h4 id="focus-indication-review-results">Focus indication review results
      </h4>
        <a class="anchor-link" href="https://danabyerly.com/articles/do-new-york-city-mayoral-candidates-have-accessible-campaign-sites/#focus-indication-review-results">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Candidates passed: 0 out of 9</p>
<table>
<thead>
<tr>
<th>Candidate</th>
<th>Outcome</th>
</tr>
</thead>
<tbody>
<tr>
<td>Andrew Yang</td>
<td>Fail</td>
</tr>
<tr>
<td>Dianne Morales</td>
<td>Fail</td>
</tr>
<tr>
<td>Eric Adams</td>
<td>Fail</td>
</tr>
<tr>
<td>Kathryn Garcia</td>
<td>Fail</td>
</tr>
<tr>
<td>Maya Wiley</td>
<td>Fail</td>
</tr>
<tr>
<td>Ray McGuire</td>
<td>Fail</td>
</tr>
<tr>
<td>Scott Stringer</td>
<td>Fail</td>
</tr>
<tr>
<td>Shaun Donovan</td>
<td>Fail</td>
</tr>
</tbody>
</table>

      <div class="heading-wrapper">
        <h4 id="learn-more-about-focus-indication">Learn more about focus indication
      </h4>
        <a class="anchor-link" href="https://danabyerly.com/articles/do-new-york-city-mayoral-candidates-have-accessible-campaign-sites/#learn-more-about-focus-indication">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><ul>
<li><a href="https://developers.google.com/web/fundamentals/accessibility/focus/">Google Accessibility Guide: What is Focus?</a></li>
<li><a href="https://www.w3.org/WAI/WCAG22/Understanding/focus-appearance-minimum.html">W3C: Understanding Success Criteria 2.4.11: Focus Appearance</a></li>
<li><a href="https://www.deque.com/blog/give-site-focus-tips-designing-usable-focus-indicators/">Deque: How to Design Useful and Usable Focus Indicators</a></li>
<li><a href="https://hiddedevries.nl/en/blog/2019-06-06-indicating-focus-to-improve-accessibility">Hidde Devries: Indicating Focus to Improve Accessibility</a></li>
</ul>
<hr />

      <div class="heading-wrapper">
        <h3 id="color-contrast">Color contrast
      </h3>
        <a class="anchor-link" href="https://danabyerly.com/articles/do-new-york-city-mayoral-candidates-have-accessible-campaign-sites/#color-contrast">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Sufficient color contrast between content and the background ensures that low vision and colorblind visitors are able read and interact with your content. It’s also helpful for all sighted visitors in conditions with low light or screen glare.</p>
<p>The Web Content Accessibility Guidelines (WCAG) has set minimum contrast ratios for <a href="https://webaim.org/articles/contrast/#sc143">text</a> and <a href="https://webaim.org/articles/contrast/#sc1411">non-text elements</a> such as buttons, form fields and icons.</p>
<p>Text on background images can make meeting and testing color contrast tricky, and many of the candidates have text over background images. I used a mix of tools and manual spot testing when reviewing the candidates sites.</p>
<figure class="fig-container">
	<picture>
		<source srcset="https://danabyerly.com/img/color-contrast.avif" type="image/avif" />
		<source srcset="https://danabyerly.com/img/color-contrast.webp" type="image/webp" />
		<img src="https://danabyerly.com/img/color-contrast.png" alt="Examples of good color contrast from several of the candidate's sites." loading="lazy" />
	</picture>
	<figcaption>
		Examples of good color contrast from some of the candidate's sites: Maya Wiley (top left), Andrew Yang (top right), Kathryn Garcia (bottom left) and Eric Adams (bottom right).
	</figcaption>
</figure>

      <div class="heading-wrapper">
        <h4 id="color-contrast-review-results">Color Contrast review results
      </h4>
        <a class="anchor-link" href="https://danabyerly.com/articles/do-new-york-city-mayoral-candidates-have-accessible-campaign-sites/#color-contrast-review-results">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Candidates passed: 0 out of 9</p>
<table>
<thead>
<tr>
<th>Candidate</th>
<th>Outcome</th>
</tr>
</thead>
<tbody>
<tr>
<td>Andrew Yang</td>
<td>Fail</td>
</tr>
<tr>
<td>Dianne Morales</td>
<td>Fail</td>
</tr>
<tr>
<td>Eric Adams</td>
<td>Fail</td>
</tr>
<tr>
<td>Kathryn Garcia</td>
<td>Fail</td>
</tr>
<tr>
<td>Maya Wiley</td>
<td>Fail</td>
</tr>
<tr>
<td>Ray McGuire</td>
<td>Fail</td>
</tr>
<tr>
<td>Scott Stringer</td>
<td>Fail</td>
</tr>
<tr>
<td>Shaun Donovan</td>
<td>Fail</td>
</tr>
</tbody>
</table>

      <div class="heading-wrapper">
        <h4 id="learn-more-about-color-contrast">Learn more about color contrast
      </h4>
        <a class="anchor-link" href="https://danabyerly.com/articles/do-new-york-city-mayoral-candidates-have-accessible-campaign-sites/#learn-more-about-color-contrast">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><ul>
<li><a href="https://webaim.org/articles/contrast/">WebAIM: Contrast and Color Accessibility</a></li>
<li><a href="https://www.w3.org/WAI/WCAG21/Understanding/contrast-minimum.html">W3C: Understanding Success Criterion 1.4.3: Contrast</a></li>
<li><a href="https://www.digitala11y.com/understanding-sc-1-4-11-non-text-contrast/">Digital A11y: # Understanding SC 1.4.11 Non-text Contrast</a></li>
<li><a href="https://whocanuse.com/">Who Can Use: Color Contrast Checker</a></li>
<li><a href="https://www.a11yproject.com/posts/2021-06-07-fixing-contrast-issues-on-your-own-site-and-elsewhere/">The A11y Project: Fixing contrast issues, on your own site and elsewhere</a></li>
</ul>
<hr />

      <div class="heading-wrapper">
        <h3 id="correct-heading-level-outline">Correct heading level outline
      </h3>
        <a class="anchor-link" href="https://danabyerly.com/articles/do-new-york-city-mayoral-candidates-have-accessible-campaign-sites/#correct-heading-level-outline">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Heading levels refer to the <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Heading_Elements">HTML heading elements</a> of <code>h1</code> - <code>h6</code>. Correctly ordered heading levels <a href="https://usability.yale.edu/web-accessibility/articles/headings#benefits">have a number of benefits</a>, including allowing screen reader users to listen to a list of all headings and skip to any one of them to begin reading.</p>
<p>A common mistake with headings is using them to apply font size. This approach typically results in non-sequential or missing headings. Several of the candidate’s sites did not have a <code>h1</code> or skipped levels.</p>
<p>I included heading level outline in each candidate’s W3C HTML Validator test, it’s also included in their WAVE test. I’ve linked to the results of each in the candidate’s individual results.</p>
<figure class="fig-container">
	<picture>
		<source srcset="https://danabyerly.com/img/heading-levels.avif" type="image/avif" />
		<source srcset="https://danabyerly.com/img/heading-levels.webp" type="image/webp" />
		<img src="https://danabyerly.com/img/heading-levels.png" alt="Examples of levels from Ray McGuire and Scott Stringer's sites." loading="lazy" />
	</picture>
	<figcaption>
		Examples of correct and incorrect heading levels. Ray McGuire's heading levels (left) are correct and Scott Stringer's heading levels (right) are not in correct sequential order.
	</figcaption>
</figure>

      <div class="heading-wrapper">
        <h4 id="heading-levels-review-results">Heading levels review results
      </h4>
        <a class="anchor-link" href="https://danabyerly.com/articles/do-new-york-city-mayoral-candidates-have-accessible-campaign-sites/#heading-levels-review-results">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Candidates passed: 2 out of 9</p>
<table>
<thead>
<tr>
<th>Candidate</th>
<th>Outcome</th>
</tr>
</thead>
<tbody>
<tr>
<td>Andrew Yang</td>
<td>Fail</td>
</tr>
<tr>
<td>Dianne Morales</td>
<td>Fail</td>
</tr>
<tr>
<td>Eric Adams</td>
<td>Fail</td>
</tr>
<tr>
<td>Kathryn Garcia</td>
<td>Fail</td>
</tr>
<tr>
<td>Maya Wiley</td>
<td><strong>Pass</strong></td>
</tr>
<tr>
<td>Ray McGuire</td>
<td><strong>Pass</strong></td>
</tr>
<tr>
<td>Scott Stringer</td>
<td>Fail</td>
</tr>
<tr>
<td>Shaun Donovan</td>
<td>Fail</td>
</tr>
</tbody>
</table>

      <div class="heading-wrapper">
        <h4 id="learn-more-about-heading-levels">Learn more about heading levels
      </h4>
        <a class="anchor-link" href="https://danabyerly.com/articles/do-new-york-city-mayoral-candidates-have-accessible-campaign-sites/#learn-more-about-heading-levels">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><ul>
<li><a href="https://www.w3.org/WAI/tutorials/page-structure/headings/">W3C: Web Accessibility Tutorial - Headings</a></li>
<li><a href="https://webaim.org/techniques/semanticstructure/#headings">WebAim: Headings</a></li>
</ul>
<hr />

      <div class="heading-wrapper">
        <h3 id="alternative-text-for-images">Alternative text for images
      </h3>
        <a class="anchor-link" href="https://danabyerly.com/articles/do-new-york-city-mayoral-candidates-have-accessible-campaign-sites/#alternative-text-for-images">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Alternative text, or alt text, is used to provide context about images. Alt text should be provided for images that convey information, but the alt tag can be left blank for purely decorative images (e.g., <code>alt=&quot;&quot;</code>). If you’re not sure if an image is purely decorative or not, Caitlin Geier at the <a href="https://www.deque.com/blog/great-alt-text-introduction/">Deque blog</a> suggests removing it from the design to see if any meaning or information is lost. If so, add alt text to ensure that screen reader users also get that information.</p>
<p>Another important use for alt text is that it renders the text on the screen if the image doesn’t load. This is helpful for people on slower connections and where visitors have turned off images to cut down on cognitive load or page load time.</p>
<p>Alt text testing is included in WAVE and I included it in the W3C HTML Validator test. Automated tests only pick up whether or not the alt tag is present and whether it has text or is left blank. It can’t tell if an image is decorative but in some cases can flag that text might not be meaningful. In addition to WAVE and the HTML validator I also did manual spot checks.</p>

      <div class="heading-wrapper">
        <h4 id="alternative-text-review-results">Alternative text review results
      </h4>
        <a class="anchor-link" href="https://danabyerly.com/articles/do-new-york-city-mayoral-candidates-have-accessible-campaign-sites/#alternative-text-review-results">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Candidates passed: 4 out of 9</p>
<table>
<thead>
<tr>
<th>Candidate</th>
<th>Outcome</th>
</tr>
</thead>
<tbody>
<tr>
<td>Andrew Yang</td>
<td>Fail</td>
</tr>
<tr>
<td>Dianne Morales</td>
<td><strong>Pass</strong></td>
</tr>
<tr>
<td>Eric Adams</td>
<td>Fail</td>
</tr>
<tr>
<td>Kathryn Garcia</td>
<td><strong>Pass</strong></td>
</tr>
<tr>
<td>Maya Wiley</td>
<td>Fail</td>
</tr>
<tr>
<td>Ray McGuire</td>
<td>Fail</td>
</tr>
<tr>
<td>Scott Stringer</td>
<td><strong>Pass</strong></td>
</tr>
<tr>
<td>Shaun Donovan</td>
<td><strong>Pass</strong></td>
</tr>
</tbody>
</table>

      <div class="heading-wrapper">
        <h4 id="learn-more-about-alt-text">Learn more about alt text
      </h4>
        <a class="anchor-link" href="https://danabyerly.com/articles/do-new-york-city-mayoral-candidates-have-accessible-campaign-sites/#learn-more-about-alt-text">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><ul>
<li><a href="https://www.w3.org/WAI/tutorials/images/decision-tree/">W3C: An ‘alt’ Decision Tree</a></li>
<li><a href="https://webaim.org/techniques/alttext/">WebAIM: Alternative Text</a></li>
<li><a href="https://www.deque.com/blog/great-alt-text-introduction/">Deque: # How to Design Great Alt Text: An Introduction</a></li>
</ul>
<hr />

      <div class="heading-wrapper">
        <h3 id="proper-use-of-labels-in-forms">Proper use of labels in forms
      </h3>
        <a class="anchor-link" href="https://danabyerly.com/articles/do-new-york-city-mayoral-candidates-have-accessible-campaign-sites/#proper-use-of-labels-in-forms">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Form inputs need a properly associated label in order to be accessible to assistive technologies. Another benefit is that clicking or tapping on the label puts the input in focus, which makes it easier for people with motor disabilities to select and enter information in a form.</p>
<p>It’s not uncommon to see placeholder text used in place of labels, or labels that are not properly associated to their inputs. I tested this using WAVE, the ARC Toolkit plugin and manually. I only tested to see if inputs had proper labels, not if the <a href="https://www.w3.org/WAI/WCAG21/Understanding/info-and-relationships">labels were meaningful</a>.</p>

      <div class="heading-wrapper">
        <h4 id="form-label-review-results">Form label review results
      </h4>
        <a class="anchor-link" href="https://danabyerly.com/articles/do-new-york-city-mayoral-candidates-have-accessible-campaign-sites/#form-label-review-results">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Candidates passed: 2 out of 9</p>
<table>
<thead>
<tr>
<th>Candidate</th>
<th>Outcome</th>
</tr>
</thead>
<tbody>
<tr>
<td>Andrew Yang</td>
<td>Fail</td>
</tr>
<tr>
<td>Dianne Morales</td>
<td>Fail</td>
</tr>
<tr>
<td>Eric Adams</td>
<td>Fail</td>
</tr>
<tr>
<td>Kathryn Garcia</td>
<td>Fail</td>
</tr>
<tr>
<td>Maya Wiley</td>
<td>Fail</td>
</tr>
<tr>
<td>Ray McGuire</td>
<td><strong>Pass</strong></td>
</tr>
<tr>
<td>Scott Stringer</td>
<td><strong>Pass</strong></td>
</tr>
<tr>
<td>Shaun Donovan</td>
<td>Fail</td>
</tr>
</tbody>
</table>

      <div class="heading-wrapper">
        <h4 id="learn-more-about-form-input-and-label-usage">Learn more about form input and label usage
      </h4>
        <a class="anchor-link" href="https://danabyerly.com/articles/do-new-york-city-mayoral-candidates-have-accessible-campaign-sites/#learn-more-about-form-input-and-label-usage">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><ul>
<li><a href="https://dequeuniversity.com/checklists/web/form-input-labels-instructions">Deque University: Form Input, Labels, and Instructions</a></li>
<li><a href="https://webaim.org/techniques/forms/controls">WebAIM: Creating accessible forms</a></li>
<li><a href="https://www.w3.org/WAI/tutorials/forms/labels/">W3C: Web Accessibility Tutorials: Labeling Controls</a></li>
</ul>
<hr />

      <div class="heading-wrapper">
        <h3 id="content-resizing">Content resizing
      </h3>
        <a class="anchor-link" href="https://danabyerly.com/articles/do-new-york-city-mayoral-candidates-have-accessible-campaign-sites/#content-resizing">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>People with low vision view content on their computers and <a href="https://twitter.com/labdisability/status/1094538033603534848">phones</a> by magnifying or zooming the screen. When the screen is magnified or zoomed the content reflows. The <a href="https://www.w3.org/WAI/WCAG21/Understanding/reflow.html">success criteria for content reflow</a> is for content to be “presented without loss of information or functionality, and without requiring scrolling in two dimensions”.</p>
<p>This is important to ensure that visitors to your site don’t have to scroll horizontally when viewing magnified content. I zoomed each of the candidate’s sites to 400% to see if they were still usable.</p>
<figure class="fig-container">
	<picture>
		<source srcset="https://danabyerly.com/img/content-resizing.avif" type="image/avif" />
		<source srcset="https://danabyerly.com/img/content-resizing.webp" type="image/webp" />
		<img src="https://danabyerly.com/img/content-resizing.png" alt="Examples of content reflow from several of the candidate's sites." loading="lazy" />
	</picture>
	<figcaption>
		Examples of both good and bad content reflow. The two examples on the top show content that is legible and the examples on the bottom show content and form issues. Dianne Morales (top left), Ray McGuire (top right), Maya Wiley (bottom left) and Shaun Donovan (bottom right).
	</figcaption>
</figure>

      <div class="heading-wrapper">
        <h4 id="content-resizing-review-results">Content resizing review results
      </h4>
        <a class="anchor-link" href="https://danabyerly.com/articles/do-new-york-city-mayoral-candidates-have-accessible-campaign-sites/#content-resizing-review-results">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Candidates passed: 1 out of 9</p>
<table>
<thead>
<tr>
<th>Candidate</th>
<th>Outcome</th>
</tr>
</thead>
<tbody>
<tr>
<td>Andrew Yang</td>
<td>Fail</td>
</tr>
<tr>
<td>Dianne Morales</td>
<td>Fail</td>
</tr>
<tr>
<td>Eric Adams</td>
<td>Fail</td>
</tr>
<tr>
<td>Kathryn Garcia</td>
<td>Fail</td>
</tr>
<tr>
<td>Maya Wiley</td>
<td>Fail</td>
</tr>
<tr>
<td>Ray McGuire</td>
<td><strong>Pass</strong></td>
</tr>
<tr>
<td>Scott Stringer</td>
<td>Fail</td>
</tr>
<tr>
<td>Shaun Donovan</td>
<td>Fail</td>
</tr>
</tbody>
</table>

      <div class="heading-wrapper">
        <h4 id="learn-more-about-content-resizing">Learn more about content resizing
      </h4>
        <a class="anchor-link" href="https://danabyerly.com/articles/do-new-york-city-mayoral-candidates-have-accessible-campaign-sites/#learn-more-about-content-resizing">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><ul>
<li><a href="https://www.youtube.com/watch?v=KzV-BjoXjHo">TetraLogical YouTube: Quick accessibility test: Content resizing</a></li>
<li><a href="https://www.youtube.com/watch?v=-65ON_ctnp0">YouTube: Two ways blind/low vision people use smart phones</a></li>
<li><a href="https://www.youtube.com/watch?v=atTI45j-Pjo">YouTube: How a blind/visually impaired person uses a phone</a></li>
<li><a href="https://css-tricks.com/accessible-font-sizing-explained/">CSS Tricks: Accessible Font Sizing, Explained</a></li>
</ul>
<hr />

      <div class="heading-wrapper">
        <h3 id="accessibility-statement">Accessibility Statement
      </h3>
        <a class="anchor-link" href="https://danabyerly.com/articles/do-new-york-city-mayoral-candidates-have-accessible-campaign-sites/#accessibility-statement">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>An Accessibility Statement is a dedicated, clearly labeled page of a website that spells out the site owner’s commitment to the site’s accessibility. The intended audience should be all visitors to the site.</p>
<p>While there are no hard and fast rules about what’s included, the site’s current level of conformance and a way to provide feedback are considered the essentials as demonstrated by the <a href="https://www.w3.org/WAI/planning/statements/minimal-example/">Minimal Example at the W3C site</a>.</p>
<p>Investis Digital points out an important consideration when writing an Accessibility Statement…</p>
<blockquote>
<p>Remember that although having an accessibility statement is, in some cases, a legal requirement, it shouldn’t read like a legal document. Its target audience is your users. Avoid using technical or legal jargon, and make sure the content is written in a simple and easy to understand language. — <a href="https://www.investisdigital.com/blog/web-design-and-development/writing-accessibility-statement">Investis Digigal</a></p>
</blockquote>

      <div class="heading-wrapper">
        <h4 id="accessibility-statement-review-results">Accessibility Statement review results
      </h4>
        <a class="anchor-link" href="https://danabyerly.com/articles/do-new-york-city-mayoral-candidates-have-accessible-campaign-sites/#accessibility-statement-review-results">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Candidates passed: 1 out of 9</p>
<table>
<thead>
<tr>
<th>Candidate</th>
<th>Outcome</th>
</tr>
</thead>
<tbody>
<tr>
<td>Andrew Yang</td>
<td>Fail</td>
</tr>
<tr>
<td>Dianne Morales</td>
<td>Fail</td>
</tr>
<tr>
<td>Eric Adams</td>
<td>Fail</td>
</tr>
<tr>
<td>Kathryn Garcia</td>
<td>Fail</td>
</tr>
<tr>
<td>Maya Wiley</td>
<td><strong>Pass</strong></td>
</tr>
<tr>
<td>Ray McGuire</td>
<td>Fail</td>
</tr>
<tr>
<td>Scott Stringer</td>
<td>Fail</td>
</tr>
<tr>
<td>Shaun Donovan</td>
<td>Fail</td>
</tr>
</tbody>
</table>

      <div class="heading-wrapper">
        <h4 id="learn-more-about-accessibility-statements">Learn more about accessibility statements
      </h4>
        <a class="anchor-link" href="https://danabyerly.com/articles/do-new-york-city-mayoral-candidates-have-accessible-campaign-sites/#learn-more-about-accessibility-statements">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><ul>
<li><a href="https://www.nomensa.com/blog/writing-an-accessibility-statement">Nomensa: How to write an Accessibility Statement</a></li>
<li><a href="https://www.investisdigital.com/blog/web-design-and-development/writing-accessibility-statement">Investis Digital: Writing an Accessibility Statement</a></li>
<li><a href="https://www.w3.org/WAI/planning/statements/">W3C: Developing an Accessibility Statement</a></li>
</ul>
<hr />

      <div class="heading-wrapper">
        <h3 id="usable-without-javascript">Usable without JavaScript
      </h3>
        <a class="anchor-link" href="https://danabyerly.com/articles/do-new-york-city-mayoral-candidates-have-accessible-campaign-sites/#usable-without-javascript">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>There is no direct accessibility standard for the availability of JavaScript, but if all or some of your site depends on JavaScript to function it could cause issues if JavaScript doesn’t load. And if you consider the goal of accessibility to ensure that everyone can use your site, then this is an accessibility issue.</p>
<blockquote>
<p>All your users are non-JS while they’re downloading your JS. — <a href="https://www.smashingmagazine.com/2018/05/using-the-web-with-javascript-turned-off/">Jake Archibald</a></p>
</blockquote>
<p>There are a number of <a href="https://adamsilver.io/blog/javascript-isnt-always-available-and-its-not-the-users-fault/">reasons why JavaScript might not load</a>. Some browsers <a href="https://adamsilver.io/blog/javascript-isnt-always-available-and-its-not-the-users-fault/#3.-some-browsers-turn-off-javascript-on-slow-connections">turn off JavaScript on slow connections</a>, or an <a href="https://adamsilver.io/blog/javascript-isnt-always-available-and-its-not-the-users-fault/#2.-browser-extensions-can-break-javascript">extension can break JavaScript</a>. And of course a visitor to your site may have it turned off by choice.</p>
<p>Considering these are content sites rather than transactional, it’s reasonable to assume they should be fully usable without JavaScript. While looking at candidate’s sites I found examples of backgrounds not loading, which led to contrast issues, and instances where the navigation was no longer accessible via keyboard. In most of the “fails” the forms didn’t load.</p>
<p>I disabled JavaScript and tried to view the candidate’s sites, if any element of the page didn’t load I counted it as a fail. In some case much of the site didn’t load and in others it was forms and/or images.</p>

      <div class="heading-wrapper">
        <h4 id="usable-without-javascript-review-results">Usable without JavaScript review results
      </h4>
        <a class="anchor-link" href="https://danabyerly.com/articles/do-new-york-city-mayoral-candidates-have-accessible-campaign-sites/#usable-without-javascript-review-results">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Candidates passed: 0 out of 9</p>
<table>
<thead>
<tr>
<th>Candidate</th>
<th>Outcome</th>
</tr>
</thead>
<tbody>
<tr>
<td>Andrew Yang</td>
<td>Fail</td>
</tr>
<tr>
<td>Dianne Morales</td>
<td>Fail</td>
</tr>
<tr>
<td>Eric Adams</td>
<td>Fail</td>
</tr>
<tr>
<td>Kathryn Garcia</td>
<td>Fail</td>
</tr>
<tr>
<td>Maya Wiley</td>
<td>Fail</td>
</tr>
<tr>
<td>Ray McGuire</td>
<td>Fail</td>
</tr>
<tr>
<td>Scott Stringer</td>
<td>Fail</td>
</tr>
<tr>
<td>Shaun Donovan</td>
<td>Fail</td>
</tr>
</tbody>
</table>

      <div class="heading-wrapper">
        <h4 id="learn-more-about-making-sites-usable-without-javascript">Learn more about making sites usable without JavaScript
      </h4>
        <a class="anchor-link" href="https://danabyerly.com/articles/do-new-york-city-mayoral-candidates-have-accessible-campaign-sites/#learn-more-about-making-sites-usable-without-javascript">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><ul>
<li><a href="https://adamsilver.io/blog/javascript-isnt-always-available-and-its-not-the-users-fault/">Adam Silver: JavaScript isn’t always available and it’s not the user’s fault</a></li>
<li><a href="https://dev.to/shadowfaxrodeo/why-your-website-should-work-without-javascript-3kko">Dev: Why your website should work without JavaScript</a></li>
</ul>
<hr />

      <div class="heading-wrapper">
        <h3 id="links-to-tests-and-validator-results">Links to tests and validator results
      </h3>
        <a class="anchor-link" href="https://danabyerly.com/articles/do-new-york-city-mayoral-candidates-have-accessible-campaign-sites/#links-to-tests-and-validator-results">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>I used a few tools to help test the candidate’s sites. The following allow for direct links to test results and have been included in the candidate’s individual section.</p>
<p><a href="https://wave.webaim.org/">WAVE</a> is a free web accessibility evaluation tool created by 	<a href="https://webaim.org/">WebAim</a>. When testing via the WAVE site the results are available by copying the URL of the results report. It’s also available as a <a href="https://wave.webaim.org/extension">Chrome or Firefox</a> extension.</p>
<p>The <a href="https://validator.w3.org/">W3C HTML Validator</a> is a free markup validation service. All the candidates site’s had an eye-opening amount of errors. I’ve included the document outline, which shows the <a href="https://danabyerly.com/articles/do-new-york-city-mayoral-candidates-have-accessible-campaign-sites/#correct-heading-level-outline">heading levels</a> and a report on images, which is relevant to <a href="https://danabyerly.com/articles/do-new-york-city-mayoral-candidates-have-accessible-campaign-sites/#alternative-text-for-images">alternative text</a>.</p>
<p><a href="https://developers.google.com/speed/pagespeed/insights/">Page Speed Insights</a> is a free performance evaluation tool from Google that includes results for <a href="https://web.dev/vitals/">Core Web Vitals</a>. Like <a href="https://danabyerly.com/articles/do-new-york-city-mayoral-candidates-have-accessible-campaign-sites/#usable-without-javascript">JavaScript availability</a> there is no direct accessibility standard around performance, but visitors on slow connections with lower end devices may have a <a href="https://css-tricks.com/accessibility-and-web-performance-are-not-features-theyre-the-baseline/">harder time using your site</a> if the performance is poor. While I didn’t use it in these evaluations, <a href="https://www.webpagetest.org/">WebPageTest</a> is another useful performance evaluation tool.</p>
<hr />

      <div class="heading-wrapper">
        <h2 id="results-by-candidate">Results by candidate
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/articles/do-new-york-city-mayoral-candidates-have-accessible-campaign-sites/#results-by-candidate">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>The full results for each candidate includes a link to their site, what platform they’re using, their overall score, a summary, a few example images, details for each review and links to their automated test results. The candidates are ordered alphabetically by first name.</p>

      <div class="heading-wrapper">
        <h3 id="andrew-yang">Andrew Yang
      </h3>
        <a class="anchor-link" href="https://danabyerly.com/articles/do-new-york-city-mayoral-candidates-have-accessible-campaign-sites/#andrew-yang">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p><a href="https://www.yangforny.com/">Yang for New York</a><br />
Platform: Gatsby<br />
Reviews passed: 1 out of 10</p>
<p>While Yang’s site is navigable by keyboard, the carousel behavior is not consistent, which could lead to confusion. Overall the had a wide variety of issues including no “Skip Link” many color contrast issues and inconsistent use of focus indication.</p>
<figure class="fig-container">
	<picture>
		<source srcset="https://danabyerly.com/img/yang.avif" type="image/avif" />
		<source srcset="https://danabyerly.com/img/yang.webp" type="image/webp" />
		<img src="https://danabyerly.com/img/yang.png" alt="An example of poor contrast and improper form labeling from Andrew Yang's site." loading="lazy" />
	</picture>
	<figcaption>
		From Andrew Yang's site: The image on the left shows low contrast in the first five links, only 1.66:1 ratio when the minimum required is 3:1 for large text. On the right the form is using placeholders instead of labels and the labels also fail to meet contrast standards, only 1.99:1 when the standard is 4.5:1 to small text.
	</figcaption>
</figure>
<table>
<thead>
<tr>
<th>Test</th>
<th>Outcome</th>
<th>Notes</th>
</tr>
</thead>
<tbody>
<tr>
<td>Skip Link</td>
<td>Fail</td>
<td>No Skip Link.</td>
</tr>
<tr>
<td>Navigate by keyboard</td>
<td><strong>Pass</strong></td>
<td>Correctly had the “Chip in” banner that is fixed at the bottom of the screen last in the tab order. Most of the carousels were traversed by the tab key, but the endorsement carousel required the enter key, which could be confusing and cause users to miss the endorsements.</td>
</tr>
<tr>
<td>Focus indicators</td>
<td>Fail</td>
<td>Mixed - Chrome and Safari fared better than Firefox, with most focusable items indicated but several that did not meet contrast standards. None of the forms were visually indicated.</td>
</tr>
<tr>
<td>Color contrast</td>
<td>Fail</td>
<td>Most of the sections had contrast issues. The text of “Why I’m running for Mayor”, the “Andrew’s Plans to Move NYC Forward” section and the text of “Let’s move New York forward.” passed.</td>
</tr>
<tr>
<td>Heading Levels</td>
<td>Fail</td>
<td>There are two <code>h1</code> headings and both jump directly to <code>h3</code>, there is also a missing <code>h3</code>.</td>
</tr>
<tr>
<td>Alt text</td>
<td>Fail</td>
<td>Many images had proper alt tags but some of the images in the endorsement carousel did not have alt tags.</td>
</tr>
<tr>
<td>Labels in forms</td>
<td>Fail</td>
<td>All of the form inputs used placeholders rather than labels.</td>
</tr>
<tr>
<td>Content resizing</td>
<td>Fail</td>
<td>Some of the content did not flow in a readable manner. Also, the fixed menu and “Chip in” donate banner at the bottom reduced the usable size to a small percentage of the screen. The bottom banner can be closed but the menu is persistent.</td>
</tr>
<tr>
<td>Accessibility Statement</td>
<td>Fail</td>
<td>No Accessibility Statement.</td>
</tr>
<tr>
<td>Works without JavaScript</td>
<td>Fail</td>
<td>YouTube video and donation banner fixed at the bottom of the page did not load.</td>
</tr>
</tbody>
</table>

      <div class="heading-wrapper">
        <h4 id="test-results-for-andrew-yangs-site">Test results for Andrew Yang’s site
      </h4>
        <a class="anchor-link" href="https://danabyerly.com/articles/do-new-york-city-mayoral-candidates-have-accessible-campaign-sites/#test-results-for-andrew-yangs-site">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><ul>
<li><a href="https://developers.google.com/speed/pagespeed/insights/?url=https%3A%2F%2Fwww.yangforny.com%2F">Page Speed Insights</a></li>
<li>WAVE - Ran locally due to scripting error using web based service</li>
<li><a href="https://validator.w3.org/nu/?showoutline=yes&amp;showimagereport=yes&amp;doc=https%3A%2F%2Fwww.yangforny.com%2F">W3C HTML Validator</a></li>
</ul>
<hr />

      <div class="heading-wrapper">
        <h3 id="dianne-morales">Dianne Morales
      </h3>
        <a class="anchor-link" href="https://danabyerly.com/articles/do-new-york-city-mayoral-candidates-have-accessible-campaign-sites/#dianne-morales">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p><a href="https://www.dianne.nyc/">Dianne Morales for NYC Mayor</a><br />
Platform: Squarespace<br />
Reviews passed: 3 out of 10</p>
<p>Overall the site has good contrast and focus indication but a few frustratingly close contrast ratios kept those areas from passing. The site has a Skip Link and most of the site was navigable by keyboard with the exception of the fixed “Language” widget.</p>
<figure class="fig-container">
	<picture>
		<source srcset="https://danabyerly.com/img/morales.avif" type="image/avif" />
		<source srcset="https://danabyerly.com/img/morales.webp" type="image/webp" />
		<img src="https://danabyerly.com/img/morales.png" alt="An example of poor contrast and a form with both good and bad contrast from Dianne Morales' site." loading="lazy" />
	</picture>
	<figcaption>
		From Dianne Morales' site: If JavaScript is turned off or fails to load, many images in Morales' site didn't load. On the left shows the "No going back" section with severe contrast issues when the image is missing. The form on the right is a mixed bag of passing and failing examples. Passing: Proper use of labels, good focus indication contrast and button contrast. Failing: The inputs lack the needed 3:1 contrast ratio against the background, and the placeholder in the Email input also lacks the required 3:1 contrast ratio.
	</figcaption>
</figure>
<table>
<thead>
<tr>
<th>Test</th>
<th>Outcome</th>
<th>Notes</th>
</tr>
</thead>
<tbody>
<tr>
<td>Skip Link</td>
<td><strong>Pass</strong></td>
<td></td>
</tr>
<tr>
<td>Navigate by keyboard</td>
<td>Fail</td>
<td>The content of the site is accessible by keyboard but the small language selection widget fixed at the bottom of the screen is not.</td>
</tr>
<tr>
<td>Focus indicators</td>
<td>Fail</td>
<td>Everything but the “Choose your future” form had good indication.</td>
</tr>
<tr>
<td>Color contrast</td>
<td>Fail</td>
<td>Many of the fails were close to a passing ratio, particularly the white text on the orange buttons (“Donate”, “See how we create dignity for all”, etc.). The text over the image in the hero section passed in some places and not others on desktop but likely would not fare as well on smaller screens. The “No going back” section failed as the contrast between the predominant lightest color was insufficient, but could easily be tweaked to pass. The “Get Campaign Updates” inputs also did not have enough contrast against the background.</td>
</tr>
<tr>
<td>Heading Levels</td>
<td>Fail</td>
<td>Jumped from <code>h1</code> heading to <code>h3</code> and <code>h2</code> heading to <code>h4</code></td>
</tr>
<tr>
<td>Alt text</td>
<td><strong>Pass</strong></td>
<td>All images had alt text, although there is room for improvement. The endorsement images are using the file name as the alt text, which adds no value for screen reader users or when the image doesn’t render. Changing it to the name would be an easy improvement.</td>
</tr>
<tr>
<td>Labels in forms</td>
<td><strong>Pass</strong></td>
<td></td>
</tr>
<tr>
<td>Content resizing</td>
<td>Fail</td>
<td>Most of the content flowed well, but there were issues in the “Every New Yorker Deserves Dignity” section, “Divest from the Police” section and the footer.</td>
</tr>
<tr>
<td>Accessibility Statement</td>
<td>Fail</td>
<td>No Accessibility Statement.</td>
</tr>
<tr>
<td>Works without JavaScript</td>
<td>Fail</td>
<td>Some styles and images didn’t load causing contrast errors in the navigation and “No going back” sections. The forms also did not load.</td>
</tr>
</tbody>
</table>

      <div class="heading-wrapper">
        <h4 id="test-results-for-dianne-morales-site">Test results for Dianne Morales’ site
      </h4>
        <a class="anchor-link" href="https://danabyerly.com/articles/do-new-york-city-mayoral-candidates-have-accessible-campaign-sites/#test-results-for-dianne-morales-site">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><ul>
<li><a href="https://developers.google.com/speed/pagespeed/insights/?url=https%3A%2F%2Fwww.dianne.nyc%2F">Page Speed Insights</a></li>
<li><a href="https://wave.webaim.org/report#/https://www.dianne.nyc/">WAVE</a></li>
<li><a href="https://validator.w3.org/nu/?showoutline=yes&amp;showimagereport=yes&amp;doc=https%3A%2F%2Fwww.dianne.nyc%2F">W3C HTML Validator</a></li>
</ul>
<hr />

      <div class="heading-wrapper">
        <h3 id="eric-adams">Eric Adams
      </h3>
        <a class="anchor-link" href="https://danabyerly.com/articles/do-new-york-city-mayoral-candidates-have-accessible-campaign-sites/#eric-adams">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p><a href="https://ericadams2021.com/">New York City’s Next Mayor</a><br />
Platform: WordPress<br />
Reviews Passed: 1 of 10</p>
<p>Several of the review criteria was a mix of pass and fails, such as a single missing alt tag and one form with correct label usage and one without. The other candidates sites were mostly usable with JavaScript, only missing a few elements, but Adams’ site barely loaded and had layout issues. One positive example was the “Candidate fully invested” section had good color contrast against an image background.</p>
<figure class="fig-container">
	<picture>
		<source srcset="https://danabyerly.com/img/adams.avif" type="image/avif" />
		<source srcset="https://danabyerly.com/img/adams.webp" type="image/webp" />
		<img src="https://danabyerly.com/img/adams.png" alt="An example of improper site loading with no JavaScript and poor color contrast from Eric Adams' site." loading="lazy" />
	</picture>
	<figcaption>
		From Eric Adams' site: Adam's site is unusable if JavaScript is turned off or fails to load. The image on the left shows bunched up content stacked on top of each other when JavaScript is disabled. On the right the form shows insufficient contrast with white text against a light blue background. The contrast ratio is 2.03:1. A ratio of at least 3:1 is required for the inputs and larger text and a ratio of at least 4.5:1 for the smaller text (placeholders and help text underneath). Another issue with the form is that it's using placeholders instead of labels. Both the button text and the button background color against the page background have good contrast.
	</figcaption>
</figure>
<table>
<thead>
<tr>
<th>Test</th>
<th>Outcome</th>
<th>Notes</th>
</tr>
</thead>
<tbody>
<tr>
<td>Skip Link</td>
<td>Fail</td>
<td>No Skip Link.</td>
</tr>
<tr>
<td>Navigate by keyboard</td>
<td><strong>Pass</strong></td>
<td>There seemed to be some double clicking needed in the “Bold Steps for NYC” section but without good focus indication it was hard to tell. Overall the entire page could be traversed.</td>
</tr>
<tr>
<td>Focus indicators</td>
<td>Fail</td>
<td>Chrome and Safari has more visual indication that Firefox, but indication was missing in forms and some indication did not meet color contrast standards.</td>
</tr>
<tr>
<td>Color contrast</td>
<td>Fail</td>
<td>The white text against light blue in the Donate button and “Help Eric Adams” section was insufficient as well as the privacy and terms links in the Volunteer section and the red on blue “Change is coming” in the footer.</td>
</tr>
<tr>
<td>Heading Levels</td>
<td>Fail</td>
<td>Missing levels in several places.</td>
</tr>
<tr>
<td>Alt text</td>
<td>Fail</td>
<td>There was only one missing alt tag in the text image of “The People’s Candidate”. It would be easy to add the alt tag and either leave it blank or provide the text. Either would be correct but providing the text would most closely mirror the design. Adding alt text in the empty alt tag for endorsement logos would provide an improved experience.</td>
</tr>
<tr>
<td>Labels in forms</td>
<td>Fail</td>
<td>The “Help Elect” form used placeholders instead of labels, but the “Volunteer” form had labels correctly associated to inputs.</td>
</tr>
<tr>
<td>Content resizing</td>
<td>Fail</td>
<td>Some of the content flowed well but the fixed header took up nearly half of the screen. There were also issues with the two column layout in the “Eric’s bold steps for NYC” section and the footer.</td>
</tr>
<tr>
<td>Accessibility Statement</td>
<td>Fail</td>
<td>No Accessibility Statement.</td>
</tr>
<tr>
<td>Works without JavaScript</td>
<td>Fail</td>
<td>Much of the site didn’t load and what did load had layout issues.</td>
</tr>
</tbody>
</table>

      <div class="heading-wrapper">
        <h4 id="test-results-for-eric-adams-site">Test results for Eric Adam’s site
      </h4>
        <a class="anchor-link" href="https://danabyerly.com/articles/do-new-york-city-mayoral-candidates-have-accessible-campaign-sites/#test-results-for-eric-adams-site">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><ul>
<li><a href="https://developers.google.com/speed/pagespeed/insights/?url=https%3A%2F%2Fericadams2021.com%2F">Page Speed Insights</a></li>
<li><a href="https://wave.webaim.org/report#/https://ericadams2021.com/">WAVE</a></li>
<li><a href="https://validator.w3.org/nu/?showoutline=yes&amp;showimagereport=yes&amp;doc=https%3A%2F%2Fericadams2021.com%2F">W3C HTML Validator</a></li>
</ul>
<hr />

      <div class="heading-wrapper">
        <h3 id="kathryn-garcia">Kathryn Garcia
      </h3>
        <a class="anchor-link" href="https://danabyerly.com/articles/do-new-york-city-mayoral-candidates-have-accessible-campaign-sites/#kathryn-garcia">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p><a href="https://www.kgfornyc.com/">Garcia for NYC Mayor</a><br />
Platform: WordPress<br />
Reviews passed: 2 out of 10</p>
<p>Garcia’s site has a Skip Link and several areas with with good contrast. One easy to fix failure is the form labels, they are implemented correctly to use an <code>id</code> to associate them to their inputs, but the <code>id</code> on each input is duplicated in both forms (e.g., both email inputs use <code>id=&quot;form-email&quot;</code>). Another issue with the forms are that the floating labels are illegible when typing in the inputs.</p>
<figure class="fig-container">
	<picture>
		<source srcset="https://danabyerly.com/img/garcia.avif" type="image/avif" />
		<source srcset="https://danabyerly.com/img/garcia.webp" type="image/webp" />
		<img src="https://danabyerly.com/img/garcia.png" alt="Examples from Kathryn Garcia's site including poor contrast and form label issues." loading="lazy" />
	</picture>
	<figcaption>
		From Kathryn Garcia's site: The image on the left shows contrast issues in the Transportation card. The icon against the page background has a contrast ratio of 1.34:1 and the minimum required is 3:1. The copy within the cards has a contrast of 3.05:1 and the minimum is 4.5:1 for smaller text. There is focus indication pictured on the card title that meets the contrast standard, but it appears more faint than pictured because it's using a dotted line rather than a solid line. The image on the right shows a form with good overall contrast, but the floating label is cut off when an input has focus. In the example the "Email" label is only partially visible as I typed in the input.
	</figcaption>
</figure>
<table>
<thead>
<tr>
<th>Test</th>
<th>Outcome</th>
<th>Notes</th>
</tr>
</thead>
<tbody>
<tr>
<td>Skip Link</td>
<td><strong>Pass</strong></td>
<td></td>
</tr>
<tr>
<td>Navigate by keyboard</td>
<td>Fail</td>
<td>The content of the site is accessible by keyboard but the small language selection widget fixed at the bottom of the screen is not.</td>
</tr>
<tr>
<td>Focus indicators</td>
<td>Fail</td>
<td>Most elements had indication but many of them failed to meet contrast standards.</td>
</tr>
<tr>
<td>Color contrast</td>
<td>Fail</td>
<td>Much of the site had good contrast, particularly the white and green text on the dark blue background, but the navigation and cards in the “Priorities” section did not meet contrast standards.</td>
</tr>
<tr>
<td>Heading Levels</td>
<td>Fail</td>
<td>Missing levels in several places.</td>
</tr>
<tr>
<td>Alt text</td>
<td><strong>Pass</strong></td>
<td>All images had an alt tag but several images had a blank alt tag that could’ve used text. Adding alt text to the endorsement logos would provide a better experience for screen reader users.</td>
</tr>
<tr>
<td>Labels in forms</td>
<td>Fail</td>
<td>While the labels are implemented correctly they are not properly associated to inputs because the <code>id</code> on each input is duplicated or used in each instance of the form. E.g., the “Email” input in both forms uses <code>id=&quot;form-email&quot;</code>, changing the <code>id</code> for each input in one of the forms would fix the issue. The floating labels are also not legible when typing in the inputs.</td>
</tr>
<tr>
<td>Content resizing</td>
<td>Fail</td>
<td>Most of the content flowed well but the navigation and the footer were not usable.</td>
</tr>
<tr>
<td>Accessibility Statement</td>
<td>Fail</td>
<td>No Accessibility Statement.</td>
</tr>
<tr>
<td>Works without JavaScript</td>
<td>Fail</td>
<td>The forms disappear when JavaScript is disabled and submenus in the navigation are not accessible via keyboard.</td>
</tr>
</tbody>
</table>

      <div class="heading-wrapper">
        <h4 id="test-results--for-kathryn-garcias-site">Test results  for Kathryn Garcia’s site
      </h4>
        <a class="anchor-link" href="https://danabyerly.com/articles/do-new-york-city-mayoral-candidates-have-accessible-campaign-sites/#test-results--for-kathryn-garcias-site">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><ul>
<li><a href="https://developers.google.com/speed/pagespeed/insights/?url=https%3A%2F%2Fwww.kgfornyc.com%2F">Page Speed Insights</a></li>
<li><a href="https://wave.webaim.org/report#/https://www.kgfornyc.com/">WAVE</a></li>
<li><a href="https://validator.w3.org/nu/?showoutline=yes&amp;showimagereport=yes&amp;doc=https%3A%2F%2Fwww.kgfornyc.com%2F">W3C HTML Validator</a> - There was a fatal error at the 12th error and it could not complete.</li>
</ul>
<hr />

      <div class="heading-wrapper">
        <h3 id="maya-wiley">Maya Wiley
      </h3>
        <a class="anchor-link" href="https://danabyerly.com/articles/do-new-york-city-mayoral-candidates-have-accessible-campaign-sites/#maya-wiley">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p><a href="https://www.mayawileyformayor.com/">Maya for Mayor</a><br />
Platform: Next.js<br />
Reviews passed: 3 out of 10</p>
<p>Wiley’s site overall has very good contrast with some relatively easy to fix exceptions. She is also the only candidate with an <a href="https://www.mayawileyformayor.com/accessibility/">Accessibility Statement</a>, I’ve sent an email with my findings and will update this post (or write another one!) if hear back. The biggest fails were lack of a Skip Link, no focus indication and almost no alt tags. There were also issues with forms.</p>
<figure class="fig-container">
	<picture>
		<source srcset="https://danabyerly.com/img/wiley.avif" type="image/avif" />
		<source srcset="https://danabyerly.com/img/wiley.webp" type="image/webp" />
		<img src="https://danabyerly.com/img/wiley.png" alt="Examples from Maya Wiley's site including poor contrast, content reflow issues and form label issues." loading="lazy" />
	</picture>
	<figcaption>
		From Maya Wiley's site: The "Contact Information" form on the left has several contrast issues. The labels and focus indication are good but the (optional) text, the inputs and the "By submitting your..." text all fall short of the minimum contrast ratio. On the top right, when the screen is zoomed to 400% the "Add Your Name" form is obscured by the fixed "Make a Donation" banner. On the bottom right the form inputs on the purple background have red error text that does not have sufficient contrast. The "Contact Information" form did not have this type of validation.
	</figcaption>
</figure>
<table>
<thead>
<tr>
<th>Test</th>
<th>Outcome</th>
<th>Notes</th>
</tr>
</thead>
<tbody>
<tr>
<td>Skip Link</td>
<td>Fail</td>
<td>No Skip Link.</td>
</tr>
<tr>
<td>Navigate by keyboard</td>
<td><strong>Pass</strong></td>
<td>While the site can be traversed via keyboard, there is no focus indication until the “Make a Donation” section at the bottom of the page, making it difficult to orient on the page. Adding to that, the tabbing through the embedded Tweet section also tabs through any links or hashtags within the embedded Tweets, making it difficult to get through the page.</td>
</tr>
<tr>
<td>Focus indicators</td>
<td>Fail</td>
<td>There is very little focus indication.</td>
</tr>
<tr>
<td>Color contrast</td>
<td>Fail</td>
<td>The majority of the site has very good contrast, but there were a few issues in the “Sign up” section. The (optional) text, form input outlines and “By submitting your cell phone…” text all fell short of the required contrast ratio. The “Add your name” button has a contrast ratio of 3.29:1 where the minimum required for small text is 4.5:1. Elsewhere the red “Required” error text for inputs lacks sufficient contrast against the purple background.</td>
</tr>
<tr>
<td>Heading Levels</td>
<td><strong>Pass</strong></td>
<td></td>
</tr>
<tr>
<td>Alt text</td>
<td>Fail</td>
<td>Only the logo in the site header has an alt tag with alt text.</td>
</tr>
<tr>
<td>Labels in forms</td>
<td>Fail</td>
<td>The “Join Us” and “Add Your Name” forms have empty labels that are not associated to the inputs, but the “Add Your Name” form has correctly associated labels.</td>
</tr>
<tr>
<td>Content resizing</td>
<td>Fail</td>
<td>For the most part the content flows fine, with the exception of the endorsement section where the text runs together, but the real problem is that the fixed “Make a Donation” banner at the bottom of the screen could cover up the “Add Your Name” form depending on the screen size, making it hard or impossible to use.</td>
</tr>
<tr>
<td>Accessibility Statement</td>
<td><strong>Pass</strong></td>
<td></td>
</tr>
<tr>
<td>Works without JavaScript</td>
<td>Fail</td>
<td>Forms and some images did not load.</td>
</tr>
</tbody>
</table>

      <div class="heading-wrapper">
        <h4 id="test-results-for-maya-wileys-site">Test results for Maya Wiley’s site
      </h4>
        <a class="anchor-link" href="https://danabyerly.com/articles/do-new-york-city-mayoral-candidates-have-accessible-campaign-sites/#test-results-for-maya-wileys-site">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><ul>
<li><a href="https://developers.google.com/speed/pagespeed/insights/?url=https%3A%2F%2Fmayawileyformayor.com%2F">Page Speed Insights</a></li>
<li><a href="https://wave.webaim.org/report#/https://mayawileyformayor.com/">WAVE</a></li>
<li><a href="https://validator.w3.org/nu/?showoutline=yes&amp;showimagereport=yes&amp;doc=https%3A%2F%2Fwww.mayawileyformayor.com%2F">W3C HTML Validator</a></li>
</ul>
<hr />

      <div class="heading-wrapper">
        <h3 id="ray-mcguire">Ray McGuire
      </h3>
        <a class="anchor-link" href="https://danabyerly.com/articles/do-new-york-city-mayoral-candidates-have-accessible-campaign-sites/#ray-mcguire">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p><a href="https://www.rayformayor.com/">Ray for Mayor</a><br />
Platform: Squarespace<br />
Reviews passed: 5 out of 10</p>
<p>McGuire’s site had the best showing of the group overall and could be easily improved with a few fixes. Another notable aspect of the site is the simplicity of the homepage. While most of the candidates loaded their homepages with carousels, images and multiple sections, McGuire’s homepage is straight forward and easy to navigate regardless of the method.</p>
<figure class="fig-container">
	<picture>
		<source srcset="https://danabyerly.com/img/mcguire.avif" type="image/avif" />
		<source srcset="https://danabyerly.com/img/mcguire.webp" type="image/webp" />
		<img src="https://danabyerly.com/img/mcguire.png" alt="Examples from Ray McGuire's site including poor contrast and a form that didn't load when JavaScript was unavailable." loading="lazy" />
	</picture>
	<figcaption>
		From Ray McGuire's site: On the left, the "Sign up" form in the hero section does not load without JavaScript, leaving a call to action with no form. On the right is one of the inputs from the "Sign up" form, generally it has good contrast with the exception of the focus indication, which is barely visible.
	</figcaption>
</figure>
<table>
<thead>
<tr>
<th>Test</th>
<th>Outcome</th>
<th>Notes</th>
</tr>
</thead>
<tbody>
<tr>
<td>Skip Link</td>
<td><strong>Pass</strong></td>
<td></td>
</tr>
<tr>
<td>Navigate by keyboard</td>
<td><strong>Pass</strong></td>
<td></td>
</tr>
<tr>
<td>Focus indicators</td>
<td>Fail</td>
<td>Most of the site has very good indication, but the form input indication doesn’t have sufficient contrast and the form’s button has no indication.</td>
</tr>
<tr>
<td>Color contrast</td>
<td>Fail</td>
<td>The text and graphic elements all have great contrast, but the form lacks sufficient contrast in focus indication. The (Optional) label text also lacks sufficient contrast against the background.</td>
</tr>
<tr>
<td>Heading Levels</td>
<td><strong>Pass</strong></td>
<td></td>
</tr>
<tr>
<td>Alt text</td>
<td>Fail</td>
<td>Only the celebrity endorsement image is missing an alt tag, which would be easy to fix. Also of note, alt text was present on a tracking pixel but it’s using the file name rather than descriptive text.</td>
</tr>
<tr>
<td>Labels in forms</td>
<td><strong>Pass</strong></td>
<td></td>
</tr>
<tr>
<td>Content resizing</td>
<td><strong>Pass</strong></td>
<td></td>
</tr>
<tr>
<td>Accessibility Statement</td>
<td>Fail</td>
<td>No Accessibility Statement.</td>
</tr>
<tr>
<td>Works without JavaScript</td>
<td>Fail</td>
<td>The form and some images did not load.</td>
</tr>
</tbody>
</table>

      <div class="heading-wrapper">
        <h4 id="test-results-for-ray-mcguires-site">Test results for Ray McGuire’s site
      </h4>
        <a class="anchor-link" href="https://danabyerly.com/articles/do-new-york-city-mayoral-candidates-have-accessible-campaign-sites/#test-results-for-ray-mcguires-site">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><ul>
<li><a href="https://developers.google.com/speed/pagespeed/insights/?url=https%3A%2F%2Fwww.rayformayor.com%2F">Page Speed Insights</a></li>
<li><a href="https://wave.webaim.org/report#/https://www.rayformayor.com/">WAVE</a></li>
<li><a href="https://validator.w3.org/nu/?showoutline=yes&amp;showimagereport=yes&amp;doc=https%3A%2F%2Fwww.rayformayor.com%2F">W3 HTML Validator</a></li>
</ul>
<hr />

      <div class="heading-wrapper">
        <h3 id="scott-stringer">Scott Stringer
      </h3>
        <a class="anchor-link" href="https://danabyerly.com/articles/do-new-york-city-mayoral-candidates-have-accessible-campaign-sites/#scott-stringer">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p><a href="https://stringerformayor.com/">Stringer for Mayor</a><br />
Platform: WordPress<br />
Reviews passed: 2 out of 10</p>
<p>Stringer’s site was one of only two that had proper form labels. The site also did well with alt text, but there were several contrast and focus indication issues. One notable was issue is a fixed “Join Team Stringer” banner at the bottom the screen. It was not in the <a href="https://www.w3.org/TR/WCAG20-TECHS/C27.html">proper order</a> for keyboard navigation, and it remained in the tab order if the banner had been dismissed and was no longer visible.</p>
<figure class="fig-container">
	<picture>
		<source srcset="https://danabyerly.com/img/stringer.avif" type="image/avif" />
		<source srcset="https://danabyerly.com/img/stringer.webp" type="image/webp" />
		<img src="https://danabyerly.com/img/stringer.png" alt="Examples from Scott Stringer's site including poor contrast and fixed elements causing problems when the screen is zoomed." loading="lazy" />
	</picture>
	<figcaption>
		From Scott Stringer's site: On top, only parts of the menu of good contrast against the background, and depending on the visitor's screen size and device this could mean all or most of the menu is hard to read. On the bottom left, when the screen is zoomed to 400% the fixed elements (top banner, menu and bottom fixed form) make it harder to read the content. The menu is also cut off with no way for the visitor to access the items that are not visible. On the bottom right, every element of the form lacks sufficient contrast.
	</figcaption>
</figure>
<table>
<thead>
<tr>
<th>Test</th>
<th>Outcome</th>
<th>Notes</th>
</tr>
</thead>
<tbody>
<tr>
<td>Skip Link</td>
<td>Fail</td>
<td>No Skip Link.</td>
</tr>
<tr>
<td>Navigate by keyboard</td>
<td>Fail</td>
<td>The “Join Team Stringer” banner fixed at the bottom of the screen is in between “Read Scott’s Plan” hero section and the “Experience” section in the tab order. The banner is also in the tab order regardless of whether or not it’s visible. If the visitor has closed the banner and then clicks through the page, they will still have to click through the eight fields in the layer that are not visible.</td>
</tr>
<tr>
<td>Focus indicators</td>
<td>Fail</td>
<td>Not everything has focus indication and not all elements with indication meet color contrast ratio standards.</td>
</tr>
<tr>
<td>Color contrast</td>
<td>Fail</td>
<td>Some of the top level navigation does not have sufficient contrast against the image background, this could vary depending on the visitor’s screen size. The blue on blue buttons (“View All”, “Join Team Stringer”) lack sufficient contrast for the text within the button but have enough contrast against their respective backgrounds. The “Paid for by Scott Stringer for Mayor” text in the footer also lacks sufficient contrast.</td>
</tr>
<tr>
<td>Heading Levels</td>
<td>Fail</td>
<td>Out of sequence headings with a <code>h2</code> before the <code>h1</code>.</td>
</tr>
<tr>
<td>Alt text</td>
<td><strong>Pass</strong></td>
<td></td>
</tr>
<tr>
<td>Labels in forms</td>
<td><strong>Pass</strong></td>
<td></td>
</tr>
<tr>
<td>Content resizing</td>
<td>Fail</td>
<td>The site content flowed well but only part of the menu was off the screen with no way to scroll to it.</td>
</tr>
<tr>
<td>Accessibility Statement</td>
<td>Fail</td>
<td>No Accessibility Statement.</td>
</tr>
<tr>
<td>Works without JavaScript</td>
<td>Fail</td>
<td>The “Join Team Stringer” banner and form did not load.</td>
</tr>
</tbody>
</table>

      <div class="heading-wrapper">
        <h4 id="test-results-for-scott-stringers-site">Test results for Scott Stringer’s site
      </h4>
        <a class="anchor-link" href="https://danabyerly.com/articles/do-new-york-city-mayoral-candidates-have-accessible-campaign-sites/#test-results-for-scott-stringers-site">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><ul>
<li><a href="https://developers.google.com/speed/pagespeed/insights/?url=https%3A%2F%2Fstringerformayor.com%2F">Page Speed Insights</a></li>
<li><a href="https://wave.webaim.org/report#/https://stringerformayor.com/">WAVE</a></li>
<li><a href="https://validator.w3.org/nu/?showoutline=yes&amp;showimagereport=yes&amp;doc=https%3A%2F%2Fstringerformayor.com%2F">W3 HTML Validator</a></li>
</ul>
<hr />

      <div class="heading-wrapper">
        <h3 id="shaun-donovan">Shaun Donovan
      </h3>
        <a class="anchor-link" href="https://danabyerly.com/articles/do-new-york-city-mayoral-candidates-have-accessible-campaign-sites/#shaun-donovan">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p><a href="https://shaunfornyc.com/">Shaun Works for NYC</a><br />
Platform: WordPress<br />
Reviews passed: 2 out of 10</p>
<p>Donovan’s site has a Skip Link and proper alt tags, but there were plenty of contrast and focus indication issues and the carousel of Tweets caused problems keyboard navigation issues.</p>
<figure class="fig-container">
	<picture>
		<source srcset="https://danabyerly.com/img/donovan.avif" type="image/avif" />
		<source srcset="https://danabyerly.com/img/donovan.webp" type="image/webp" />
		<img src="https://danabyerly.com/img/donovan.png" alt="Examples from Shaun Donovan's site including poor contrast in several areas." loading="lazy" />
	</picture>
	<figcaption>
		From Shaun Donovan's site: On the top, the white text against the blue background in the "Chip in" section has a 4.16:1 contrast ratio. This is sufficient for the larger "Are you with us..." text where the minimum ratio is 3:1, but insufficient in the smaller copy text where the minimum contrast ratio is 4.5:1. The white text against the orange buttons has a contrast ratio of 3.13:1, which just meets the standard for larger text.  On the bottom, the gray on gray footer text has a contrast ratio of 2.24:1, which is below the minimum of 3:1.
	</figcaption>
</figure>
<table>
<thead>
<tr>
<th>Test</th>
<th>Outcome</th>
<th>Notes</th>
</tr>
</thead>
<tbody>
<tr>
<td>Skip Link</td>
<td><strong>Pass</strong></td>
<td></td>
</tr>
<tr>
<td>Navigate by keyboard</td>
<td>Fail</td>
<td>The carousel of Tweets are in the tab order but tabbing through them does not change the carousel, so it appears to the user that nothing is happening. I had to tab 19 times before moving from the carousel to the “Join the Team” input, it would be easy for someone to give up because they can’t tell anything is happening.</td>
</tr>
<tr>
<td>Focus indicators</td>
<td>Fail</td>
<td>Many elements did not have focus indication and the few that did have indication did not have sufficient contrast.</td>
</tr>
<tr>
<td>Color contrast</td>
<td>Fail</td>
<td>Many elements did not have sufficient contrast, including text in the “Are you with us” section and the bottom part of the footer.</td>
</tr>
<tr>
<td>Heading Levels</td>
<td>Fail</td>
<td>Missing <code>h1</code>.</td>
</tr>
<tr>
<td>Alt text</td>
<td><strong>Pass</strong></td>
<td></td>
</tr>
<tr>
<td>Labels in forms</td>
<td>Fail</td>
<td>Inputs are missing labels.</td>
</tr>
<tr>
<td>Content resizing</td>
<td>Fail</td>
<td>Most of the content flowed well but the placeholders in the form inputs were cut off as was the button text. The “Repair. Rebuild. Reimagine.” header was cut off.</td>
</tr>
<tr>
<td>Accessibility Statement</td>
<td>Fail</td>
<td>No Accessibility Statement.</td>
</tr>
<tr>
<td>Works without JavaScript</td>
<td>Fail</td>
<td>Entire hero area does not load.</td>
</tr>
</tbody>
</table>

      <div class="heading-wrapper">
        <h4 id="test-results-for-shaun-donovans-site">Test results for Shaun Donovan’s site
      </h4>
        <a class="anchor-link" href="https://danabyerly.com/articles/do-new-york-city-mayoral-candidates-have-accessible-campaign-sites/#test-results-for-shaun-donovans-site">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><ul>
<li><a href="https://developers.google.com/speed/pagespeed/insights/?url=https%3A%2F%2Fshaunfornyc.com">Page Speed Insights</a></li>
<li><a href="https://wave.webaim.org/report#/https://shaunfornyc.com">WAVE</a></li>
<li><a href="https://validator.w3.org/nu/?showoutline=yes&amp;showimagereport=yes&amp;doc=https%3A%2F%2Fshaunfornyc.com%2F">W3 HTML Validator</a></li>
</ul>
<hr />

      <div class="heading-wrapper">
        <h2 id="summary">Summary
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/articles/do-new-york-city-mayoral-candidates-have-accessible-campaign-sites/#summary">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Does a candidate’s lack of an accessible campaign site mean they won’t be a good Mayor for disabled New Yorkers? Of course not, but it also doesn’t inspire confidence. Alternatively, the candidate whose campaign site was the most accessible (by this high-level overview at any rate) isn’t guaranteed to be the best candidate for an accessible, equitable and inclusive New York City.</p>
<p>I hope that by highlighting the relative inaccessibility of these sites that it brings more awareness to the importance of ensuring that all experiences work for everyone. Please <a href="mailto:hello@danabyerly.com">contact me via email</a> or <a href="https://twitter.com/superterrific">on Twitter</a> if you have any feedback or suggestions regarding this post.</p>

      ]]></content>
    </entry>
	
    
    <entry>
      <title>Testing Forestry CMS with Eleventy</title>
      <link href="https://danabyerly.com/notes/testing-forestry-cms-with-eleventy/"/>
      <updated>2021-05-19T00:00:00Z</updated>
      <id>https://danabyerly.com/notes/testing-forestry-cms-with-eleventy/</id>
      <content type="html"><![CDATA[
        <p>One of the things on my to do list has been to take a closer look at CMS options for <a href="https://www.11ty.dev/">Eleventy</a>. Aside from being curious about how easy it would be to set up, I might have a couple of projects coming up where the content would be created and maintained by someone who wouldn’t want to use an editor to GitHub flow.</p>

      <div class="heading-wrapper">
        <h2 id="process">Process
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/testing-forestry-cms-with-eleventy/#process">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>I started by creating a simple little site locally that included…</p>
<ul>
<li>A Homepage</li>
<li>Posts and a post listing page</li>
<li>Tags and a post listing page by tag</li>
<li>Pagination</li>
<li>A static page</li>
</ul>
<p>I wanted to test any prospective CMS using a site I created rather than a starter. Integrating something I built rather than poking at something someone else built felt like a better opportunity to learn, or at least maybe a more efficient one!</p>
<p>I started with <a href="https://forestry.io/">Forestry</a>. I wanted to ease in with a Git-based CMS and Forestry provided an “import your site” option, making it easy to get up and running with my own site. Both Forestry and <a href="https://www.netlifycms.org/">Netlify</a> provide a “use a starter project” path as well.</p>

      <div class="heading-wrapper">
        <h2 id="findings">Findings
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/testing-forestry-cms-with-eleventy/#findings">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Overall it went pretty smoothly and ended up being a fun little project. I learned what I set out to learn and feel Forestry would be a good pick for the projects I have I mind.</p>
<p>After getting the site set up in Forestry <a href="https://vigorous-benz-80f8e4.netlify.app/">I deployed it to Netlify</a>. It’s worth noting that Forestry provides a way to <a href="https://forestry.io/docs/previews/about-previews/">set up previews</a>,  so you can do a lot before you ever deploy to a host.</p>
<p>The test site, cleverly named <a href="https://vigorous-benz-80f8e4.netlify.app/">CMS Test</a>, has a post about each of the elements I included, plus a kick off post and wrap-up to discuss likes and dislikes. Rather than writing it up here you can read more at the test site.</p>
<p>Here’s what’s covered…</p>
<ul>
<li><a href="https://vigorous-benz-80f8e4.netlify.app/posts/kicking-it-off/">Kick off</a> - Overview of the project, not that dissimilar from this post but more succinct</li>
<li><a href="https://vigorous-benz-80f8e4.netlify.app/posts/images/">Images</a> - Within a template and within a body of the post</li>
<li><a href="https://vigorous-benz-80f8e4.netlify.app/posts/snippets/">Snippets</a> - Creating reusable text or code</li>
<li><a href="https://vigorous-benz-80f8e4.netlify.app/posts/date-field">Date field</a> - Options for handling dates</li>
<li><a href="https://vigorous-benz-80f8e4.netlify.app/posts/drafts/">Drafts</a> - Setting up drafts</li>
<li><a href="https://vigorous-benz-80f8e4.netlify.app/posts/wrap-up/">Wrap up</a> - Pros and cons</li>
</ul>
<p>There are plenty of things Forestry has to offer that I didn’t try out, but I feel like I have a solid starting point when I need it. It’s also nice to have the site as a reference.</p>

      <div class="heading-wrapper">
        <h2 id="next-steps">Next steps
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/testing-forestry-cms-with-eleventy/#next-steps">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>At some point I might clean up the test site, add a few things like a 404 and RSS, and make it a proper <a href="https://www.11ty.dev/docs/starter/">Eleventy starter</a>. Even if I don’t go that route I’ll use the structure and same approach if and when I test any other CMS. I might also try out an API-based CMS like <a href="https://www.sanity.io/">Sanity</a> as well as <a href="https://www.netlifycms.org/">Netlify</a>, which is also Git-based.</p>
<p>If you’d like to read more about what I learned, head over to <a href="https://vigorous-benz-80f8e4.netlify.app/">CMS Test</a> and check out the posts. You can also <a href="https://github.com/superterrific/cms-test">view the repository</a>.</p>

      ]]></content>
    </entry>
	
    
    <entry>
      <title>Annual Kentucky Derby 8 ball</title>
      <link href="https://danabyerly.com/notes/annual-kentucky-derby-8-ball/"/>
      <updated>2021-04-12T00:00:00Z</updated>
      <id>https://danabyerly.com/notes/annual-kentucky-derby-8-ball/</id>
      <content type="html"><![CDATA[
        <p>It’s the time of year when I make the annual <a href="https://2021-derby-8ball.glitch.me/">Kentucky Derby Magic 8 Ball</a>. It’s a <a href="https://danabyerly.com/projects/kentucky-derby-magic-8-ball/">fun little project</a> that started in 2018 and unintentionally became a way for me to track the progress of my dev skills.</p>
<p>2018 was around the time I decided to improve my languishing dev skills. By chance I found a <a href="https://kellylougheed.medium.com/javascript-magic-8-ball-with-basic-dom-manipulation-1636b83c3c26">Magic 8 Ball JavaScript tutorial</a> and decided to give it a go. Each year since I’ve been able to make improvements that were out of my range the year before. And each year I’ve been pleasantly surprised when I’ve found things easy to improve, or thought of an enhancement that wouldn’t have occurred to me before.</p>
<p>The wrap-up on <a href="https://danabyerly.com/projects/kentucky-derby-magic-8-ball/">the project page</a> prior to this year’s update was “Hopefully by next year’s version I’ll be able to improve the accessibility further and maybe even give it some nice 8 Ball-ish animations”. Spoiler alert: I was able to!</p>

      <div class="heading-wrapper">
        <h2 id="improved-accessibility">Improved Accessibility
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/annual-kentucky-derby-8-ball/#improved-accessibility">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>The accessibility was in pretty good shape as of last year. It can be used by keyboard only, there are no screen reflow issues and it announces reasonably well. One thing I did improve on this year is that the placeholder “8” was being announced.</p>
<p>The structure is that the “8” is replaced with random text, and I chose to keep it that way, but I added <code>aria-hidden=&quot;true&quot;</code> to the default state. When the “Who will win?” button is clicked several things that happen, mostly adding and removing class selectors to hide and show the different elements.</p>
<p>This year’s ‘ah ha’ JavaScript moment was to realize that I could also manipulate attributes, so I added the following to the function to change <code>aria-hidden</code> from “true” to “false”:</p>
<pre class="language-js"><code class="language-js">document<span class="token punctuation">.</span><span class="token function">getElementById</span><span class="token punctuation">(</span><span class="token string">'answer-container'</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">setAttribute</span><span class="token punctuation">(</span><span class="token string">"aria-hidden"</span><span class="token punctuation">,</span> <span class="token boolean">false</span><span class="token punctuation">)</span><span class="token punctuation">;</span></code></pre>
<p>Now the answer is announced but the “8” is not.</p>

      <div class="heading-wrapper">
        <h2 id="animations">Animations
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/annual-kentucky-derby-8-ball/#animations">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>I rarely use any kind of animations. There are a number of reasons for this. Mostly my mind just doesn’t work in a way that would think “a little flourish or movement here would be just the thing”. Similarly when I look at animation code it doesn’t click for me the way grid or flexbox does.</p>
<p>One of the rare instances where it did occur to me that some animation would be just thing was the Magic 8 ball. And it seemed like straightforward shaking and fading would go a long way. Admittedly, I found some examples and made some adjustments rather than trying to figure out how to write it from scratch. That aside, I think does add to the overall Magic 8 ball-ness, which is nice.</p>

      <div class="heading-wrapper">
        <h2 id="accessibility">Accessibility
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/annual-kentucky-derby-8-ball/#accessibility">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>While the animations are nice, what about accessibility? Motion can cause a <a href="https://source.opennews.org/articles/motion-sick/">variety of problems</a> for people with motion sensitivities. Fortunately there are ways to help ensure that viewing animations and motion are a viewer’s choice.</p>
<p>As I was preparing to create this year’s 8 Ball <a href="https://tatianamac.com/posts/prefers-reduced-motion/">Tatiana Mac’s article on prefers-reduced-motion</a> was in my reading stream. Originally I was going to use the universal selector approach <a href="https://piccalil.li/blog/a-modern-css-reset">found in resets </a>, but after reading Mac’s article I wanted to be a little more deliberate.</p>
<p>There are three items with motion.</p>
<ul>
<li>The 8 ball shakes upon click of the button.</li>
<li>The button scales, giving the feel of pressing a physical button.</li>
<li>The answer fades in.</li>
</ul>
<p>I particularly liked the suggestion of changing my mindset on the approach, so instead of the default being to allow animations, I set the default experience to no animations.</p>
<p>Instead of using <code>prefers-reduced-motion: reduce</code> to hide animations, I’m using <code>prefers-reduced-motion: no-preference</code> to allow the animations. The advantage of this approach, <a href="https://tatianamac.com/posts/prefers-reduced-motion/#start-with-no-motion">as Mac points out</a>, is that browsers that don’t support the media query get the default no animation approach.</p>
<p>Default experience:</p>
<pre class="language-css"><code class="language-css"><span class="token selector">.shake</span> <span class="token punctuation">{</span><br />  <span class="token property">animation</span><span class="token punctuation">:</span> none<span class="token punctuation">;</span><br /><span class="token punctuation">}</span><br /><br /><span class="token selector">button:active</span> <span class="token punctuation">{</span><br />  <span class="token property">transform</span><span class="token punctuation">:</span> none<span class="token punctuation">;</span><br /><span class="token punctuation">}</span><br /><br /><span class="token selector">.reveal</span> <span class="token punctuation">{</span><br />  <span class="token property">animation</span><span class="token punctuation">:</span> none<span class="token punctuation">;</span><br /><span class="token punctuation">}</span></code></pre>
<p>Animation experience for those who have not selected to reduce motion and are using a browser that supports the media query:</p>
<pre class="language-css"><code class="language-css"><span class="token atrule"><span class="token rule">@media</span> <span class="token punctuation">(</span><span class="token property">prefers-reduced-motion</span><span class="token punctuation">:</span> no-preference<span class="token punctuation">)</span></span> <span class="token punctuation">{</span><br />  <span class="token selector">.shake</span> <span class="token punctuation">{</span><br />    <span class="token property">animation</span><span class="token punctuation">:</span> shake 0.82s <span class="token function">cubic-bezier</span><span class="token punctuation">(</span>.36<span class="token punctuation">,</span>.07<span class="token punctuation">,</span>.19<span class="token punctuation">,</span>.97<span class="token punctuation">)</span> both<span class="token punctuation">;</span><br />    <span class="token property">transform</span><span class="token punctuation">:</span> <span class="token function">translate3d</span><span class="token punctuation">(</span>0<span class="token punctuation">,</span> 0<span class="token punctuation">,</span> 0<span class="token punctuation">)</span><span class="token punctuation">;</span><br />    <span class="token property">backface-visibility</span><span class="token punctuation">:</span> hidden<span class="token punctuation">;</span><br />    <span class="token property">perspective</span><span class="token punctuation">:</span> 1000px<span class="token punctuation">;</span><br />  <span class="token punctuation">}</span><br /><br />  <span class="token atrule"><span class="token rule">@keyframes</span> shake</span> <span class="token punctuation">{</span><br />    <span class="token selector">10%, 90%</span> <span class="token punctuation">{</span><br />      <span class="token property">transform</span><span class="token punctuation">:</span> <span class="token function">translate3d</span><span class="token punctuation">(</span>-1px<span class="token punctuation">,</span> 0<span class="token punctuation">,</span> 0<span class="token punctuation">)</span><span class="token punctuation">;</span><br />    <span class="token punctuation">}</span><br />    <span class="token selector">20%, 80%</span> <span class="token punctuation">{</span><br />      <span class="token property">transform</span><span class="token punctuation">:</span> <span class="token function">translate3d</span><span class="token punctuation">(</span>2px<span class="token punctuation">,</span> 0<span class="token punctuation">,</span> 0<span class="token punctuation">)</span><span class="token punctuation">;</span><br />    <span class="token punctuation">}</span><br />    <span class="token selector">30%, 50%, 70%</span> <span class="token punctuation">{</span><br />      <span class="token property">transform</span><span class="token punctuation">:</span> <span class="token function">translate3d</span><span class="token punctuation">(</span>-4px<span class="token punctuation">,</span> 0<span class="token punctuation">,</span> 0<span class="token punctuation">)</span><span class="token punctuation">;</span><br />    <span class="token punctuation">}</span><br />    <span class="token selector">40%, 60%</span> <span class="token punctuation">{</span><br />      <span class="token property">transform</span><span class="token punctuation">:</span> <span class="token function">translate3d</span><span class="token punctuation">(</span>4px<span class="token punctuation">,</span> 0<span class="token punctuation">,</span> 0<span class="token punctuation">)</span><span class="token punctuation">;</span><br />    <span class="token punctuation">}</span><br />  <span class="token punctuation">}</span><br /><br />  <span class="token selector">.reveal</span> <span class="token punctuation">{</span><br />    <span class="token property">animation</span><span class="token punctuation">:</span> fadeIn ease 4s<span class="token punctuation">;</span><br />  <span class="token punctuation">}</span> <span class="token atrule"><span class="token rule">@keyframes</span> fadeIn</span> <span class="token punctuation">{</span><br />    <span class="token selector">0%</span> <span class="token punctuation">{</span><br />      <span class="token property">opacity</span><span class="token punctuation">:</span>0<span class="token punctuation">;</span><br />    <span class="token punctuation">}</span><br />    <span class="token selector">100%</span> <span class="token punctuation">{</span><br />      <span class="token property">opacity</span><span class="token punctuation">:</span>1<span class="token punctuation">;</span><br />    <span class="token punctuation">}</span><br />  <span class="token punctuation">}</span><br /><br />  <span class="token selector">button:active</span> <span class="token punctuation">{</span><br />    <span class="token property">transform</span><span class="token punctuation">:</span> <span class="token function">scale</span><span class="token punctuation">(</span>0.95<span class="token punctuation">)</span><span class="token punctuation">;</span><br />  <span class="token punctuation">}</span><br /><span class="token punctuation">}</span></code></pre>

      <div class="heading-wrapper">
        <h2 id="design">Design
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/annual-kentucky-derby-8-ball/#design">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>I’m usually so focused on how I can improve my dev skills that I overlook design. After adding the animations I realized it would also be nice to it make it look more like an actual 8 ball.</p>
<figure class="fig-container">
  <picture>
    <source srcset="https://danabyerly.com/img/8-ball-comparison-sm.avif" type="image/avif" />
    <source srcset="https://danabyerly.com/img/8-ball-comparison-sm.webp" type="image/webp" />
    <img src="https://danabyerly.com/img/8-ball-comparison-sm.png" alt="Side by side comparison of 2020 and 2021 Kentucky Derby Magic 8 Balls showing the 2021 version to look more like a tranditional 8 ball." loading="lazy" />
  </picture>
  <figcaption>
    The 2021 version looks a bit more like the original Magic 8 Ball with a white circle and geometric 8.
  </figcaption>
</figure>
<p>After checking <a href="https://duckduckgo.com/?t=ffab&amp;q=magic+8+ball&amp;atb=v225-1&amp;iax=images&amp;ia=images">some reference material</a> I made the circle containing the 8 white and used <a href="https://fonts.google.com/specimen/Exo?preview.text=8&amp;preview.text_type=custom">Exo font</a> for the geometric 8 vibe. The blue triangle would be a nice touch, but it’s hard enough to get some of the longer character names to display well, and this is 8 ball-esque enough for me at the moment. Maybe next year I’ll try to improve the animation to make it look like the 8 ball is being turned over, but maybe not!</p>
<p>You can read all the about the improvements on a year-by-year basis at the <a href="https://danabyerly.com/projects/kentucky-derby-magic-8-ball/">project page</a>.</p>

      ]]></content>
    </entry>
	
    
    <entry>
      <title>Quick fix and a test</title>
      <link href="https://danabyerly.com/notes/quick-fix-and-a-test/"/>
      <updated>2021-04-01T00:00:00Z</updated>
      <id>https://danabyerly.com/notes/quick-fix-and-a-test/</id>
      <content type="html"><![CDATA[
        <p>I subscribe to a lot of useful newsletters. One of my favorites is Laura Carlson’s Web Design Update, <a href="https://www.d.umn.edu/itss/training/online/webdesign/webdev_listserv.html">described as</a> “a plain text email digest dedicated to disseminating news and information about web design and development with emphasis on elements of user experience, accessibility, web standards and more”.</p>
<p>It’s quite possibly one of the most beautifully nerdy things I’ve seen in the recent past. No frills, nothing slick and nothing annoying. Just a weekly plain text email full of useful articles focused on accessibility and usability. To sign up you send an email with a blank body to an email address then you start getting them. It’s spectacular. <a href="https://www.d.umn.edu/itss/training/online/webdesign/webdev_listserv.html">Go get the email address and sign-up</a>!</p>

      <div class="heading-wrapper">
        <h2 id="the-quick-fix">The quick fix
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/quick-fix-and-a-test/#the-quick-fix">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>I was reading one of the articles included in this week’s edition, <a href="https://bootcamp.uxdesign.cc/wcag-accessible-colour-and-contrast-ratios-5e94ea3f81f4">WCAG: Accessible colour and contrast ratios</a>, and realized that I forgot to check the tag background color against the surface background color when testing the <a href="https://danabyerly.com/notes/horse-racing-datasets-redesigned/">Horse Racing Datasets redesign</a>. Sure enough in the light mode it was just shy of the 3:1 contrast ratio needed for AA compliance. Fortunately I was able to make some adjustments and get it fixed quickly.</p>
<p>I missed it because button to surface contrast, or in my case tag-styled-like-button to surface contrast isn’t tested in the usual tools such <a href="https://wave.webaim.org/">Wave</a>, Lighthouse or <a href="https://www.smashingmagazine.com/2020/08/accessibility-chrome-devtools/">DevTools</a>. This is no excuse of course, but a good reminder to not to skip manual testing. In fact I did manually check all the text and styled-like-buttons elements against the colors in the background images, but forgot the tags!</p>
<p>As usual, the ever-prolific Eleventy educator extraordinaire <a href="https://twitter.com/5t3ph/">Stephanie Eckles</a> has created something useful for checking background colors against surface. <a href="https://buttonbuddy.dev/">ButtonBuddy</a> lets you plug in your button colors to check all the various contrast scenarios, it’s very useful!</p>

      <div class="heading-wrapper">
        <h2 id="the-test">The test
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/quick-fix-and-a-test/#the-test">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Also this week I did a <a href="https://danabyerly.com/changelog/2021-04-01">little housekeeping</a> after slogging through the <a href="https://danabyerly.com/notes/horse-racing-datasets-redesigned/">Horse Racing Datasets redesign recap</a> and <a href="https://danabyerly.com/projects/horse-racing-datasets/">project page update</a>. One of housekeeping items was updating to the latest version of <a href="https://www.11ty.dev/docs/plugins/rss/">Eleventy RSS plugin</a>.</p>
<p>I recently noticed that my RSS posts were dated a day behind, and in trying to figure it out I discovered there was a newer version of the plugin. Being a relative newbie at all things Jamstack I was a little proud of myself for figuring out how to do it. In retrospect was very easy, although I still had to figure it out.</p>
<p>Here are the steps to update the Eleventy RSS plugin in case you find yourself not quite sure what to do. This assumes you’re already using the plugin and that you’re using Nunjucks. If you’re using Liquid there’s a <a href="https://www.npmjs.com/package/eleventy-xml-plugin">separate plugin</a>.</p>
<p>In the command line in your project folder run the following:</p>
<pre class="language-bash"><code class="language-bash"><span class="token function">npm</span> update @11ty/eleventy-plugin-rss</code></pre>
<p>And then in your RSS template you’ll be changing two date filters.</p>
<p>Near the top of your template change this:</p>
<pre class="language-html"><code class="language-html"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>updated</span><span class="token punctuation">></span></span>{{ collections.posts | rssLastUpdatedDate }}<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>updated</span><span class="token punctuation">></span></span></code></pre>
<p>To this:</p>
<pre class="language-html"><code class="language-html"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>updated</span><span class="token punctuation">></span></span>{{ collections.posts | getNewestCollectionItemDate | dateToRfc3339 }}<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>updated</span><span class="token punctuation">></span></span></code></pre>
<p>Be sure to change “collections.posts” to your collection.</p>
<p>Then in the entry section change this:</p>
<pre class="language-html"><code class="language-html"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>updated</span><span class="token punctuation">></span></span>{{ post.date | rssDate }}<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>updated</span><span class="token punctuation">></span></span></code></pre>
<p>To this:</p>
<pre class="language-html"><code class="language-html"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>updated</span><span class="token punctuation">></span></span>{{ post.date | dateToRfc3339 }}<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>updated</span><span class="token punctuation">></span></span></code></pre>
<p>Since you’re already using the plugin you don’t have to change anything in <code>eleventy.js</code>.</p>
<p>This has been a very long winded way to say “I updated my RSS plugin and am going to publish something to see if it works”. It works locally! But the date is still a day off, so back to the drawing board on that front.</p>
<p>All of that aside, you should still check out the <a href="https://www.d.umn.edu/itss/training/online/webdesign/webdev_listserv.html">Web Design Update email digest</a> and <a href="https://buttonbuddy.dev/">ButtonBuddy</a>!</p>

      ]]></content>
    </entry>
	
    
    <entry>
      <title>Horse Racing Datasets redesigned</title>
      <link href="https://danabyerly.com/notes/horse-racing-datasets-redesigned/"/>
      <updated>2021-03-29T00:00:00Z</updated>
      <id>https://danabyerly.com/notes/horse-racing-datasets-redesigned/</id>
      <content type="html"><![CDATA[
        <p>Finally! It took a while to <a href="https://twitter.com/superterrific/status/1353047440664915969">circle back to the design</a> after having so much fun <a href="https://danabyerly.com/articles/using-airtable-with-eleventy/">figuring out how to build it</a>, but the fourth version of Horse Racing Datasets is <a href="https://horseracingdatasets.com/">finally done</a>! Or at least out there in a good place with more improvements to come.</p>
<p>At the end of last year I had a working <a href="https://danabyerly.com/notes/update-on-the-end-of-the-year-to-do-list/">proof of concept</a> of how to use <a href="https://airtable.com/">Airtable</a> with <a href="https://www.11ty.dev/">Eleventy</a> and wrote <a href="https://danabyerly.com/articles/using-airtable-with-eleventy/">an article</a> detailing all the particulars. At the time I couldn’t figure out how to filter on the on the dataset so I did two extra API calls for <a href="https://horseracingdatasets.com/recently-added/">recently added listing</a> and to display a <a href="https://horseracingdatasets.com/">random dataset on the homepage</a>. As I mentioned in my <a href="https://danabyerly.com/notes/ugging-along/">last update</a> I have since figured out how to do it all from a single API call, so updating the article goes on the to do list.</p>
<p>I also need to update the <a href="https://danabyerly.com/projects/horse-racing-datasets/">project page</a>, until then here’s a bit about some of the improvements and updates…</p>

      <div class="heading-wrapper">
        <h2 id="filtering">Filtering
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/horse-racing-datasets-redesigned/#filtering">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Being able to do everything from a single API call is not only a big improvement from my initial proof of concept for this version, but an incredibly big improvement from the prior version, which used an API call for <strong>each category</strong>. This marks a huge step forward in my problem solving abilities, so rather than be mortified by the last version (OK, I’m still a little mortified!), I’m going to be proud of the improvements I’ve made over the last two years.</p>
<p>A lot of this will go in the update of the <a href="https://danabyerly.com/articles/using-airtable-with-eleventy/">Airtable and Eleventy article</a>, but here are some particulars on the filtering.</p>
<p>I used the <a href="https://11ty.rocks/eleventyjs/data-arrays/#randomitem-filter">randItem filter from 11ty Rocks</a> to display a “Random Dataset of the Day”. Since Eleventy only pulls from the API on build, I used <a href="https://zapier.com/">Zapier</a> to schedule a <a href="https://zapier.com/apps/netlify/integrations/schedule/29330/start-deploys-of-netlify-sites-on-a-daily-schedule">daily build at Netlify</a>. This displays a new random dataset and picks up any datasets I’ve added to Airtable since the last build, making maintenance a snap.</p>
<p>The <a href="https://horseracingdatasets.com/all/">All Datasets</a> page displays alphabetically and the sort order is set at Airtable. But on the <a href="https://danabyerly.com/articles/using-airtable-with-eleventy/#listing-by-tag">category pages</a> the default listing is to display by most recently added. With some search engine luck <a href="https://stackoverflow.com/questions/65471629/dot-notation-in-nunjucks-sorting-isnt-working/65481434#65481434">I found this approach</a> and was able to create a filter to sort by title to keep the same approach used on the All Datasets listing.</p>
<p>The filter gets added in <code>eleventy.js</code>…</p>
<pre class="language-js"><code class="language-js">config<span class="token punctuation">.</span><span class="token function">addFilter</span><span class="token punctuation">(</span><span class="token string">"sortByTitle"</span><span class="token punctuation">,</span> <span class="token parameter">arr</span> <span class="token operator">=></span> <span class="token punctuation">{</span><br />  arr<span class="token punctuation">.</span><span class="token function">sort</span><span class="token punctuation">(</span><span class="token punctuation">(</span><span class="token parameter">a<span class="token punctuation">,</span> b</span><span class="token punctuation">)</span> <span class="token operator">=></span> <span class="token punctuation">(</span>a<span class="token punctuation">.</span>title<span class="token punctuation">)</span> <span class="token operator">></span> <span class="token punctuation">(</span>b<span class="token punctuation">.</span>title<span class="token punctuation">)</span> <span class="token operator">?</span> <span class="token number">1</span> <span class="token operator">:</span> <span class="token operator">-</span><span class="token number">1</span><span class="token punctuation">)</span><span class="token punctuation">;</span><br />  <span class="token keyword">return</span> arr<span class="token punctuation">;</span><br /> <span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span></code></pre>
<p>And then used in the for loop in the template…</p>
<pre class="language-js"><code class="language-js"><span class="token punctuation">{</span><span class="token operator">%</span> <span class="token keyword">for</span> datakey <span class="token keyword">in</span> all <span class="token operator">|</span> sortByTitle <span class="token operator">%</span><span class="token punctuation">}</span><br />  <span class="token operator">...</span><br /><span class="token punctuation">{</span><span class="token operator">%</span> endfor <span class="token operator">%</span><span class="token punctuation">}</span></code></pre>
<p>The set-up is similar for the <a href="https://horseracingdatasets.com/recently-added/">Recently Added</a> page. The filter gets added in <code>eleventy.js</code>…</p>
<pre class="language-js"><code class="language-js">config<span class="token punctuation">.</span><span class="token function">addFilter</span><span class="token punctuation">(</span><span class="token string">"sortByNewest"</span><span class="token punctuation">,</span> <span class="token parameter">arr</span> <span class="token operator">=></span> <span class="token punctuation">{</span><br />  arr<span class="token punctuation">.</span><span class="token function">sort</span><span class="token punctuation">(</span><span class="token punctuation">(</span><span class="token parameter">b<span class="token punctuation">,</span> a</span><span class="token punctuation">)</span> <span class="token operator">=></span> <span class="token punctuation">(</span>a<span class="token punctuation">.</span>date<span class="token punctuation">)</span> <span class="token operator">></span> <span class="token punctuation">(</span>b<span class="token punctuation">.</span>date<span class="token punctuation">)</span> <span class="token operator">?</span> <span class="token number">1</span> <span class="token operator">:</span> <span class="token operator">-</span><span class="token number">1</span><span class="token punctuation">)</span><span class="token punctuation">;</span><br />  <span class="token keyword">return</span> arr<span class="token punctuation">;</span><br /><span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span></code></pre>
<p>And then used in the template…</p>
<pre class="language-js"><code class="language-js"><span class="token punctuation">{</span><span class="token operator">%</span> <span class="token keyword">for</span> datakey <span class="token keyword">in</span> all <span class="token operator">|</span> sortByNewest <span class="token operator">|</span> <span class="token function">limit</span><span class="token punctuation">(</span><span class="token number">5</span><span class="token punctuation">)</span> <span class="token operator">%</span><span class="token punctuation">}</span><br />  <span class="token operator">...</span><br /><span class="token punctuation">{</span><span class="token operator">%</span> endfor <span class="token operator">%</span><span class="token punctuation">}</span></code></pre>
<p>I’m also using the <a href="https://11ty.rocks/eleventyjs/data-arrays/#limit-filter">limit filter from 11ty Rocks</a> to set the amount of most recent datasets to return.</p>

      <div class="heading-wrapper">
        <h2 id="accessibility-improvements">Accessibility improvements
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/horse-racing-datasets-redesigned/#accessibility-improvements">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>In the previous version the header was sticky and navigation sidebar was fixed with scrolling on larger screens. Generally I like this sort of layout for documentation or for browsing listings, but there are issues with <a href="https://www.w3.org/WAI/WCAG21/Understanding/reflow.html">screen reflow</a> when zooming out the screen size. The previous version became less usable around 240% zoom.</p>
<figure class="fig-container">
  <picture>
    <source srcset="https://danabyerly.com/img/hrds-v3-300zoom.avif" type="image/avif" />
    <source srcset="https://danabyerly.com/img/hrds-v3-300zoom.webp" type="image/webp" />
    <img src="https://danabyerly.com/img/hrds-v3-300zoom.png" alt="Prior version of Horse Racing Datasets zoomed to 300%" loading="lazy" />
  </picture>
  <figcaption>
    The previous version zoomed to 300% the layout starts to make the content hard to read.
  </figcaption>
</figure>
<p>In the current version everything flows nicely and it’s easy to read all the way up to 500%.</p>
<figure class="fig-container">
  <picture>
    <source srcset="https://danabyerly.com/img/hrds-v4-300zoom.avif" type="image/avif" />
    <source srcset="https://danabyerly.com/img/hrds-v4-300zoom.webp" type="image/webp" />
    <img src="https://danabyerly.com/img/hrds-v4-300zoom.png" alt="The current version of Horse Racing Datasets zoomed to 300%" loading="lazy" />
  </picture>
  <figcaption>
    The current version zoomed to 300% and everything is easy to read.
  </figcaption>
</figure>
<p>Other improvements include visible focus states and color contrast that meets <a href="https://www.w3.org/WAI/WCAG21/Understanding/contrast-minimum.html">WCAG AA standards</a> in both the light and dark mode.</p>
<figure class="fig-container">
  <picture>
    <source srcset="https://danabyerly.com/img/light-dark.avif" type="image/avif" />
    <source srcset="https://danabyerly.com/img/light-dark.webp" type="image/webp" />
    <img src="https://danabyerly.com/img/light-dark.png" alt="Horse Racing Datasets homepage in light and dark modes" loading="lazy" />
  </picture>
  <figcaption>
    Light and dark mode.
  </figcaption>
</figure>
<p>The current set up uses the visitor’s system-level settings, but I want to add to add the ability toggle sooner rather than later. I tried to implement the <a href="https://piccalil.li/tutorial/create-a-user-controlled-dark-or-light-mode">Piccalilli user controlled dark or light mode</a> with no luck. I already had the current implementation working by time I tried it, and I’m also using a LOT of custom properties for the themes, but I think my lack of JavaScript skill was the real culprit. Rather than hold up the latest version I decided I’ll put this one on the to do list and come back to it.</p>

      <div class="heading-wrapper">
        <h2 id="progressive-enhancements">Progressive enhancements
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/horse-racing-datasets-redesigned/#progressive-enhancements">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>The menu toggle is simple yet progressively enhanced to work when JavaScript is disabled or fails to load. It uses the “no-js” fallback approach, which can <a href="https://twitter.com/piccalilli_/status/1349730273135476741">easily cause accessibility issues</a>. I tested in VoiceOver as well as keyboard-only with JavaScript enabled and disabled and it worked well. My testing was very limited, but hopefully it will work well for everyone.</p>
<p>For a more robust and bulletproof approach Andy Bell has a <a href="https://piccalil.li/premium/build-a-fully-responsive-progressively-enhanced-burger-menu/">great premium tutorial at Piccalilli</a>. The membership <a href="https://twitter.com/piccalilli_/status/1372948942019760132">price recently dropped</a> making it easier to avail yourself of top-notch educational content! I want to improve my JavaScript skills to really understand more about resizeObserver and other more advanced topics before I try my hand at that one. But for now I feel like the site offers a good experience.</p>
<p>Filed under “know thy audience”, when doing any horse racing related project I make sure to do a quick pass in IE11 on my work machine (don’t ask!). The core horse racing audience generally skews older and is less likely to keep their devices up to date. Since I use custom properties the site pretty much renders as black and white in IE11. I have shadows on the dataset container and tags, and originally had them directly in their respective class selectors. They looked a bit odd in the “no color” version so I moved them to custom properties to keep them from rendering in IE11. This site basically looks like a <a href="https://duckduckgo.com/?t=ffsb&amp;q=generic+food+label&amp;atb=v225-1&amp;iax=images&amp;ia=images">generic food label</a> in IE, and I have to admit that I kind of like it.</p>
<figure class="fig-container">
  <picture>
    <source srcset="https://danabyerly.com/img/hrds-ie11.avif" type="image/avif" />
    <source srcset="https://danabyerly.com/img/hrds-ie11.webp" type="image/webp" />
    <img src="https://danabyerly.com/img/hrds-ie11.png" alt="Horse Racing Datasets homepage in IE11" loading="lazy" />
  </picture>
  <figcaption>
    The homepage in IE11, reminiscent of <a href="https://duckduckgo.com/?t=ffsb&q=generic+food+label&atb=v225-1&iax=images&ia=images">generic food labels</a>.
  </figcaption>
</figure>
<p>I also took a quick look with Edge on my work machine and was surprised to discover that it was an older version (44). I discovered this because the spacing was off in several areas and I realized that <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/clamp()#browser_compatibility">clamp() was not supported</a> in that version. I should’ve thought of this level of progressive enhancement before, but it lead me to figure out that defaults can be set in combination with <code>clamp()</code>, which allows unsupported browsers to pick-up the non-clamp property.</p>
<pre class="language-css"><code class="language-css"><span class="token selector">.dataset-container</span> <span class="token punctuation">{</span><br />  <span class="token property">background</span><span class="token punctuation">:</span> <span class="token function">var</span><span class="token punctuation">(</span>--dataset-bg<span class="token punctuation">)</span><span class="token punctuation">;</span><br />  <span class="token property">padding</span><span class="token punctuation">:</span> 1rem<span class="token punctuation">;</span><br />  <span class="token property">padding</span><span class="token punctuation">:</span> <span class="token function">clamp</span><span class="token punctuation">(</span>1rem<span class="token punctuation">,</span> 2vw<span class="token punctuation">,</span> 1.25rem<span class="token punctuation">)</span><span class="token punctuation">;</span><br />  <span class="token property">border</span><span class="token punctuation">:</span> 1px solid <span class="token function">var</span><span class="token punctuation">(</span>--dataset-border<span class="token punctuation">)</span><span class="token punctuation">;</span><br />  <span class="token property">box-shadow</span><span class="token punctuation">:</span> <span class="token function">var</span><span class="token punctuation">(</span>--shadow-lg<span class="token punctuation">)</span><span class="token punctuation">;</span><br /><span class="token punctuation">}</span></code></pre>
<p>In the above example browsers that don’t support <code>clamp()</code> use padding: 1rem while the others use <code>clamp()</code>.</p>

      <div class="heading-wrapper">
        <h2 id="performance-improvements">Performance improvements
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/horse-racing-datasets-redesigned/#performance-improvements">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Performance improvements are no surprise when going from a site that did an API call on every page to a static site. But it did surprise me that the previous version’s performance scores weren’t worse, not that they’re good, but I imagined much worse.</p>
<figure class="fig-container">
  <picture>
    <source srcset="https://danabyerly.com/img/hrds-lighthouse.avif" type="image/avif" />
    <source srcset="https://danabyerly.com/img/hrds-lighthouse.webp" type="image/webp" />
    <img src="https://danabyerly.com/img/hrds-lighthouse.png" alt="Before and after Lighthouse scores. Before: Performance 89, Accessibility 100, Best Practices 93, SEO 88. After 100 for each category." loading="lazy" />
  </picture>
  <figcaption>
    From just OK to perfect scores. Friendly reminder, <a href="https://www.matuzo.at/blog/building-the-most-inaccessible-site-possible-with-a-perfect-lighthouse-score/">perfect Lighthouse scores don't mean perfect sites!</a>
  </figcaption>
</figure>
<p>The performance metrics show the details of the improvements…</p>
<table>
<thead>
<tr>
<th style="text-align:left">Performance Metric</th>
<th style="text-align:left">Previous Version</th>
<th style="text-align:left">Current Version</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">First Contentful Paint</td>
<td style="text-align:left">1.5s</td>
<td style="text-align:left">0.8s</td>
</tr>
<tr>
<td style="text-align:left">Speed Index</td>
<td style="text-align:left">1.7s</td>
<td style="text-align:left">0.8s</td>
</tr>
<tr>
<td style="text-align:left">Largest Contentful Paint</td>
<td style="text-align:left">3.2s</td>
<td style="text-align:left">1.7s</td>
</tr>
<tr>
<td style="text-align:left">Time to Interactive</td>
<td style="text-align:left">3.5s</td>
<td style="text-align:left">0.8s</td>
</tr>
<tr>
<td style="text-align:left">Total Blocking Time</td>
<td style="text-align:left">160ms</td>
<td style="text-align:left">0</td>
</tr>
<tr>
<td style="text-align:left">Cumulative Layout Shift</td>
<td style="text-align:left">0.113</td>
<td style="text-align:left">0.01</td>
</tr>
</tbody>
</table>
<p>Another area of performance improvement was moving from Tailwind CSS to handwritten CSS. Tailwind isn’t necessarily a performance issue, but I used it as is with no optimization, mostly because I didn’t (and arguably still don’t!) know how to use build tools.</p>
<p>Here’s a comparison using <a href="https://cssstats.com/">CSS Stats</a></p>
<table>
<thead>
<tr>
<th style="text-align:left">CSS Stat</th>
<th style="text-align:left">Previous Version</th>
<th style="text-align:left">Current Version</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">File size</td>
<td style="text-align:left">566kb</td>
<td style="text-align:left">8kb</td>
</tr>
<tr>
<td style="text-align:left">Gzipped file size</td>
<td style="text-align:left">77kb</td>
<td style="text-align:left">2kb</td>
</tr>
<tr>
<td style="text-align:left">Rules</td>
<td style="text-align:left">9,901</td>
<td style="text-align:left">78</td>
</tr>
<tr>
<td style="text-align:left">Selectors</td>
<td style="text-align:left">9,969</td>
<td style="text-align:left">101</td>
</tr>
<tr>
<td style="text-align:left">Declarations</td>
<td style="text-align:left">10,988</td>
<td style="text-align:left">244</td>
</tr>
<tr>
<td style="text-align:left">Properties</td>
<td style="text-align:left">117</td>
<td style="text-align:left">100</td>
</tr>
<tr>
<td style="text-align:left">ID</td>
<td style="text-align:left">2</td>
<td style="text-align:left">0</td>
</tr>
<tr>
<td style="text-align:left">Class</td>
<td style="text-align:left">9,834</td>
<td style="text-align:left">59</td>
</tr>
<tr>
<td style="text-align:left">Pseudo class</td>
<td style="text-align:left">3,837</td>
<td style="text-align:left">19</td>
</tr>
<tr>
<td style="text-align:left">Pseudo element</td>
<td style="text-align:left">12</td>
<td style="text-align:left">5</td>
</tr>
</tbody>
</table>
<p>No surprises that there were drastic reductions, you can also view the <a href="https://cssstats.com/stats?url=https%3A%2F%2Fhorseracingdatasets.com%2Fall%2F">full stats for the All Datasets listing page</a> at CSS Stats.</p>

      <div class="heading-wrapper">
        <h2 id="housekeeping">Housekeeping
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/horse-racing-datasets-redesigned/#housekeeping">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>As mentioned in the <a href="https://danabyerly.com/notes/horse-racing-datasets-redesigned/#filtering">Filtering section</a>, I set up daily build at <a href="https://zapier.com/apps/netlify/integrations/schedule/29330/start-deploys-of-netlify-sites-on-a-daily-schedule">Netlify using Zapier</a>. API calls are only made at build time, so this ensures that there will be a new Random Dataset of Day <a href="https://horseracingdatasets.com/">on the homepage</a> and that any datasets I’ve added to Airtable will picked up daily.</p>
<p>I changed a couple of urls from the previous version so I set up redirects for those changes. Netlify offers a couple of different approaches to <a href="https://docs.netlify.com/routing/redirects/">handle redirects</a>. I went with the redirects file. To make sure it ends up in the directory that’s deployed I added this to my <code>eleventy.js</code> file…</p>
<pre class="language-js"><code class="language-js">config<span class="token punctuation">.</span><span class="token function">addPassthroughCopy</span><span class="token punctuation">(</span><span class="token string">'./src/_redirects'</span><span class="token punctuation">)</span><span class="token punctuation">;</span></code></pre>
<p>Finally, I wasn’t originally going to have individual pages for each dataset, but I realized this would make it easier to share and reference them. I used this <a href="https://www.11ty.dev/docs/pages-from-data/">handy approach</a> from the Eleventy Docs.</p>

      <div class="heading-wrapper">
        <h2 id="whats-next">What’s next
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/horse-racing-datasets-redesigned/#whats-next">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Knocking this one off the list was a big accomplishment, but there’s always something else to do. Here’s what I’ll be focusing on next.</p>
<ul>
<li>Update the <a href="https://danabyerly.com/projects/horse-racing-datasets/">project page</a>.</li>
<li>The 2021 version of <a href="https://danabyerly.com/projects/kentucky-derby-magic-8-ball/">Derby Magic 8 Ball</a>, and maybe a revival of the <a href="http://www.exactamundo.org/2018/04/16/2018-kentucky-derby-random-top-10-generator/">Random Derby Top 10 List</a>.</li>
<li>Update <a href="https://danabyerly.com/articles/using-airtable-with-eleventy/">Using Airtable with Eleventy</a> to include improved approaches.</li>
<li>Work on the visitor-controlled light and dark toggle.</li>
<li>Research adding search to the site.</li>
<li>A secret project with <a href="http://twitter.com/railbird">Jessica Chapel</a>!</li>
</ul>

      ]]></content>
    </entry>
	
    
    <entry>
      <title>Ugging along</title>
      <link href="https://danabyerly.com/notes/ugging-along/"/>
      <updated>2021-02-19T00:00:00Z</updated>
      <id>https://danabyerly.com/notes/ugging-along/</id>
      <content type="html"><![CDATA[
        <p>I was going to title this ‘Chugging long’ but inadvertently saved the markdown file as ugging-along, so ugging along it is. Who am I to disagree with the unconscious?</p>

      <div class="heading-wrapper">
        <h2 id="horse-racing-datasets">Horse Racing Datasets
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/ugging-along/#horse-racing-datasets">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>I’ve been making slow progress on Horse Racing Datasets. A few months ago I knocked out a <a href="https://danabyerly.com/notes/update-on-the-end-of-the-year-to-do-list/">proof of concept</a> to move an existing project backed by <a href="https://airtable.com/">Airtable</a> to <a href="https://www.11ty.dev/">Eleventy</a>. I also wrote up <a href="https://danabyerly.com/articles/using-airtable-with-eleventy/">using Airtable with Eleventy</a> if you’re interested.</p>
<p>I was originally thinking I would finish up by the end of February, but thanks to some minor burnout and a bit of <a href="https://indieweb.org/life_happens">life happens</a> I ended up taking a break. Since then I’ve been slowly poking at it and making some good progress.</p>
<p>In the <a href="https://danabyerly.com/articles/using-airtable-with-eleventy/">Airtable article</a> I mentioned having to do a couple of extra calls to Airtable because I couldn’t figure out how to filter on the initial data call. The good news is that I figured out how to do a variety filtering and am now using a single API call 🎉. This was a welcome JavaScript breakthrough for me as I ugh along trying to improve my JS skills. I’ll also be adding “update the Airtable article” to the to do list!</p>

      <div class="heading-wrapper">
        <h3 id="so-far-ive-ugged-my-way-through-the-following">So far I’ve ugged my way through the following
      </h3>
        <a class="anchor-link" href="https://danabyerly.com/notes/ugging-along/#so-far-ive-ugged-my-way-through-the-following">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><ul>
<li>Improved filtering as mentioned above</li>
<li>Added individual pages <a href="https://www.11ty.dev/docs/pages-from-data/">using this approach</a>. Made good use of <a href="https://mozilla.github.io/nunjucks/templating.html#set">Nunjucks variables</a> to get reuse from a template, I might make a little post about that.</li>
<li>Have everything sewn together and a good approximation of the layout.</li>
<li>Have a nice progressively enhanced toggle menu. It’s not nearly as <a href="https://piccalil.li/premium/build-a-fully-responsive-progressively-enhanced-burger-menu/">robust and bulletproof as Andy Bell’s</a> but I’m happy with it. I need to snap up my JS skills to really understand the more complex parts of the tutorial.</li>
</ul>

      <div class="heading-wrapper">
        <h3 id="next-up">Next up
      </h3>
        <a class="anchor-link" href="https://danabyerly.com/notes/ugging-along/#next-up">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><ul>
<li>Nail down colors</li>
<li>Focus more on the design aspect, of course the layout is part of that but I need to move on to the visual particulars of the menu and homepage. I have <a href="https://twitter.com/superterrific/status/1353047440664915969/photo/1">some ideas</a>!</li>
</ul>

      <div class="heading-wrapper">
        <h2 id="dogs-of-dev">Dogs of Dev
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/ugging-along/#dogs-of-dev">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>My sweet little doggy is now a <a href="https://dogsof.dev/dogs/frieda/">Dog of Dev</a>. I ran a <a href="https://twitter.com/superterrific/status/1361087100515409921">Twitter poll</a> to help decide which cute picture to use. I was going to go with the <a href="https://twitter.com/superterrific/status/1361087069209186306">couch shot</a> but understand the appeal of the <a href="https://twitter.com/superterrific/status/1361087073688711169">park portrait</a>.</p>
<p>Be sure to check out all the <a href="https://dogsof.dev/">Dogs of Dev</a>, a fun project by <a href="https://twitter.com/peruvianidol">Mike Aparicio</a>. It looks like <a href="https://twitter.com/peruvianidol/status/1361348257964830723/retweets/with_comments">someone is going to make a Cats of Dev</a>, I have a <a href="https://twitter.com/superterrific/status/1336474131437662209/photo/1">a couple</a> of <a href="https://twitter.com/superterrific/status/1360692852586643460/photo/1">those too</a>.</p>

      <div class="heading-wrapper">
        <h2 id="a11y-websites">A11y Websites
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/ugging-along/#a11y-websites">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>I haven’t posted since the beginning of the year, but I kicked off 2021 on a nice note with a <a href="https://twitter.com/superterrific/status/1345403075935277057">review from A11y Websites</a>. Individual reviews don’t have direct links, but it’s a nice project by <a href="https://twitter.com/calum_ryan">Callum Ryan</a> in which he gives submitted sites a proper accessibility review. Be sure to check out <a href="https://www.a11ywebsites.com/">this useful resource</a>.</p>

      <div class="heading-wrapper">
        <h2 id="notion-and-obsidian">Notion and Obsidian
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/ugging-along/#notion-and-obsidian">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>If you use <a href="https://www.notion.so/">Notion</a> you were probably aware of their <a href="https://twitter.com/NotionHQ/status/1362088718304038914">DNS snafu</a>. It was a good reminder that the best files in the cloud are the ones you can always access locally. I’m not a super heavy Notion user, but I use it enough to be concerned about losing what’s there.</p>
<p>Thanks to <a href="https://twitter.com/piccalilli_/status/1361043178430861315">this thread</a> I found <a href="https://obsidian.md/">Obsidian</a> and was able to set up a local version of Notion using this <a href="https://github.com/connertennery/Notion-to-Obsidian-Converter">handy script</a>. But what about moving forward?</p>
<p>I’ve been using <a href="https://ia.net/writer">iA Writer</a> to draft posts but don’t love it. It’s a nice clean, distraction-free app but I usually only rough out a structure and quickly move to my editor (<a href="https://atom.io/">Atom</a>) to complete them there, mostly because iA Writer doesn’t support auto pair brackets and quotes. This is a big flow killer for me, especially since I do so much linking.</p>
<p>Once I got the Notion backup taken care of, I started tinkering with Obsidian to see if it was a better fit for me than iA Writer moving forward. It didn’t take long to realize the answer was a big, emphatic “Yes!”.</p>
<p>Instead of prattling on about my new crush I’ll just note a few things I like so far and maybe to do a post on it later…</p>
<ul>
<li>It’s easy to create “vaults” or instances. In fact separate instances is a big selling point for me vs. Notion’s all-in-one (which isn’t horrible, with good organization, but so far I like the separation).</li>
<li>Auto pairing of brackets and quotes 🎉</li>
<li>It’s easy to customize using CSS snippets or full on <a href="https://publish.obsidian.md/help/Customization/Appearance">themes</a>. There are several community themes or you can create your own.</li>
<li>An active <a href="https://forum.obsidian.md/">user community</a> (also at <a href="https://discord.com/invite/veuWUTm">Discord</a>, which I haven’t checked out yet).</li>
</ul>
<p>I’ve written this entire post in Obsidian and only did minor clean-up once I got it in Atom, and that’s a welcome change. I also made vault of some design inspiration for my <a href="https://twitter.com/superterrific/status/1353047440664915969">Horse Racing Datasets homepage concept</a> along the lines of using <a href="https://www.are.na/">Are.na</a>.</p>
<p>I’m sure I can come up with some other ideas too. Until then, I’ll continue to ugh along.</p>

      ]]></content>
    </entry>
	
    
    <entry>
      <title>Random Replay Generator spiff up</title>
      <link href="https://danabyerly.com/notes/random-replay-generator-spiff-up/"/>
      <updated>2020-12-31T00:00:00Z</updated>
      <id>https://danabyerly.com/notes/random-replay-generator-spiff-up/</id>
      <content type="html"><![CDATA[
        <p>In keeping with my <a href="https://danabyerly.com/notes/end-of-the-year-to-do-list/#random-replay-generator">end of the year to-do list</a> I was able to give the Random Replay Generator a little spiffing up.</p>
<p>The update was mostly punching up the colors and a few other refinements. My design style is <a href="https://tweets.danabyerly.com/1343664499069485056/">one step above a wireframe</a>, or “jazzing things down” as I like to call it, so I’m happy to have pushed beyond a neutral color on a grey background.</p>
<figure class="fig-container">
  <picture>
    <source srcset="https://danabyerly.com/img/rrg-before-after.avif" type="image/avif" />
    <source srcset="https://danabyerly.com/img/rrg-before-after.webp" type="image/webp" />
    <img src="https://danabyerly.com/img/rrg-before-after.png" alt="Before and after in both light and dark mode" loading="lazy" />
  </picture>
  <figcaption>
    The before and after for both light and dark modes: Before on the right and after on the left.
  </figcaption>
</figure>
<p>A few other updates include adding some <a href="https://piccalil.li/quick-tip/visually-hidden/">visually hidden text</a> for screen reader users. Visually it’s relatively easy to understand who the winner is based on the text treatments and spacing, and the the name of the track might be in the video still, but that context is lost when it’s announced.</p>
<p>I added “Track:” and “Winner:” for extra clarification, and to match the label/value paring of the other data. There are a couple of instances of dead heat finishes, meaning the race officially has two winners. Visually the “winner” section is just repeated to display each winner plus their jockey and trainer. It could be confusing to hear the second winner announced, so I also added “This race was a dead heat and has two winners” before the first winner.</p>
<figure class="fig-container">
  <picture>
    <source srcset="https://danabyerly.com/img/dead-heat.avif" type="image/avif" />
    <source srcset="https://danabyerly.com/img/dead-heat.webp" type="image/webp" />
    <img src="https://danabyerly.com/img/dead-heat.png" alt="A screenshot of the 1992 Gotham Stakes showing a dead heat between Devil His Due and Lure" loading="lazy" />
  </picture>
  <figcaption>
    Visually it's somewhat easy to tell the repeated "winner" section means there are two winners, especially when the still shows the two horses head and head like the 1992 Gotham Stakes. That context is lacking for screen reader users so I've added visually hidden text before the first winner to indicate that the race is a dead heat and has two winners.
  </figcaption>
</figure>
<p>I’ve also updated the <a href="https://danabyerly.com/projects/random-replay-generator/">project page</a> at this site and moved The Generator to the top of the list on the <a href="https://danabyerly.com/projects/">Projects listings</a> and Featured Projects section of <a href="https://danabyerly.com/">the homepage</a>.</p>
<p>I added a dark mode <a href="https://tweets.danabyerly.com/1226247966924660747/">in the last spiff up</a> and had hoped to add a toggle this time around, but decided not to because I wanted to keep the effort limited to a weekend. Maybe next year for the toggle!</p>
<p>The next item on the list is to start the design of the <a href="https://danabyerly.com/notes/update-on-the-end-of-the-year-to-do-list/">Horse Racing Datasets overhaul</a>. I’ve already got the <a href="https://danabyerly.com/articles/using-airtable-with-eleventy/">data hooked up and working with Eleventy</a>. I’ve already started on some research and will probably do a few little updates along the way.</p>
<p>Until then, here’s wishing you and yours a much improved 2021!</p>

      ]]></content>
    </entry>
	
    
    <entry>
      <title>Dynamic heading levels in Eleventy</title>
      <link href="https://danabyerly.com/articles/dynamic-heading-levels-in-eleventy/"/>
      <updated>2020-12-26T00:00:00Z</updated>
      <id>https://danabyerly.com/articles/dynamic-heading-levels-in-eleventy/</id>
      <content type="html"><![CDATA[
        <p>One of my favorite ways to learn is to look around repositories to see different approaches, or figure out how to do something. I picked up this helpful approach while looking at a repository to learn about something else.</p>
<p>After reading this <a href="https://pustelto.com/blog/optimizing-css-for-faster-page-loads/">article by Tomas Pustelto on optimizing CSS</a> I was looking around the repository for his site to take a closer look at how he structured his CSS, and noticed he was dynamically assigning heading levels based on the layout. I made a note to take a closer look after <a href="https://danabyerly.com/articles/manually-splitting-css-files-in-eleventy/">optimizing my CSS</a>, and now that I’ve implemented dynamic headings I wanted to share the approach since I haven’t found any how-to articles already out there.</p>

      <div class="heading-wrapper">
        <h2 id="what-are-heading-levels-and-why-are-they-important">What are heading levels and why are they important?
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/articles/dynamic-heading-levels-in-eleventy/#what-are-heading-levels-and-why-are-they-important">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Heading levels refer to the <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Heading_Elements">HTML heading elements</a> of <code>h1</code> - <code>h6</code>. Heading levels are important because they describe the structure of the content, and <a href="https://usability.yale.edu/web-accessibility/articles/headings#benefits">using them in the correct order has several benefits</a>. In addition to helping sighted users find what they’re looking for more quickly, assistive technology users can also easily navigate between or skip headings.</p>

      <div class="heading-wrapper">
        <h2 id="why-am-i-using-dynamic-header-levels">Why am I using dynamic header levels?
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/articles/dynamic-heading-levels-in-eleventy/#why-am-i-using-dynamic-header-levels">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>There are several places throughout the site where I list posts. I have a single partial to handle all the different post types that includes the post title, summary, the section if applicable (<a href="https://danabyerly.com/articles/">Articles</a> or <a href="https://danabyerly.com/notes/">Notes</a>), publish date and tags. It’s used on the <a href="https://danabyerly.com/">homepage</a>, the <a href="https://danabyerly.com/changelog/">Changelog</a>, and listing pages for <a href="https://danabyerly.com/articles/">Articles</a>, <a href="https://danabyerly.com/notes/">Notes</a>, and tags (e.g., the <a href="https://danabyerly.com/tag/eleventy/">tag for Eleventy content</a>).</p>
<figure class="fig-container">
  <picture>
    <source srcset="https://danabyerly.com/img/article-summary.avif" type="image/avif" />
    <source srcset="https://danabyerly.com/img/article-summary.webp" type="image/webp" />
    <img src="https://danabyerly.com/img/article-summary.png" alt="An example of an article summary" loading="lazy" />
  </picture>
  <figcaption>
    The article summary that displays on the homepage, listing pages and the changelog. The title, summary and publish date are always displayed and the "Filed Under" section and tags are conditional.
  </figcaption>
</figure>
<p>On all of these pages except the homepage the heading should be a <code>h2</code>. On the homepage the listing is within a section that has a <code>h2</code>, so those headings should be <code>h3</code>.</p>
<figure class="fig-container">
  <picture>
    <source srcset="https://danabyerly.com/img/document-outline.avif" type="image/avif" />
    <source srcset="https://danabyerly.com/img/document-outline.webp" type="image/webp" />
    <img src="https://danabyerly.com/img/document-outline.png" alt="The document outline of the homepage and the articles listing page" loading="lazy" />
  </picture>
  <figcaption>
    The document outline of the homepage and the Articles listing page. On the homepage the Articles listing is within a "Recent Writing" section that has a ```h2```. Outlines via <a href="https://validator.w3.org/">W3C Validator</a>
  </figcaption>
</figure>
<p>Fortunately this is relatively easy to do! I’m using Nunjucks <a href="https://mozilla.github.io/nunjucks/templating.html#if-expression">if expressions</a> and <a href="https://mozilla.github.io/nunjucks/templating.html#set">set variable</a>, but I think you could use the same approach with Liquid <a href="https://shopify.github.io/liquid/tags/variable/">by using assign</a>.</p>

      <div class="heading-wrapper">
        <h2 id="how-to-do-it">How to do it
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/articles/dynamic-heading-levels-in-eleventy/#how-to-do-it">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Here’s a diagram showing the relationship of the partial and layouts…</p>
<figure class="fig-container">
  <picture>
    <source srcset="https://danabyerly.com/img/dynamic-headers-template-structure.avif" type="image/avif" />
    <source srcset="https://danabyerly.com/img/dynamic-headers-template-structure.webp" type="image/webp" />
    <img src="https://danabyerly.com/img/dynamic-headers-template-structure.png" alt="A diagram showing how the partial and layouts work together." loading="lazy" />
  </picture>
  <figcaption>
    The partial is passed into two layouts, one for the homepage and one for the listing pages. If the variable is set in the layout then the conditional header uses the variable, if not it renders a ```h2```. Created using <a href="https://excalidraw.com/">Excalidraw</a>.
  </figcaption>
</figure>
<p>As the diagram above shows, the partial for the article summary contains a conditional header that sets the value, in this case the heading tag, to a variable titled <code>headingLevel</code>. If <code>headingLevel</code> is not present, then <code>h2</code> is used. This makes the default heading a <code>h2</code> but allows for variation where needed.</p>
<pre class="language-html"><code class="language-html"><span class="token comment">&lt;!-- article-summary.html --></span><br /><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>{{</span> <span class="token attr-name">headingLevel</span> <span class="token attr-name">if</span> <span class="token attr-name">headingLevel</span> <span class="token attr-name">else</span> <span class="token attr-name">'h2'</span> <span class="token attr-name">}}</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>promo-article-title<span class="token punctuation">"</span></span><span class="token punctuation">></span></span><br /> <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>a</span> <span class="token attr-name">href</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>{{ item.url }}<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>{{ item.data.title }}<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>a</span><span class="token punctuation">></span></span><br /><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>{{</span> <span class="token attr-name">headingLevel</span> <span class="token attr-name">if</span> <span class="token attr-name">headingLevel</span> <span class="token attr-name">else</span> <span class="token attr-name">'h2'</span> <span class="token attr-name">}}</span><span class="token punctuation">></span></span></code></pre>
<p>On the Articles, Changelog, Notes and tag listing pages the conditional heading code turns into this…</p>
<pre class="language-html"><code class="language-html"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>h2</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>promo-article-title<span class="token punctuation">"</span></span><span class="token punctuation">></span></span><br /> <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>a</span> <span class="token attr-name">href</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>{{ item.url }}<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>{{ item.data.title }}<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>a</span><span class="token punctuation">></span></span><br /><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>h2</span><span class="token punctuation">></span></span></code></pre>
<p>In the homepage layout <code>headingLevel</code> is set to <code>h3</code>…</p>
<pre class="language-html"><code class="language-html"><span class="token comment">&lt;!-- home.html --></span><br />{% extends "layouts/base.html" %}<br /><br />{% set headingLevel = 'h3' %}<br /><br />{% block content %}{% endblock%}</code></pre>
<p>Which turns the conditional heading code in the partial to this…</p>
<pre class="language-html"><code class="language-html"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>h3</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>promo-article-title<span class="token punctuation">"</span></span><span class="token punctuation">></span></span><br /> <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>a</span> <span class="token attr-name">href</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>{{ item.url }}<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>{{ item.data.title }}<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>a</span><span class="token punctuation">></span></span><br /><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>h3</span><span class="token punctuation">></span></span></code></pre>
<p>That’s it! A straightforward way to efficiently use partials and ensure you’re creating proper document outlines.</p>

      <div class="heading-wrapper">
        <h2 id="useful-resources">Useful resources
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/articles/dynamic-heading-levels-in-eleventy/#useful-resources">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><ul>
<li><a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Heading_Elements">MDN</a></li>
<li><a href="https://webaim.org/techniques/semanticstructure/#headings">WebAIM</a></li>
<li><a href="https://www.w3.org/WAI/tutorials/page-structure/headings/">W3C Accessibility Initiative</a></li>
<li><a href="https://usability.yale.edu/web-accessibility/articles/headings">Yale’s Usability and Accessibility Section</a></li>
</ul>

      ]]></content>
    </entry>
	
    
    <entry>
      <title>Using Airtable with Eleventy</title>
      <link href="https://danabyerly.com/articles/using-airtable-with-eleventy/"/>
      <updated>2020-12-11T00:00:00Z</updated>
      <id>https://danabyerly.com/articles/using-airtable-with-eleventy/</id>
      <content type="html"><![CDATA[
        <p class="caption">
<strong>Update April 2, 2021</strong>: Since writing this article I figured out how to filter on a single API call and have updated the <a href="https://danabyerly.com/articles/using-airtable-with-eleventy/#isting-by-tag">Listing by tag or category</a> and <a href="https://danabyerly.com/articles/using-airtable-with-eleventy/#recently-added">Listing by recently added</a> sections to reflect those approaches. The project has since been completed and I've written a <a href="https://danabyerly.com/notes/horse-racing-datasets-redesigned/">wrap up with more detail</a>.
</p>
<p>While planning out an update to an existing project I figured out how to use <a href="https://airtable.com/">Airtable</a> with <a href="https://www.11ty.dev/">Eleventy</a>. Naturally this was after <a href="https://danabyerly.com/notes/end-of-the-year-to-do-list/">a couple of weeks of working on a proof concept</a> to migrate from Airtable to markdown.</p>
<p>On the bright side this gives me an apples to apples comparison of using remote data via JavaScript data files and markdown, and I’ll outline those differences as I go. But before we started…</p>

      <div class="heading-wrapper">
        <h2 id="a-caveat-about-my-dev-skills">A caveat about my dev skills
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/articles/using-airtable-with-eleventy/#a-caveat-about-my-dev-skills">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>I’m not very good at JavaScript. There will no doubt be some choices I made that someone with more JavaScript skills would’ve done differently. And in some cases I gave it a try using articles and examples, I’ll be sure to point those out along the way.</p>
<p>But for now, this represents a vast improvement on the current implementation of the project I’m updating. And I’m actually a bit proud of myself for getting this far! Hopefully in the near future I’ll be able to make further improvements.</p>
<p>This article assumes some familiarity with Airtable. Zapier has a <a href="https://zapier.com/blog/what-is-airtable/">good overview of Airtable</a> if you’re not familiar.</p>
<p>You can jump right to any of the sections below if you’re not interested in context of the project.</p>
<ul>
<li><a href="https://danabyerly.com/articles/using-airtable-with-eleventy/#api-call-and-listing-records">API call and listing records</a></li>
<li><a href="https://danabyerly.com/articles/using-airtable-with-eleventy/#pagination">Pagination</a></li>
<li><a href="https://danabyerly.com/articles/using-airtable-with-eleventy/#listing-by-tag">Listing by tag or category</a></li>
<li><a href="https://danabyerly.com/articles/using-airtable-with-eleventy/#recently-added">Listing by recently added</a></li>
<li><a href="https://danabyerly.com/articles/using-airtable-with-eleventy/#displaying-a-random-dataset">Displaying a random record</a></li>
<li><a href="https://danabyerly.com/articles/using-airtable-with-eleventy/#maintenance">Maintenance</a></li>
<li><a href="https://danabyerly.com/articles/using-airtable-with-eleventy/#collections-versus-remote-data-comparison">Comparison between collections versus remote data</a></li>
<li><a href="https://danabyerly.com/articles/using-airtable-with-eleventy/#useful-resources">Useful resources</a></li>
</ul>

      <div class="heading-wrapper">
        <h2 id="the-project">The project
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/articles/using-airtable-with-eleventy/#the-project">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>The current project, <a href="http://horseracingdatasets.com/">Horse Racing Datasets</a> (<a href="https://danabyerly.com/projects/horse-racing-datasets/">project page</a>), is backed by Airtable with a monstrous implementation of too many API calls, and un-purged Tailwind CSS. It’s one of those “hey, at least it works!” situations, but at the time it was quite an accomplishment. Now that I know my way around Eleventy, the goal is improve the data handling and performance (and rewrite that CSS).</p>
<p>There are currently 64 datasets listed in Airtable. In the last year I added seven datasets and don’t anticipate that pace picking up too much.</p>

      <div class="heading-wrapper">
        <h2 id="the-requirements">The requirements
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/articles/using-airtable-with-eleventy/#the-requirements">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><ul>
<li>List all datasets with pagination</li>
<li>List by tag or category</li>
<li>List by recently added with a limit on number displayed (e.g., list the four most recently added datasets)</li>
<li>Display a single random dataset</li>
<li>Datasets do NOT need individual pages</li>
</ul>

      <div class="heading-wrapper">
        <h2 id="api-call-and-listing-records">API call and listing records
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/articles/using-airtable-with-eleventy/#api-call-and-listing-records">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>In the current version of the project, as well as other projects, I’ve used Axios to access to Airtable. Those projects used Vue and the call is within the Vue app. Previously I had tried to get a version of that call to work with Eleventy, but couldn’t figure out to make it work on its own outside of the structure of the Vue app.</p>
<p>I decided to take a look around GitHub to see if I could find any examples, and as I <a href="https://danabyerly.com/notes/update-on-the-end-of-the-year-to-do-list/">mentioned here</a> I found and forked <a href="https://github.com/plloyd11/eat">this repository</a>, which uses <a href="https://github.com/airtable/airtable.js/">Airtable.js</a>, as a test.</p>
<p>I was quickly was able to get it to work with my data and thanks to <a href="https://github.com/11ty/eleventy/issues/1122#issuecomment-622437989">this comment</a> in <a href="https://github.com/11ty/eleventy/issues/1122">this Github issue</a> I was able to refine it a bit more. I wish I could explain everything that’s going on in there, but I can’t. At least not yet!</p>
<p>First you’ll need to install <a href="https://github.com/airtable/airtable.js/">Airtable.js</a>.</p>
<pre class="language-html"><code class="language-html">npm install airtable</code></pre>
<p>And I’m using <a href="https://github.com/motdotla/dotenv">dotenv</a> here to hide my key. If you’re not familiar with how to use it the first two minutes <a href="https://www.youtube.com/watch?v=zwcvXd3kGbw">of this video</a> gave me all the information I needed to install, create the .env file and call it in the script.</p>
<pre class="language-html"><code class="language-html">npm install dotenv</code></pre>
<pre class="language-html"><code class="language-html"><span class="token comment">&lt;!-- .env file --></span><br />KEY='your key here'</code></pre>
<pre class="language-js"><code class="language-js"><span class="token comment">// src/_data/all.js</span><br /><span class="token function">require</span><span class="token punctuation">(</span><span class="token string">'dotenv'</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">config</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span><br /><span class="token keyword">const</span> Airtable <span class="token operator">=</span> <span class="token function">require</span><span class="token punctuation">(</span><span class="token string">'airtable'</span><span class="token punctuation">)</span><span class="token punctuation">;</span><br /><span class="token keyword">let</span> base <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">Airtable</span><span class="token punctuation">(</span><span class="token punctuation">{</span> <span class="token literal-property property">apiKey</span><span class="token operator">:</span> process<span class="token punctuation">.</span>env<span class="token punctuation">.</span><span class="token constant">KEY</span> <span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">base</span><span class="token punctuation">(</span><span class="token string">'appMh38AX1IpV3vIR'</span><span class="token punctuation">)</span><span class="token punctuation">;</span><br /><br />module<span class="token punctuation">.</span><span class="token function-variable function">exports</span> <span class="token operator">=</span> <span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">=></span> <span class="token punctuation">{</span><br />  <span class="token keyword">return</span> <span class="token keyword">new</span> <span class="token class-name">Promise</span><span class="token punctuation">(</span><span class="token punctuation">(</span><span class="token parameter">resolve<span class="token punctuation">,</span> reject</span><span class="token punctuation">)</span> <span class="token operator">=></span> <span class="token punctuation">{</span><br />    <span class="token keyword">let</span> allDatasets <span class="token operator">=</span> <span class="token punctuation">[</span><span class="token punctuation">]</span><span class="token punctuation">;</span> <span class="token comment">// change 'allDatasets' to something more relevant to your project</span><br />      <span class="token function">base</span><span class="token punctuation">(</span><span class="token string">'New'</span><span class="token punctuation">)</span> <span class="token comment">// change 'New' to your base name</span><br />        <span class="token punctuation">.</span><span class="token function">select</span><span class="token punctuation">(</span><span class="token punctuation">{</span> <span class="token literal-property property">view</span><span class="token operator">:</span> <span class="token string">'All'</span> <span class="token punctuation">}</span><span class="token punctuation">)</span> <span class="token comment">// change 'All' to your view name</span><br />        <span class="token punctuation">.</span><span class="token function">eachPage</span><span class="token punctuation">(</span><br />          <span class="token keyword">function</span> <span class="token function">page</span><span class="token punctuation">(</span><span class="token parameter">records<span class="token punctuation">,</span> fetchNextPage</span><span class="token punctuation">)</span> <span class="token punctuation">{</span><br />            records<span class="token punctuation">.</span><span class="token function">forEach</span><span class="token punctuation">(</span><span class="token punctuation">(</span><span class="token parameter">record</span><span class="token punctuation">)</span> <span class="token operator">=></span> <span class="token punctuation">{</span><br />              allDatasets<span class="token punctuation">.</span><span class="token function">push</span><span class="token punctuation">(</span><span class="token punctuation">{</span><br />                <span class="token string-property property">"id"</span> <span class="token operator">:</span> record<span class="token punctuation">.</span>_rawJson<span class="token punctuation">.</span>id<span class="token punctuation">,</span><br />                <span class="token operator">...</span>record<span class="token punctuation">.</span>_rawJson<span class="token punctuation">.</span>fields<br />              <span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span><br />            <span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span><br />            <span class="token function">fetchNextPage</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span><br />          <span class="token punctuation">}</span><span class="token punctuation">,</span><br />          <span class="token keyword">function</span> <span class="token function">done</span><span class="token punctuation">(</span><span class="token parameter">err</span><span class="token punctuation">)</span> <span class="token punctuation">{</span><br />            <span class="token keyword">if</span> <span class="token punctuation">(</span>err<span class="token punctuation">)</span> <span class="token punctuation">{</span><br />              <span class="token function">reject</span><span class="token punctuation">(</span>err<span class="token punctuation">)</span><br />            <span class="token punctuation">}</span> <span class="token keyword">else</span> <span class="token punctuation">{</span><br />              <span class="token function">resolve</span><span class="token punctuation">(</span>allDatasets<span class="token punctuation">)</span><span class="token punctuation">;</span><br />            <span class="token punctuation">}</span><br />          <span class="token punctuation">}</span><br />        <span class="token punctuation">)</span><span class="token punctuation">;</span><br />      <span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span><br />    <span class="token punctuation">}</span><span class="token punctuation">;</span></code></pre>
<p>If you’re not using an .env file to hide your key you could use a second Airtable account to share a read-only version of your base. Then you can use the key from the base in the read-only account. You’ll want to do one or the other to keep your key private.</p>
<p>To modify this for your project, add your base and key information in the second line. I’ve commented the two other places where your Airtable information will need to be swapped in. You’ll probably also want to change the variable name to something more relevant to your project (e.g., I’m using allDatasets). The variable is used in three places.</p>
<p>This code lives in a file named <code>all.js</code> in the _data directory and is a <a href="https://www.11ty.dev/docs/data-js/">JavaScript data file</a>. The data is fetched at build time and available to templates in the same way that data in <a href="https://www.11ty.dev/docs/data-global/">global data files</a> is available.</p>
<pre class="language-html"><code class="language-html">{% for item in all %}<br /><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>article</span><span class="token punctuation">></span></span><br />  <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>h2</span><span class="token punctuation">></span></span>{{ item.title }}<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>h2</span><span class="token punctuation">></span></span><br />  <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>p</span><span class="token punctuation">></span></span>{{ item.description }}<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>p</span><span class="token punctuation">></span></span><br /><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>article</span><span class="token punctuation">></span></span><br />{% endfor %}</code></pre>
<p>This example creates a listing of all the records retrieved in the API call and displays the title and description for each.</p>

      <div class="heading-wrapper">
        <h2 id="pagination">Pagination
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/articles/using-airtable-with-eleventy/#pagination">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Fortunately handling <a href="https://www.11ty.dev/docs/pagination/#paginate-a-global-or-local-data-file">pagination for data files</a> is similar to collections. In my project I’ve created a markdown page to list all the datasets. The pagination is set in front matter…</p>
<pre class="language-html"><code class="language-html"><span class="token comment">&lt;!-- all.md --></span><br />---<br />title: 'All Datasets'<br />layout: 'layouts/feed.html'<br />pagination:<br />  data: all<br />  size: 10<br />---</code></pre>
<p>In the data field is the name of the data file, in this case <code>all.js</code>, Size specifies how many items to list per page. If you were using collections you’d specify your collection in the data field, for example <code>collections.posts</code>.</p>
<p>In the template there’s a <a href="https://mozilla.github.io/nunjucks/templating.html#set">Nunjucks variable using set</a> that picks up the pagination data from the markdown file using <code>pagination.items</code>.</p>
<pre class="language-html"><code class="language-html"><span class="token comment">&lt;!-- feed.html --></span><br />{% extends "layouts/base.html" %}<br /><br />{% set datasetList = pagination.items %}<br /><br />      {% block content %}<br />        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>h1</span><span class="token punctuation">></span></span>{{ title }}<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>h1</span><span class="token punctuation">></span></span><br />        {{ content | safe }}<br /><br />        {%- for datakey in datasetList -%}<br />        {% include "partials/listing-items.html" %}<br />        {%- endfor -%}<br /><br />        {% include "partials/pagination.html" %}<br />      {% endblock %}</code></pre>
<p>This grabs the paginated data and creates pages based on how many items are specified to be listed on each page. There’s a handy section that explains how this works in detail in the <a href="https://piccalil.li/course/learn-eleventy-from-scratch/">Learn Eleventy from Scratch</a> course. The include for <code>pagination.html</code> includes the ‘Next’ and ‘Previous’ links.</p>

      <div class="heading-wrapper">
        <h2 id="listing-by-tag">Listing by Tag
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/articles/using-airtable-with-eleventy/#listing-by-tag">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Tag is a bit misleading here, because it’s not in reference to tags in collections, but it’s what I’ve called the data element in my Airtable base. The requirement is to be able to view a listing of datasets by tag, for example <a href="http://horseracingdatasets.com/kentucky-derby/">all datasets for the Kentucky Derby</a>.</p>
<p>This is one area where being more skilled in JavaScript is probably an advantage. When the data is available from collections it’s simple to create a single page to <a href="https://www.11ty.dev/docs/quicktips/tag-pages/">handle tag listing pages for individual tags</a> that doesn’t require any maintenance when adding or removing tags. Without collections I created individual tag pages and passed the tag name into the template in order to render only items with the tag on the page.</p>
<p>The tags for this project are fairly fixed, so the maintenance part of needing to manually add, edit or delete a page isn’t a big drawback, but it would be if tags needed to be created more frequently.</p>
<p>In the individual tag pages there’s a variable called “filter” that has the name of tag as it’s referenced in Airtable.</p>
<pre class="language-html"><code class="language-html"><span class="token comment">&lt;!-- kentucky-derby.md --></span><br />---<br />title: 'Kentucky Derby Datasets'<br />layout: 'layouts/feed-tags.html'<br />filter: 'Kentucky Derby'<br />permalink: '/kentucky-derby/index.html'<br />---</code></pre>
<p>Here’s an example of some of the tags I have my in my Airtable base. Each row contains tags for a single record.</p>
<figure class="fig-container">
  <picture>
    <source srcset="https://danabyerly.com/img/hrds-airtable-tags.avif" type="image/avif" />
    <source srcset="https://danabyerly.com/img/hrds-airtable-tags.webp" type="image/webp" />
    <img src="https://danabyerly.com/img/hrds-airtable-tags.png" class="img-center" alt="Some of the tags in my Airtable base" loading="lazy" />
  </picture>
  <figcaption>
    In my Airtable base I have a multi-select field named "tags", I use these values in the "filter" field in front matter in the individual tag page to pass the tag name into the template.
  </figcaption>
</figure>
<p>Then in the layout for tags, there’s a <a href="https://mozilla.github.io/nunjucks/templating.html#set">Nunjucks variable using set</a> to pick up the value in “filter”.</p>
<pre class="language-html"><code class="language-html"><span class="token comment">&lt;!-- tags.html --></span><br />{% extends "layouts/base.html" %}<br /><br />{% set datasetCategory = filter %}<br /><br />  {% block content %}<br />    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>h1</span><span class="token punctuation">></span></span>{{ title }}<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>h1</span><span class="token punctuation">></span></span><br />    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>p</span><span class="token punctuation">></span></span>{{ content | safe }}<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>p</span><span class="token punctuation">></span></span><br /><br />    {% for datakey in all | sortByTitle %}<br />    {% if datasetCategory in datakey.tags %}<br />      {% include "partials/listing-items.html" %}<br />    {% endif %}<br />    {% endfor %}<br />  {% endblock %}</code></pre>
<p>Within the for loop that calls records from <code>all.js</code> I’m using an if statement to pass the tag name that the Nunjucks variable is picking up from the individual tag page front matter. Continuing the example of the Kentucky Derby tag page, the if statement is saying “if the value of ‘Kentucky Derby’ is found in the ‘tags’ field, then display the record”. This creates a listing of items tagged with ‘Kentucky Derby’. I’ll explain the “sortByTitle” filter in a bit.</p>
<p>Here’s an illustration of the data flow, starting at Airtable and ending in a tag page. I’ve only included some of the fields to illustrate the records.</p>
<figure class="fig-container">
  <picture>
    <source srcset="https://danabyerly.com/img/airtable-to-eleventy-tag-pages.avif" type="image/avif" />
    <source srcset="https://danabyerly.com/img/airtable-to-eleventy-tag-pages.webp" type="image/webp" />
    <img src="https://danabyerly.com/img/airtable-to-eleventy-tag-pages.png" class="img-center" alt="The data flow from Eleventy to individual tag pages" loading="lazy" />
  </picture>
  <figcaption>
     Data at Airtable is called via a JavaScript data file from Eleventy. Each tag has a corresponding markdown file, for example kentucky-derby.md. The name of tag that's used in Airtable is set in the 'filter' key in front matter and passed into the template. In the template the 'filter' value is used in the for loop to display only those records that include the tag. Created using <a href="https://excalidraw.com/">Excalidraw</a>.
  </figcaption>
</figure>
<p>I tried a few other things before I got this to work. One of the best things was <a href="https://bryanlrobinson.com/blog/using-eleventys-javascript-data-files/">this article by Bryan Robinson</a> on using JavaScript data files in Eleventy. He uses the Meetup API as an example and provides a helpful video and repository of the code.</p>
<p>Back to the “sortByTitle” filter. The <a href="https://horseracingdatasets.com/all/">All Datasets</a> page displays alphabetically and the sort order is set at Airtable. But on the tag pages the default listing is to display by most recently added. With some search engine luck <a href="https://stackoverflow.com/questions/65471629/dot-notation-in-nunjucks-sorting-isnt-working/65481434#65481434">I found this approach</a> and was able to create a filter to sort by title to keep the same approach used on the All Datasets listing.</p>
<p>The filter gets added in <code>eleventy.js</code>…</p>
<pre class="language-js"><code class="language-js">config<span class="token punctuation">.</span><span class="token function">addFilter</span><span class="token punctuation">(</span><span class="token string">"sortByTitle"</span><span class="token punctuation">,</span> <span class="token parameter">arr</span> <span class="token operator">=></span> <span class="token punctuation">{</span><br />  arr<span class="token punctuation">.</span><span class="token function">sort</span><span class="token punctuation">(</span><span class="token punctuation">(</span><span class="token parameter">a<span class="token punctuation">,</span> b</span><span class="token punctuation">)</span> <span class="token operator">=></span> <span class="token punctuation">(</span>a<span class="token punctuation">.</span>title<span class="token punctuation">)</span> <span class="token operator">></span> <span class="token punctuation">(</span>b<span class="token punctuation">.</span>title<span class="token punctuation">)</span> <span class="token operator">?</span> <span class="token number">1</span> <span class="token operator">:</span> <span class="token operator">-</span><span class="token number">1</span><span class="token punctuation">)</span><span class="token punctuation">;</span><br />  <span class="token keyword">return</span> arr<span class="token punctuation">;</span><br /> <span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span></code></pre>
<p>And then used in the for loop in the template…</p>
<pre class="language-js"><code class="language-js"><span class="token punctuation">{</span><span class="token operator">%</span> <span class="token keyword">for</span> datakey <span class="token keyword">in</span> all <span class="token operator">|</span> sortByTitle <span class="token operator">%</span><span class="token punctuation">}</span><br />  <span class="token operator">...</span><br /><span class="token punctuation">{</span><span class="token operator">%</span> endfor <span class="token operator">%</span><span class="token punctuation">}</span></code></pre>

      <div class="heading-wrapper">
        <h2 id="recently-added">Recently added
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/articles/using-airtable-with-eleventy/#recently-added">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>In the current site there’s a <a href="http://horseracingdatasets.com/new/">page that lists new datasets</a>, and this is something I’ll keeping in the revamped version. The</p>
<p>The markdown page is simple as I’m not using pagination.</p>
<pre class="language-html"><code class="language-html"><span class="token comment">&lt;!-- new.md --></span><br />---<br />title: 'Recently Added Datasets'<br />layout: 'layouts/feed.html'<br />---</code></pre>
<p>I’m using the same template that’s being used for the “All Datasets” page but I’ve added two if statements. The first is to change what’s passed in to the for loop and the second is to display some text if there are no recently added datasets.</p>
<pre class="language-html"><code class="language-html"><span class="token comment">&lt;!-- feed.html --></span><br />{% extends "layouts/base.html" %}<br /><br />{% set datasetList = pagination.items %}<br /><br />{% if '/recently-added/' in page.url %}<br />{% set datasetList = all | sortByNewest | limit(5) %}<br />{% endif %}<br /><br />      {% block content %}<br />        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>h1</span><span class="token punctuation">></span></span>{{ title }}<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>h1</span><span class="token punctuation">></span></span><br />        {{ content | safe }}<br /><br />        {% for datakey in datasetList %}<br />        {% include "partials/listing-items.html" %}<br />        {% endfor %}<br /><br />        {% if datasetList | isEmpty %}<br />        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>p</span><span class="token punctuation">></span></span>We haven't added any datasets recently, sorry!<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>p</span><span class="token punctuation">></span></span><br />        {% endif %}<br /><br />        {% include "partials/pagination.html" %}<br />      {% endblock %}</code></pre>
<p>Since pagination isn’t being used I had to create a way to pass in the name of the data source and limit the number of items displayed. I also needed to filter the results by date to get the most recently added items first. The first if statement looks at the url, if it’s the ‘Recently Added’ page  it sets the same variable of <code>datasetList</code> to pass in the file name that makes the API call (<code>all.js</code>), filters that data (sortByNewest) and limits the amount of items displayed to five.</p>
<p>Similar to the approach for filtering the tag display order, the filter gets added in <code>eleventy.js</code>…</p>
<pre class="language-js"><code class="language-js">config<span class="token punctuation">.</span><span class="token function">addFilter</span><span class="token punctuation">(</span><span class="token string">"sortByNewest"</span><span class="token punctuation">,</span> <span class="token parameter">arr</span> <span class="token operator">=></span> <span class="token punctuation">{</span><br />  arr<span class="token punctuation">.</span><span class="token function">sort</span><span class="token punctuation">(</span><span class="token punctuation">(</span><span class="token parameter">b<span class="token punctuation">,</span> a</span><span class="token punctuation">)</span> <span class="token operator">=></span> <span class="token punctuation">(</span>a<span class="token punctuation">.</span>date<span class="token punctuation">)</span> <span class="token operator">></span> <span class="token punctuation">(</span>b<span class="token punctuation">.</span>date<span class="token punctuation">)</span> <span class="token operator">?</span> <span class="token number">1</span> <span class="token operator">:</span> <span class="token operator">-</span><span class="token number">1</span><span class="token punctuation">)</span><span class="token punctuation">;</span><br />  <span class="token keyword">return</span> arr<span class="token punctuation">;</span><br /><span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span></code></pre>
<p>The <a href="https://11ty.rocks/eleventyjs/data-arrays/#limit-filter">handy limit filter is from 11ty Rocks</a>. I’m also using it here at this site on the homepage!</p>
<p>The second if statement checks to see if the data source, set in <code>datasetList</code>, is empty. If it is empty then it displays the conditional text. I’ll think more about that text when I start designing. It’s fine for the scenario where there are no recently added datasets, but since this template is used for both ‘All Datasets’ and ‘Recently Added’ there’s a chance the conditional text could display on the ‘All Datasets’ page if call fails. And if that were the case the text would be misleading.</p>
<p>That handy <code>isEmpty</code> filter is from <a href="https://github.com/jamshop/eleventy-plugin-array-filters">Mike Riethmuller’s Eleventy Plugin for Array Filters</a>. He’s creating a <a href="https://github.com/jamshop/">bunch of Eleventy plugins</a> this month as an <a href="https://twitter.com/MikeRiethmuller/status/1334014095486373891">Eleventy Advent thing</a>, so be sure to keep an eye on the <a href="https://github.com/jamshop/">Jamshop GitHub account</a>.</p>
<p>Admittedly I couldn’t get the array plugin to work, but I looked the code for the <code>isEmpty</code> filter and added it directly as a filter in the <code>eleventy.js</code> config file and it worked.</p>
<pre class="language-js"><code class="language-js"><span class="token comment">// eleventy.js</span><br />config<span class="token punctuation">.</span><span class="token function">addFilter</span><span class="token punctuation">(</span><span class="token string">'isEmpty'</span><span class="token punctuation">,</span> <span class="token punctuation">(</span><span class="token parameter">value</span><span class="token punctuation">)</span> <span class="token operator">=></span> <span class="token punctuation">{</span><br />  <span class="token keyword">return</span> Array<span class="token punctuation">.</span><span class="token function">isArray</span><span class="token punctuation">(</span>value<span class="token punctuation">)</span> <span class="token operator">&amp;&amp;</span> value<span class="token punctuation">.</span>length <span class="token operator">===</span> <span class="token number">0</span><span class="token punctuation">;</span><br /><span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span></code></pre>

      <div class="heading-wrapper">
        <h2 id="displaying-a-random-dataset">Displaying a random dataset
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/articles/using-airtable-with-eleventy/#displaying-a-random-dataset">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>This will be a new addition to the site. <a href="http://horseracingdatasets.com/">Currently on the homepage</a> I have some featured datasets listed. What’s nice about that is that I can swap out datasets relevant to the racing calendar, but it’s also a bit of work for such a low traffic site. For the new site I’m going to replace the featured datasets with a ‘Random Dataset of the Day’.</p>
<p>I was able to use the data from the initial API call in <code>all.js</code> and another <a href="https://11ty.rocks/eleventyjs/data-arrays/#randomitem-filter">handy filter from 11ty Rocks</a> that grabs a random item out the array at build time.</p>
<pre class="language-html"><code class="language-html">{% for dataset in all | randomItem  %}<br />  {% include "partials/listing-items.html" %}<br />{% endfor %}</code></pre>
<p>I’ll create a partial and include it on the homepage for the “Random Dataset of the Day”. I’ll be using <a href="https://netlify.com/">Netlify</a> for hosting and plan on setting up a daily build. In addition to picking up any additions to Airtable it will display a new random dataset.</p>

      <div class="heading-wrapper">
        <h2 id="maintenance">Maintenance
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/articles/using-airtable-with-eleventy/#maintenance">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Ease of maintenance tips the scales in favor of Airtable over individual markdown files, and especially for this project since it already exists in Airtable. I have an Airtable form to add new datasets, and as I mentioned above I’ll set up a daily build at Netlify using either <a href="https://www.11ty.dev/docs/quicktips/netlify-ifttt/">IFTTT</a> or <a href="https://zapier.com/apps/netlify/integrations/schedule/29330/start-deploys-of-netlify-sites-on-a-daily-schedule">Zapier</a> to pick up any added datasets.</p>
<p>Prior to figuring out how to do this with Airtable I had converted all the records to markdown files and had figured out a fairly easy to way to still keep the workflow starting at Airtable by using Zapier to email me the record formatted for markdown. Given that datasets don’t get added very often this was an OK solution. I would’ve also had to manually deploy it (or figure out how to automate that too!), but still workable and I’d get all the benefits and ease of use of collections.</p>

      <div class="heading-wrapper">
        <h2 id="wrapping-up">Wrapping up
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/articles/using-airtable-with-eleventy/#wrapping-up">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>When determining the approach for your own projects, the “best” approach will come down to the specifics of the project. How often will things be added? Do you need individual pages for each item or is it only listings? How much would you benefit from the power of collections? Are you decent at JavaScript? The list probably goes on.</p>
<p>I will be converting <a href="http://pile-of-hrefs.com/">Pile of hrefs</a>(<a href="https://danabyerly.com/projects/pile-of-hrefs/">project page</a>) to this set-up once I have the Horse Racing Datasets redesign complete since the specifics and project needs are very similar. And <a href="https://twitter.com/superterrific/status/1303316906460540929">The Pile</a> could definitely use some pagination!</p>
<p>Below is some additional information for quick comparison or reference. Happy remote data-ing, or collection-ing!</p>

      <div class="heading-wrapper">
        <h2 id="collections-versus-remote-data-comparison">Collections versus remote data comparison
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/articles/using-airtable-with-eleventy/#collections-versus-remote-data-comparison">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Here’s a quick comparison between the two approaches.</p>
<table>
<thead>
<tr>
<th>Feature</th>
<th>Collection</th>
<th>Remote Data</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>Tags</strong></td>
<td>Native part of Eleventy collections, easy to set-up a <a href="https://www.11ty.dev/docs/quicktips/tag-pages/">zero maintenance tag page</a> to handle individual tag pages.</td>
<td>Have to create a markdown file for each individual tag page and filter for each tag in the template. Unless you’re good at JavaScript and can figure out a better approach!</td>
</tr>
<tr>
<td><strong>Pagination</strong></td>
<td>Create a pagination object for your collection and use it in a template.</td>
<td>Create a pagination object for your data and use it in a template. The only difference in the code is the source of data in the pagination keys.</td>
</tr>
<tr>
<td><strong>Creating filters</strong></td>
<td>Plenty of easy to follow examples between the documentation, starter projects and in articles.</td>
<td>Helpful to have some solid JavaScript skills to transfer collection examples to arrays and data.</td>
</tr>
<tr>
<td><strong>Maintenance</strong></td>
<td>File based - create new file or edit existing file and then deploy. Can probably automate deploys with webhooks or do it manually depending how frequently you add or update entries.</td>
<td>Enter data in Airtable (or your remote data source) and set up a daily deploy at Netlify or your host.</td>
</tr>
<tr>
<td><strong>Creating individual pages</strong></td>
<td>Individual pages are automatically created when you create a markdown file and you can use the power of collections.</td>
<td>You can <a href="https://www.11ty.dev/docs/pages-from-data/">create individual pages from data files</a> but it doesn’t use collections.</td>
</tr>
</tbody>
</table>

      <div class="heading-wrapper">
        <h2 id="useful-resources">Useful resources
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/articles/using-airtable-with-eleventy/#useful-resources">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Here are some resources I found helpful. I’m currently not caching the data requests but have that bookmarked for future reference. Also, Airtable has a 100 record per call limit, I currently have less than 100 records but have also bookmarked the Stack Overflow link for future reference.</p>
<ul>
<li><a href="https://bryanlrobinson.com/blog/using-eleventys-javascript-data-files/">Bryan Robinson - Using Eleventy Javascript Data Files</a></li>
<li><a href="https://11ty.rocks/eleventyjs/data-arrays/">11ty Rocks - Collection of Data Array Filters</a></li>
<li><a href="https://www.11ty.dev/docs/pages-from-data/">Eleventy Docs - Creating pages from data</a></li>
<li><a href="https://www.11ty.dev/docs/quicktips/cache-api-requests/">Eleventy Docs - Cache data requests</a></li>
<li><a href="https://github.com/jamshop/eleventy-plugin-array-filters">Jamshop - Eleventy Plugin - Array Filters</a></li>
<li><a href="https://stackoverflow.com/questions/55094884/how-to-fetch-all-records-more-than-100-from-the-airtable-using-axios">Stack Overflow - How to fetch more than 100 Airtable records</a></li>
</ul>
<p class="caption">
<strong>Update April 2, 2021</strong>: This project is complete, you can view  <a href="https://github.com/superterrific/horse-racing-datasets">source code at GitHub</a> to see how the implementation turned out! There's also a <a href="https://danabyerly.com/notes/horse-racing-datasets-redesigned/">wrap up post</a> and the <a href="https://danabyerly.com/projects/horse-racing-datasets/">project page</a>.
</p>

      ]]></content>
    </entry>
	
    
    <entry>
      <title>Update on the end of the year to-do list</title>
      <link href="https://danabyerly.com/notes/update-on-the-end-of-the-year-to-do-list/"/>
      <updated>2020-11-23T00:00:00Z</updated>
      <id>https://danabyerly.com/notes/update-on-the-end-of-the-year-to-do-list/</id>
      <content type="html"><![CDATA[
        <p>Not long after <a href="https://danabyerly.com/notes/end-of-the-year-to-do-list/">writing about the status of Horse Racing Datasets</a> and how, after a couple of weeks of fiddling with a proof of concept, I had decided to transition it to use markdown files instead of <a href="https://airtable.com/">Airtable</a>, I decided to give Airtable a proper shot. And in a surprising turn of events <a href="https://twitter.com/superterrific/status/1329799958560649223">figured out how to get it to work</a>.</p>
<p>Surprising because I’m not very good at Javascript, and there aren’t any articles that I could find on using Airtable with Eleventy. I did <a href="https://github.com/plloyd11/eat">find a single repository</a> which was the breakthrough moment I needed. I cloned it, played around with it and got my Airtable base to work with it. And thanks to <a href="https://github.com/11ty/eleventy/issues/1122">this Github issue</a> and specifically <a href="https://github.com/11ty/eleventy/issues/1122#issuecomment-622437989">this comment</a> I was able to make some improvements. This was all very exciting!</p>
<p>I learned quite a bit too, and now I have an apples to apples comparison between using markdown and remote data. If I were starting <a href="https://danabyerly.com/projects/horse-racing-datasets/">Horse Racing Datasets</a> from scratch I would probably go with markdown to take full advantage of <a href="https://www.11ty.dev/docs/collections/">collections in Eleventy</a>, especially considering that Airtable is <a href="https://danabyerly.com/notes/end-of-the-year-to-do-list/">functioning more like a spreadsheet than a database</a> for this project (and you can always <a href="https://piccalil.li/quick-tip/create-a-json-feed-with-11ty/">turn a collection into a JSON feed</a> to easily share or back-up the data). Admittedly having beginner level Javascript skills certainly tips it towards markdown, but being able to natively use tags and easily control display order is a huge bonus using markdown.</p>
<p>Since I spent last week working on Airtable instead of design I’m pushing back my self-imposed soft deadline of the end of the year. I think mid-Feburary is more likely to have the site redesign fully implemented. But I’m going to add <a href="https://twitter.com/5t3ph/status/1329800237003796480">an article on using Airtable with Eleventy</a> to the end-of-the-year list to make up for it.</p>
<p><a href="https://twitter.com/superterrific/status/1329800837930119172">I did figure out how to filter on the data</a>, using a combination <a href="https://mozilla.github.io/nunjucks/templating.html">Nunjucks</a> and markdown files to create tag pages. I also figured how to do an API call to grab a single, random record (because I’m not yet good enough at Javascript to figure out how to grab a random record from the data in the initial API call 🤓). Displaying a random item is another thing that’s a little easier using collections, or at least <a href="https://www.raymondcamden.com/2020/10/26/selecting-random-posts-in-eleventy">easier to find</a> <a href="https://egghead.io/lessons/11ty-apply-a-filter-to-an-eleventy-11ty-collection">helpful resources</a>).</p>
<p>More to come on all this!</p>

      ]]></content>
    </entry>
	
    
    <entry>
      <title>End of the year to-do list</title>
      <link href="https://danabyerly.com/notes/end-of-the-year-to-do-list/"/>
      <updated>2020-11-16T00:00:00Z</updated>
      <id>https://danabyerly.com/notes/end-of-the-year-to-do-list/</id>
      <content type="html"><![CDATA[
        <p>A quick note to keep myself honest about some upcoming work…</p>

      <div class="heading-wrapper">
        <h2 id="horse-racing-datasets">Horse Racing Datasets
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/end-of-the-year-to-do-list/#horse-racing-datasets">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>For the past couple of weeks I’ve been working on a proof of concept for moving <a href="http://horseracingdatasets.com/">Horse Racing Datasets</a> to <a href="https://www.11ty.dev/">Eleventy</a>. The current version uses <a href="https://airtable.com/">Airtable</a>, <a href="https://vuejs.org/">Vue</a> and <a href="https://sergey.cool/">Sergey</a> as my own odd Jamstack concoction. It also uses <a href="http://tailwindcss.com/">Tailwind CSS</a>.</p>
<p>I’ve wanted to redo the CSS and improve accessibility on this site for awhile, but there’s also an opportunity to improve the performance using Eleventy. Airtable is pretty much functioning like a spreadsheet rather than a database for this site, so a large part of my proof of concept has been focused on turning those records into markdown files. So far so good!</p>
<p>Other items I’ve been working on…</p>
<ul>
<li>How to change the workflow of adding datasets</li>
<li>How to translate the data taxonomy</li>
<li>Changes to the site structure</li>
</ul>
<p>This is all going well and I’ve got almost all the questions answers. It’s tempting to blather on about it here but I’ll save it for a longer article once the redesign is done. I haven’t started working on the visual design, but I expect it to be more along the lines of a slight refresh than an overhaul.</p>
<p>I don’t know that I’ll have this done by the end of the year, but I’m going to try!</p>

      <div class="heading-wrapper">
        <h2 id="random-replay-generator">Random Replay Generator
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/end-of-the-year-to-do-list/#random-replay-generator">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Nothing drastic here, just going to give <a href="http://replaygenerator.com/">the Generator</a> a visual refresh. The initial launch was in <a href="https://twitter.com/superterrific/status/1075911544435810304">December 2018</a>, and and earlier this year I <a href="https://twitter.com/superterrific/status/1223416466965508098">gave it an update</a>. I still really like the font and I think the layout still works, so this year’s refresh will be strictly color palette. And maybe I’ll add a toggle between light and dark mode.</p>
<p>I did a little Eleventy proof for this site too, but unlike Horse Racing Datasets this Airtable instance does function as a database, so I’ll have to up my Javascript game and work a little harder to figure out how to make this one work. I have a lot of notes and pretty much know where I need to improve my skills. It’ll be a matter of making time for it and not get distracted by the siren song of a new project (feels like tempting fate even typing that lol).</p>

      <div class="heading-wrapper">
        <h2 id="around-these-parts">Around these parts
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/notes/end-of-the-year-to-do-list/#around-these-parts">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>My to-do list for this site has a few things that are just a matter of knocking them out. The one most likely to get done by the end of the year is an article on using dynamic header levels with Eleventy and Nunjucks. I’d also like to update the footer and add a dark mode, but don’t think I’ll get to those by the end of the year. We’ll see!</p>

      ]]></content>
    </entry>
	
    
    <entry>
      <title>Responsive and Accessible Data Tables</title>
      <link href="https://danabyerly.com/articles/responsive-and-accessible-data-tables/"/>
      <updated>2020-10-30T00:00:00Z</updated>
      <id>https://danabyerly.com/articles/responsive-and-accessible-data-tables/</id>
      <content type="html"><![CDATA[
        <p>Recently I converted an old project from WordPress to <a href="https://www.11ty.dev/">Eleventy</a>. It was a fun excuse to build something with Eleventy, and ultimately meant I could improve a few things while giving a labor of love project a sustainable home.</p>
<p>This post is about the process of turning Google Sheets into data tables. I wrote it primarily for myself as a record of my decisions, and to help absorb what I’d learned. The writing process also helped me make several improvements to the original code as well as <a href="https://danabyerly.com/changelog/2020-10-30">a few improvements to this site</a>. Documenting or explaining something you’ve made is a great way to tighten up loose ends as well as share what you’ve learned.</p>
<p>For context, the project (<a href="http://omnisurface-stars.com/">Omnisurface Stars</a>), was a blog active between 2009-2010 that tracked Thoroughbred racehorses who won on all three racing surfaces: dirt, synthetic and turf. The posts were no longer relevant, but the datasets (Google Sheets) were the things worth preserving. I wrote more about the history of the project <a href="https://danabyerly.com/projects/omnisurface-stars-archive/">in the Projects section</a> if you’re interested.</p>
<p>The site has three tables. I’m going to be using the <a href="https://omnisurface-stars.com/won-all-three">Won on all three</a> table as an example, the <a href="https://omnisurface-stars.com/won-two">Won on two</a> table is similar, and the <a href="https://omnisurface-stars.com/pedigree">Pedigree table</a> was more straightforward as there are only three columns.</p>

      <div class="heading-wrapper">
        <h2 id="converting-google-sheets-to-json">Converting Google Sheets to JSON
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/articles/responsive-and-accessible-data-tables/#converting-google-sheets-to-json">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>The first order of business was converting the Google Sheets to JSON to be able to use them as <a href="https://www.11ty.dev/docs/data-global/">global data files in Eleventy</a>. Someday I might be able to whip up a script for this sort of thing, but today is not that day. Fortunately it’s pretty easy to do it manually, especially if you only have a few to convert as I did. I found a <a href="https://gsuite.google.com/marketplace/app/export_sheet_data/903838927001?pann=cwsdp&amp;hl=en-US">Google Sheet Add-on</a> for exporting to JSON but didn’t want to grant it access to all my sheets.</p>
<p>The tricky part was the first column where the horse name is linked text. When downloaded as a CSV the link isn’t included, so I needed to extract the links and create a new column for them.</p>
<figure class="fig-container">
  <picture>
    <source srcset="https://danabyerly.com/img/oss-sheet.avif" type="image/avif" />
    <source srcset="https://danabyerly.com/img/oss-sheet.webp" type="image/webp" />
    <img src="https://danabyerly.com/img/oss-sheet.png" alt="Original Google Sheet with linked cell content" loading="lazy" />
  </picture>
  <figcaption>
    The trick of converting the Google Sheet from CSV to JSON was extracting the link from the first column.
  </figcaption>
</figure>
<p>Steps 1-3 are for extracting the links, if you don’t have links you only need steps 4-5.</p>
<p>The regex formula referenced in step 2 will only work on linked cells that use the hyperlink formula. For sheets that use the newer approach <a href="https://stackoverflow.com/questions/61787891/how-to-extract-the-link-from-a-cell-now-that-links-are-not-reflected-as-hyperlin">you’ll need to use a script</a>. If your  cells with linked text look like this when you click into them, you can use the regex approach:</p>
<pre class="language-md"><code class="language-md">=hyperlink("https://danabyerly.com", "My website")</code></pre>
<ol>
<li>
<p>Make a new column for the extracted link.</p>
</li>
<li>
<p>Paste the regex formula below in the first cell of new column and adjust the cell target to the cell with the linked text (e.g., change A1 to match the cell that has the link you want to extract).</p>
</li>
</ol>
<pre class="language-md"><code class="language-md">=REGEXEXTRACT(FORMULATEXT(A1),"""(.+)"",")</code></pre>
<p>Once you tab out, the cell with the formula should now display the link as linked text.</p>
<ol start="3">
<li>Now that first cell has been converted, you can paste the forumla in the remaining cells and the target cell will adjust to current row (e.g., if your original target is A1, the next row automatically becomes B1 and the following row becomes C1, etc.).</li>
</ol>
<p><strong>Motion warning</strong>:
The example below is animated but does not loop.</p>
<figure class="fig-container">
 <img src="https://danabyerly.com/img/oss-extract-links.gif" class="img-center" alt="Pasting the formula to extract links" loading="lazy" />
  <figcaption>
    Once you've pasted the formula into the first cell, you can paste it into all the subsequent cells and the formula will adjust.
  </figcaption>
</figure>
<ol start="4">
<li>
<p>Download as CSV.</p>
</li>
<li>
<p>Use a CSV to JSON converter (<a href="https://www.convertcsv.com/csv-to-json.htm">like this one</a> or <a href="https://csvjson.com/csv2json">this one</a>).</p>
</li>
</ol>

      <div class="heading-wrapper">
        <h2 id="making-the-data-tables">Making the data tables
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/articles/responsive-and-accessible-data-tables/#making-the-data-tables">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>With JSON in hand it was time to make some data tables. As mentioned before, the goal was to make the data display responsive and more accessible than an embedded Google Sheet. I’m confident that I achieved that goal, I’m also confident there’s room for improvement.</p>
<p>There are a few articles I found useful as I figured out which approaches to use, I’ll mention them as I go and provide a list at the end of this post. I should also note that I’m not an accessibility expert! Please feel free to <a href="http://twitter.com/superterrific">hit me up on Twitter</a> if you have any suggestions for improvement.</p>
<p>Let’s start with the table itself…</p>
<pre class="language-html"><code class="language-html"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>div</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>table-responsive<span class="token punctuation">"</span></span> <span class="token attr-name">role</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>region<span class="token punctuation">"</span></span> <span class="token attr-name">aria-labelledby</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>caption-lg<span class="token punctuation">"</span></span> <span class="token attr-name">tabindex</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>0<span class="token punctuation">"</span></span><span class="token punctuation">></span></span><br />  <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>table</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>table-lg<span class="token punctuation">"</span></span><span class="token punctuation">></span></span><br />    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>caption</span> <span class="token attr-name">id</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>caption-lg<span class="token punctuation">"</span></span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>visually-hidden<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>Horses who have won on dirt, synthetic and turf surfaces.<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>caption</span><span class="token punctuation">></span></span><br />    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>thead</span><span class="token punctuation">></span></span><br />      <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>tr</span><span class="token punctuation">></span></span><br />        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>th</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>hdr-horse<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>Horse<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>th</span><span class="token punctuation">></span></span><br />        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>th</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>hdr-dirt<span class="token punctuation">"</span></span><span class="token punctuation">></span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>span</span><span class="token punctuation">></span></span>Dirt<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>span</span><span class="token punctuation">></span></span> Type<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>th</span><span class="token punctuation">></span></span><br />        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>th</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>hdr-dirt<span class="token punctuation">"</span></span><span class="token punctuation">></span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>span</span><span class="token punctuation">></span></span>Dirt<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>span</span><span class="token punctuation">></span></span> Race<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>th</span><span class="token punctuation">></span></span><br />        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>th</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>hdr-dirt<span class="token punctuation">"</span></span><span class="token punctuation">></span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>span</span><span class="token punctuation">></span></span>Dirt<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>span</span><span class="token punctuation">></span></span> Track<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>th</span><span class="token punctuation">></span></span><br />        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>th</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>hdr-dirt<span class="token punctuation">"</span></span><span class="token punctuation">></span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>span</span><span class="token punctuation">></span></span>Dirt<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>span</span><span class="token punctuation">></span></span> Date<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>th</span><span class="token punctuation">></span></span><br />        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>th</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>hdr-synth<span class="token punctuation">"</span></span><span class="token punctuation">></span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>span</span><span class="token punctuation">></span></span>Synthetic<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>span</span><span class="token punctuation">></span></span> Type<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>th</span><span class="token punctuation">></span></span><br />        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>th</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>hdr-synth<span class="token punctuation">"</span></span><span class="token punctuation">></span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>span</span><span class="token punctuation">></span></span>Synthetic<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>span</span><span class="token punctuation">></span></span> Race<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>th</span><span class="token punctuation">></span></span><br />        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>th</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>hdr-synth<span class="token punctuation">"</span></span><span class="token punctuation">></span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>span</span><span class="token punctuation">></span></span>Synthetic<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>span</span><span class="token punctuation">></span></span> Track<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>th</span><span class="token punctuation">></span></span><br />        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>th</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>hdr-synth<span class="token punctuation">"</span></span><span class="token punctuation">></span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>span</span><span class="token punctuation">></span></span>Synthetic<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>span</span><span class="token punctuation">></span></span> Date<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>th</span><span class="token punctuation">></span></span><br />        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>th</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>hdr-turf<span class="token punctuation">"</span></span><span class="token punctuation">></span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>span</span><span class="token punctuation">></span></span>Turf<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>span</span><span class="token punctuation">></span></span> Type<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>th</span><span class="token punctuation">></span></span><br />        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>th</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>hdr-turf<span class="token punctuation">"</span></span><span class="token punctuation">></span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>span</span><span class="token punctuation">></span></span>Turf<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>span</span><span class="token punctuation">></span></span> Race<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>th</span><span class="token punctuation">></span></span><br />        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>th</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>hdr-turf<span class="token punctuation">"</span></span><span class="token punctuation">></span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>span</span><span class="token punctuation">></span></span>Turf<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>span</span><span class="token punctuation">></span></span> Track<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>th</span><span class="token punctuation">></span></span><br />        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>th</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>hdr-turf<span class="token punctuation">"</span></span><span class="token punctuation">></span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>span</span><span class="token punctuation">></span></span>Turf<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>span</span><span class="token punctuation">></span></span> Date<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>th</span><span class="token punctuation">></span></span><br />      <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>tr</span><span class="token punctuation">></span></span><br />    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>thead</span><span class="token punctuation">></span></span><br />    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>tbody</span><span class="token punctuation">></span></span><br />      {% for item in wonThree %}<br />      <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>tr</span><span class="token punctuation">></span></span><br />        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>td</span><span class="token punctuation">></span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>a</span> <span class="token attr-name">href</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>{{ item.pedigreeLink }}<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>{{ item.horse }}<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>a</span><span class="token punctuation">></span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>td</span><span class="token punctuation">></span></span><br />        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>td</span><span class="token punctuation">></span></span>{{ item.dirtType }}<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>td</span><span class="token punctuation">></span></span><br />        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>td</span><span class="token punctuation">></span></span>{{ item.dirtRace }}<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>td</span><span class="token punctuation">></span></span><br />        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>td</span><span class="token punctuation">></span></span>{{ item.dirtTrk }}<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>td</span><span class="token punctuation">></span></span><br />        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>td</span><span class="token punctuation">></span></span>{{ item.dirtDate }}<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>td</span><span class="token punctuation">></span></span><br />        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>td</span><span class="token punctuation">></span></span>{{ item.synthType }}<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>td</span><span class="token punctuation">></span></span><br />        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>td</span><span class="token punctuation">></span></span>{{ item.synthRace }}<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>td</span><span class="token punctuation">></span></span><br />        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>td</span><span class="token punctuation">></span></span>{{ item.synthTrk }}<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>td</span><span class="token punctuation">></span></span><br />        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>td</span><span class="token punctuation">></span></span>{{ item.synthDate }}<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>td</span><span class="token punctuation">></span></span><br />        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>td</span><span class="token punctuation">></span></span>{{ item.turfType }}<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>td</span><span class="token punctuation">></span></span><br />        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>td</span><span class="token punctuation">></span></span>{{ item.turfRace }}<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>td</span><span class="token punctuation">></span></span><br />        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>td</span><span class="token punctuation">></span></span>{{ item.turfTrk }}<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>td</span><span class="token punctuation">></span></span><br />        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>td</span><span class="token punctuation">></span></span>{{ item.turfDate }}<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>td</span><span class="token punctuation">></span></span><br />      <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>tr</span><span class="token punctuation">></span></span><br />      {% endfor %}<br />    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>tbody</span><span class="token punctuation">></span></span><br />  <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>table</span><span class="token punctuation">></span></span><br /><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>div</span><span class="token punctuation">></span></span></code></pre>
<p>Structurally this is a pretty straightforward table. The classes set the column header color and the <code>span</code> responsively sets line breaks <a href="https://twitter.com/a_sandrina_p/status/1318217958955601922">using this approach</a>. The <code>caption</code> provides extra context for screen readers. I’ve applied a <a href="https://piccalil.li/quick-tip/visually-hidden/">visually hidden class selector</a>, otherwise the caption text would display. In this case with the paragraph text above the table the caption felt unnecessary for sited visitors.</p>
<p>Adrian Roselli’s <a href="https://adrianroselli.com/2017/11/a-responsive-accessible-table.html">A Responsive Accessible Table</a> is full of useful information and examples, such as adding <code>role</code>, <code>aria-labelledby</code> and <code>tabindex</code> to the scrolling container to ensure that the table is navigable by keyboard. Check the <a href="https://adrianroselli.com/2017/11/a-responsive-accessible-table.html#ResponsiveScrollingKeyboard">Keyboard-Friendly Scroll</a> section for more details.</p>
<p>It’s also worth pointing out what’s not used. Another Roselli post on <a href="https://adrianroselli.com/2020/01/fixed-table-headers.html">Fixed Table Headers</a> notes that <code>scope</code> is not needed for column headers, and the example in Léonie Watson’s helpful <a href="https://tink.uk/how-screen-readers-navigate-data-tables/">How Screen Readers Navigate Data Tables</a> post there’s an example of NVDA reading a table does not include it.</p>

      <div class="heading-wrapper">
        <h3 id="decisions-decisions">Decisions, decisions
      </h3>
        <a class="anchor-link" href="https://danabyerly.com/articles/responsive-and-accessible-data-tables/#decisions-decisions">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>The first decision was to move the surface indication to each cell (e.g., Dirt Date, Synthetic Date, Turf Date). The original Google Sheet pictured above had a top row spanning the header row that labeled each group of columns by surface. This was useful for sighted viewers but not for visitors using screen readers. Now each cell has the context of the surface.</p>
<p>Another choice was to drop the WPS column for this table because it contains <a href="https://omnisurface-stars.com/won-all-three/">winners on all three surfaces</a>. WPS is a racing term that means “win, place, show”, or in layman’s terms first place, second place and third place. I left the column in the table for <a href="https://omnisurface-stars.com/won-two/">winners on two of three surfaces</a> as it was relevant there, but I changed the wording to “Finish Position” and used 1st, 2nd, 3rd to make it understandable beyond the core audience. If I really wanted to do it properly I’d create a glossary to explain some of the other terms, but I’m not expecting many visitors, core audience or otherwise.</p>
<p>Moving on to responsiveness, with so many columns figuring out the how to handle the layout options was tricky, especially considering that I also wanted to ensure the tables were accessible. Unfortunately there are <a href="https://speckyboy.com/responsive-html-table-techniques/">plenty of examples</a> out there that use all sorts of “cool” seeming tricks that work well for sighted viewers but don’t work with screen readers.</p>
<p>The options I came up with were:</p>
<ul>
<li>Put the entire table in a scrolling region (easy to implement, annoying to use on smaller screens)</li>
<li>Hide some columns at smaller sizes (tough to decide which columns were less meaningful)</li>
<li>Create a different layout for smaller sizes (best option, most work)</li>
</ul>
<p>I’ve used the approach of hiding columns at smaller sizes before, but that approach is best when there are clear choices for data that is less relevant. Even when that’s the case it’s best to mention that the full dataset is viewable on larger screens. With a core audience of racing nerds who want to know the details of each win, there weren’t any clear columns to hide, so that approach was out.</p>
<p>I decided to split the difference between the two other options and account for three viewing scenarios: Big maximized screens, medium screens or browsers sized down on big screens and small screens. I have a big screen and frequently have my browser sized down to be the equivalent of around 1300-1400 pixels. At those sizes the table was causing browser-level horizontal scrolling.</p>
<p>I created a container class that sets the width &amp; height and scrolls if necessary at 1300px and below. Setting the height to <code>height: 90vh;</code> ensures that the scrolling container takes up most of the viewable area once you scroll down to the table. This covered the medium screen scenario pretty well.</p>
<pre class="language-css"><code class="language-css"><span class="token atrule"><span class="token rule">@media</span> screen <span class="token keyword">and</span> <span class="token punctuation">(</span><span class="token property">max-width</span><span class="token punctuation">:</span> 1300px<span class="token punctuation">)</span></span> <span class="token punctuation">{</span><br />  <span class="token selector">.table-responsive</span> <span class="token punctuation">{</span><br />    <span class="token property">width</span><span class="token punctuation">:</span> 100%<span class="token punctuation">;</span><br />    <span class="token property">height</span><span class="token punctuation">:</span> 90vh<span class="token punctuation">;</span><br />    <span class="token property">overflow</span><span class="token punctuation">:</span> auto<span class="token punctuation">;</span><br />  <span class="token punctuation">}</span><br /><span class="token punctuation">}</span></code></pre>
<figure class="fig-container">
  <picture>
    <source srcset="https://danabyerly.com/img/oss-medium.avif" type="image/avif" />
    <source srcset="https://danabyerly.com/img/oss-medium.webp" type="image/webp" />
    <img src="https://danabyerly.com/img/oss-medium.png" alt="Responsive layout on medium sized screens" loading="lazy" />
  </picture>
  <figcaption>
    On medium screens the scrolling region takes up most of the screen. Screenshot of <a href="https://sizzy.app/">Sizzy App</a>.
  </figcaption>
</figure>
<p>For the smaller sizes I created a new layout that makes a table for each horse. The horse name is the header row that spans two columns for the data. Since the data is dynamic it’s not that much extra effort to create the second table, and the extra effort pays off in a nicer solution for everyone.</p>
<pre class="language-html"><code class="language-html">{% for item in wonThree %}<br /><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>table</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>table-sm<span class="token punctuation">"</span></span><span class="token punctuation">></span></span><br />  <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>thead</span><span class="token punctuation">></span></span><br />    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>tr</span><span class="token punctuation">></span></span><br />      <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>th</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>hdr-horse-sm<span class="token punctuation">"</span></span> <span class="token attr-name">colspan</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>2<span class="token punctuation">"</span></span><span class="token punctuation">></span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>a</span> <span class="token attr-name">href</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>{{ item.pedigreeLink }}<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>{{ item.horse }}<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>a</span><span class="token punctuation">></span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>th</span><span class="token punctuation">></span></span><br />    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>tr</span><span class="token punctuation">></span></span><br />    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>thead</span><span class="token punctuation">></span></span><br />    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>tbody</span><span class="token punctuation">></span></span><br />    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>tr</span><span class="token punctuation">></span></span><br />      <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>td</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>hdr-dirt<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>Dirt Type<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>td</span><span class="token punctuation">></span></span><br />      <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>td</span><span class="token punctuation">></span></span>{{ item.dirtType }}<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>td</span><span class="token punctuation">></span></span><br />    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>tr</span><span class="token punctuation">></span></span><br />    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>tr</span><span class="token punctuation">></span></span><br />      <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>td</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>hdr-dirt<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>Dirt Race<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>td</span><span class="token punctuation">></span></span><br />      <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>td</span><span class="token punctuation">></span></span>{{ item.dirtRace }}<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>td</span><span class="token punctuation">></span></span><br />    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>tr</span><span class="token punctuation">></span></span><br />    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>tr</span><span class="token punctuation">></span></span><br />      <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>td</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>hdr-dirt<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>Dirt Track<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>td</span><span class="token punctuation">></span></span><br />      <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>td</span><span class="token punctuation">></span></span>{{ item.dirtTrk }}<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>td</span><span class="token punctuation">></span></span><br />    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>tr</span><span class="token punctuation">></span></span><br />    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>tr</span><span class="token punctuation">></span></span><br />      <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>td</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>hdr-dirt<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>Dirt Date<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>td</span><span class="token punctuation">></span></span><br />      <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>td</span><span class="token punctuation">></span></span>{{ item.dirtDate }}<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>td</span><span class="token punctuation">></span></span><br />    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>tr</span><span class="token punctuation">></span></span><br />    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>tr</span><span class="token punctuation">></span></span><br />      <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>td</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>hdr-synth<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>Synthetic Type<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>td</span><span class="token punctuation">></span></span><br />      <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>td</span><span class="token punctuation">></span></span>{{ item.synthType }}<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>td</span><span class="token punctuation">></span></span><br />    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>tr</span><span class="token punctuation">></span></span><br />    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>tr</span><span class="token punctuation">></span></span><br />      <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>td</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>hdr-synth<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>Synthetic Race<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>td</span><span class="token punctuation">></span></span><br />      <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>td</span><span class="token punctuation">></span></span>{{ item.synthRace }}<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>td</span><span class="token punctuation">></span></span><br />    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>tr</span><span class="token punctuation">></span></span><br />    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>tr</span><span class="token punctuation">></span></span><br />      <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>td</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>hdr-synth<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>Synthetic Track<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>td</span><span class="token punctuation">></span></span><br />      <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>td</span><span class="token punctuation">></span></span>{{ item.synthTrk }}<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>td</span><span class="token punctuation">></span></span><br />    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>tr</span><span class="token punctuation">></span></span><br />    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>tr</span><span class="token punctuation">></span></span><br />      <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>td</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>hdr-synth<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>Synthetic Date<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>td</span><span class="token punctuation">></span></span><br />      <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>td</span><span class="token punctuation">></span></span>{{ item.synthDate }}<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>td</span><span class="token punctuation">></span></span><br />    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>tr</span><span class="token punctuation">></span></span><br />    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>tr</span><span class="token punctuation">></span></span><br />      <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>td</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>hdr-turf<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>Turf Type<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>td</span><span class="token punctuation">></span></span><br />      <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>td</span><span class="token punctuation">></span></span>{{ item.turfType }}<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>td</span><span class="token punctuation">></span></span><br />    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>tr</span><span class="token punctuation">></span></span><br />    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>tr</span><span class="token punctuation">></span></span><br />      <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>td</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>hdr-turf<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>Turf Race<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>td</span><span class="token punctuation">></span></span><br />      <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>td</span><span class="token punctuation">></span></span>{{ item.turfRace }}<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>td</span><span class="token punctuation">></span></span><br />    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>tr</span><span class="token punctuation">></span></span><br />    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>tr</span><span class="token punctuation">></span></span><br />      <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>td</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>hdr-turf<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>Turf Track<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>td</span><span class="token punctuation">></span></span><br />      <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>td</span><span class="token punctuation">></span></span>{{ item.turfTrk }}<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>td</span><span class="token punctuation">></span></span><br />    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>tr</span><span class="token punctuation">></span></span><br />    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>tr</span><span class="token punctuation">></span></span><br />      <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>td</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>hdr-turf<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>Turf Date<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>td</span><span class="token punctuation">></span></span><br />      <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>td</span><span class="token punctuation">></span></span>{{ item.turfDate }}<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>td</span><span class="token punctuation">></span></span><br />    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>tr</span><span class="token punctuation">></span></span><br />  <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>tbody</span><span class="token punctuation">></span></span><br /><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>table</span><span class="token punctuation">></span></span><br />{% endfor %}</code></pre>
<figure class="fig-container">
  <picture>
    <source srcset="https://danabyerly.com/img/oss-mobile.avif" type="image/avif" />
    <source srcset="https://danabyerly.com/img/oss-mobile.webp" type="image/webp" />
    <img src="https://danabyerly.com/img/oss-mobile.png" class="img-center" alt="Responsive layout on small sized screens" loading="lazy" />
  </picture>
  <figcaption>
    By creating a second table the layout is optimized for smaller screens. Screenshot from <a href="https://sizzy.app/">Sizzy App</a>
  </figcaption>
</figure>
<p>The small table has zero top and bottom margin, so the individual tables appear as a single table. Each layout has a class to identify it: .table-lg and .table-sm.</p>
<pre class="language-css"><code class="language-css"><span class="token atrule"><span class="token rule">@media</span> screen <span class="token keyword">and</span> <span class="token punctuation">(</span><span class="token property">max-width</span><span class="token punctuation">:</span> 800px<span class="token punctuation">)</span></span> <span class="token punctuation">{</span><br />  <span class="token selector">.table-responsive,<br />  .table-lg</span> <span class="token punctuation">{</span><br />  <span class="token property">display</span><span class="token punctuation">:</span> none<span class="token punctuation">;</span><br />  <span class="token punctuation">}</span><br /><br />  <span class="token selector">.table-sm</span> <span class="token punctuation">{</span><br />    <span class="token property">display</span><span class="token punctuation">:</span> table<span class="token punctuation">;</span><br />  <span class="token punctuation">}</span><br /><br />  <span class="token selector">tr td:first-child</span> <span class="token punctuation">{</span><br />    <span class="token property">width</span><span class="token punctuation">:</span> 10rem<span class="token punctuation">;</span><br />  <span class="token punctuation">}</span><br /><span class="token punctuation">}</span><br /><span class="token punctuation">}</span></code></pre>
<p>At the larger sizes .table-small is hidden. At smaller sizes .table-sm is displayed and .table-lg is hidden. Since the small table doesn’t need the scrolling region I also hid .table-responsive (which sets the scrolling region). I could’ve specified a range in the media query for the medium screens, but it always feels futzy to me to get the range correct when there are multiple queries, your mileage may vary!</p>
<p>A note on <code>display: table</code>, I wasn’t aware of the display properties for tables. According to CSS Tricks the primary use seems to be giving <a href="https://css-tricks.com/almanac/properties/d/display/#table-values">semantic meaning to non-table elements</a>, gross indeed! But, when I used <code>display: block</code> to display the hidden table, none of the styles on table elements worked, as it turns out <code>display: table</code> was useful for an actual table.</p>
<p>Since each row from the larger table is its own table in the smallest layout, there was variation in the <code>td</code> width between the tables based on the data in the second cell. To ensure uniform cell width between the tables I set the width of the first <code>td</code>. This makes it easy to scan and simulates a single, uniform table experience.</p>

      <div class="heading-wrapper">
        <h3 id="sticky-headers">Sticky headers
      </h3>
        <a class="anchor-link" href="https://danabyerly.com/articles/responsive-and-accessible-data-tables/#sticky-headers">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Regardless of the layout, sticky headers were high on my list to ensure the context of the data while scrolling through the table. <a href="https://css-tricks.com/position-sticky-and-table-headers/">CSS Tricks</a> and the <a href="https://adrianroselli.com/2020/01/fixed-table-headers.html">Adrian Roselli post</a> mentioned before each have useful information.</p>
<pre class="language-css"><code class="language-css"><span class="token selector">th</span> <span class="token punctuation">{</span><br />  <span class="token property">background</span><span class="token punctuation">:</span> <span class="token function">var</span><span class="token punctuation">(</span>--color-turf-dark<span class="token punctuation">)</span><span class="token punctuation">;</span><br />  <span class="token property">color</span><span class="token punctuation">:</span> <span class="token function">var</span><span class="token punctuation">(</span>--color-lightest<span class="token punctuation">)</span><span class="token punctuation">;</span><br />  <span class="token property">text-align</span><span class="token punctuation">:</span> left<span class="token punctuation">;</span><br />  <span class="token property">padding</span><span class="token punctuation">:</span> .6rem<span class="token punctuation">;</span><br />  <span class="token property">box-shadow</span><span class="token punctuation">:</span> <span class="token function">var</span><span class="token punctuation">(</span>--shadow<span class="token punctuation">)</span><span class="token punctuation">;</span><br />  <span class="token property">position</span><span class="token punctuation">:</span> -webkit-sticky<span class="token punctuation">;</span><br />  <span class="token property">position</span><span class="token punctuation">:</span> sticky<span class="token punctuation">;</span><br />  <span class="token property">top</span><span class="token punctuation">:</span> 0<span class="token punctuation">;</span><br /><span class="token punctuation">}</span></code></pre>
<p>At every size the header row sticks. In the large and smallest sizes the header sticks to the top of the browser. At the medium size the header sticks to the scrolling container.</p>
<p>Another small note in the above <code>th</code> styles, I set a defaults for the background and text color, which are used by default in the <a href="https://omnisurface-stars.com/pedigree">Pedigree table</a> and then apply different colors for the other two tables on the individual cells allowing for surface specific background colors.</p>

      <div class="heading-wrapper">
        <h3 id="what-about-screen-readers">What about screen readers?
      </h3>
        <a class="anchor-link" href="https://danabyerly.com/articles/responsive-and-accessible-data-tables/#what-about-screen-readers">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>I used <a href="https://help.apple.com/voiceover/mac/10.15/">VoiceOver on Mac</a> to test the site, and I only tested on my desktop. Without a Windows machine I can’t currently test on NVDA or JAWS.</p>
<p>VoiceOver using Safari, Chrome and Firefox had no trouble navigating through the entire page, including the table. I’m slowly getting better at testing in VoiceOver, but I’m not entirely confident that I’m doing anything close to a real world test since. I’m a heavy keyboard user in general, but I also tested the site with keyboard only and everything was usable.</p>

      <div class="heading-wrapper">
        <h3 id="other-odds-and-ends">Other odds and ends
      </h3>
        <a class="anchor-link" href="https://danabyerly.com/articles/responsive-and-accessible-data-tables/#other-odds-and-ends">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Not table specific, but these easy to implement things made a notable difference with VoiceOver.</p>
<p>I included an aria-label of “Primary” on the top-level navigation that announces as “Primary navigation”.</p>
<pre class="language-html"><code class="language-html"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>nav</span> <span class="token attr-name">aria-label</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>Primary<span class="token punctuation">"</span></span><span class="token punctuation">></span></span><br />  ...<br /><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>nav</span><span class="token punctuation">></span></span></code></pre>
<p>Using a similar approach as this <a href="https://bryanlrobinson.com/blog/using-nunjucks-if-expressions-to-create-an-active-navigation-state-in-11ty/">helpful post by Bryan Robinson</a> I added aria-current in the top-level navigation. It announces as “Current Item” before reading the link text.</p>
<pre class="language-html"><code class="language-html">&lt;a href="/" {{ 'aria-current=true' if '/' === page.url }}>Home<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>a</span><span class="token punctuation">></span></span></code></pre>
<p>For “Won on All Three” and “Won on Two” I added an aria-label to clarify potential confusion between “Won” and “One”. I left out the conditional that sets aria-current in this example for brevity.</p>
<pre class="language-html"><code class="language-html"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>a</span> <span class="token attr-name">href</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>/won-all-three/<span class="token punctuation">"</span></span> <span class="token attr-name">aria-label</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>Won on all three surfaces<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>Won on All Three<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>a</span><span class="token punctuation">></span></span></code></pre>
<p>Visually you can discern between “Won” and “One” but hearing it read was confusing, now it announces as “Won on all three surfaces” and “Won on two of three surfaces”.</p>
<p>Finally <code>thead</code>, <code>tbody</code>, <code>tfoot</code> don’t provide semantic meaning and therefore <a href="https://webaim.org/techniques/tables/data">don’t provide any accessibility benefit</a>. They are useful for printing as they ensure the <code>thead</code> and <code>tfoot</code> print out with every page. And speaking of printing, I didn’t create any print styles (Yet? Anyone who knows hardcore racing nerds also knows they love to print things out).</p>

      <div class="heading-wrapper">
        <h3 id="wrapping-up">Wrapping up
      </h3>
        <a class="anchor-link" href="https://danabyerly.com/articles/responsive-and-accessible-data-tables/#wrapping-up">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>I wrote this article mostly for myself as a way to remember decisions and absorb what I’ve learned along the way, but I’m always hoping to help out anyone who might be trying to solve similar problems. You can view the code <a href="https://github.com/superterrific/omnisurface-stars">at the repository</a>, and the <a href="https://github.com/superterrific/omnisurface-stars/blob/main/src/_includes/css/table.css">table specific CSS is here</a>.</p>
<p>I’m also always looking to improve my understanding and skills, especially for accessibility, so please get in touch if you have any feedback!</p>
<p><strong>Useful Articles</strong></p>
<ul>
<li><a href="https://adrianroselli.com/2017/11/a-responsive-accessible-table.html">Adrian Roselli: A Responsive Accessible Table</a></li>
<li><a href="https://adrianroselli.com/2020/01/fixed-table-headers.html">Adrian Roselli: Fixed Table Headers</a></li>
<li><a href="https://css-tricks.com/position-sticky-and-table-headers/">CSS Tricks: Position Sticky and Table Headers</a></li>
<li><a href="https://tink.uk/how-screen-readers-navigate-data-tables/">Léonie Watson: How Screen Readers Navigate Data Tables</a></li>
</ul>

      ]]></content>
    </entry>
	
    
    <entry>
      <title>Manually splitting CSS files in Eleventy</title>
      <link href="https://danabyerly.com/articles/manually-splitting-css-files-in-eleventy/"/>
      <updated>2020-09-28T00:00:00Z</updated>
      <id>https://danabyerly.com/articles/manually-splitting-css-files-in-eleventy/</id>
      <content type="html"><![CDATA[
        <p>One of the Quick Tips in the Eleventy Docs is <a href="https://www.11ty.dev/docs/quicktips/inline-css/">how to inline minified CSS</a>. It’s very easy to implement, in fact it was one of the first things I figured out on my own after finishing the <a href="https://piccalil.li/course/learn-eleventy-from-scratch/">Learn Eleventy from Scratch course</a>. The course, which I highly recommend, has a section on setting up a SASS pipeline, but since I wasn’t going to use SASS I had to figure something out on my own.</p>
<p>Before we get started, this seems like a great time to provide some context about my dev skills…</p>
<div class="full-bleed">
  <div class="caveat">
    <div class="wrapper-content caveat-wrapper">
      <div class="caveat-icon">
        <svg xmlns="http://www.w3.org/2000/svg" class="icon-2x " width="24" height="24" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" role="presentation" focusable="false">
          <path stroke="none" d="M0 0h24v24H0z"></path>
          <path d="M7 4a2 2 0 0 0 -2 2v3a2 3 0 0 1 -2 3a2 3 0 0 1 2 3v3a2 2 0 0 0 2 2"></path>
          <path d="M17 4a2 2 0 0 1 2 2v3a2 3 0 0 0 2 3a2 3 0 0 0 -2 3v3a2 2 0 0 1 -2 2"></path>
        </svg>
      </div>
      <div class="caveat-text">
        <h2>Context about my dev skills...</h2>
        <p>I'm a "designer who codes" and part of the purpose of this site is to improve my front-end dev skills. My highest area of competence is layout, where I range from solid to occasionally pretty good. Areas like performance, tooling and anything beyond simple DOM manipulation in JS are where I'm the least skilled. These are all things I hope to improve! </p>
      </div>
    </div>
  </div>
</div>

      <div class="heading-wrapper">
        <h2 id="quick-set-up">Quick set up
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/articles/manually-splitting-css-files-in-eleventy/#quick-set-up">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>You should check the <a href="https://www.11ty.dev/docs/quicktips/inline-css/">check the instructions at Eleventy</a>, but the gist is that once clean-css is installed and a filter is added to your eleventy.js file, there’s a bit of code to add within the <code>head</code> tag to include the CSS file and then minify it. This code replaces the link to your CSS file.</p>
<p>I’ve made a directory named ‘css’ in ‘_includes’ and am calling the global CSS file…</p>
<pre class="language-html"><code class="language-html">{% set css %}<br />  {% include "css/global.css" %}<br />{% endset %}<br /><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>style</span><span class="token punctuation">></span></span><span class="token style"><span class="token language-css"><span class="token punctuation">{</span><span class="token punctuation">{</span> css | cssmin | safe <span class="token punctuation">}</span><span class="token punctuation">}</span></span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>style</span><span class="token punctuation">></span></span><br /></code></pre>
<p>In an ongoing effort to both improve upon and learn about performance, I started playing with splitting the CSS out into content specific files, otherwise known as <a href="https://developer.mozilla.org/en-US/docs/Glossary/Code_splitting">code-splitting or bundling</a>. On a larger project code-splitting is typically handled by a bundler like Webpack or Parcel. Don’t want to use a bundler, or in my case learn how to use a bundler? Not a problem, Eleventy makes it easy to set something up manually.</p>
<p>As I bumbled around figuring out how best to do this, I tried two methods. Either could work well depending on your setup.</p>

      <div class="heading-wrapper">
        <h2 id="using-if-statements">Using if statements
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/articles/manually-splitting-css-files-in-eleventy/#using-if-statements">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>My first foray was separating out the code for the homepage and the Projects listings used on the homepage by using a <a href="https://mozilla.github.io/nunjucks/templating.html#if">Nunjucks if statement</a>. Building on the example above it looked like this…</p>
<pre class="language-html"><code class="language-html">{% set css %}<br />  {% include "css/global.css" %}<br />  {% if page.url === '/' %}<br />    {% include "css/home.css" %}<br />    {% include "css/projects-landing.css" %}<br />  {% endif %}<br />{% endset %}<br /><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>style</span><span class="token punctuation">></span></span><span class="token style"><span class="token language-css"><span class="token punctuation">{</span><span class="token punctuation">{</span> css | cssmin | safe <span class="token punctuation">}</span><span class="token punctuation">}</span></span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>style</span><span class="token punctuation">></span></span><br /></code></pre>
<p>If the current page’s url is equal to the homepage (“/”) then home.css and projects-landing.css will be included to be minified along with global.css. Those styles will only only appear on the homepage, cutting down on unused CSS elsewhere in the site.</p>
<p>Emboldened by this discovery, I started to figure out where else I could employ this technique. That’s where it started to get a little a dicey. The Projects landing page was the next obvious target since I already had the styles split out into its own file. The individual project pages were also easy to split out as an individual file. I decided to just use one if statement for the projects section.</p>
<pre class="language-html"><code class="language-html">{% set css %}<br />  {% include "css/global.css" %}<br />  {% if page.url === '/' %}<br />    {% include "css/home.css" %}<br />    {% include "css/projects-landing.css" %}<br />  {% endif %}<br />  {% if '/projects/' in page.url %}<br />    {% include "css/projects.css" %}<br />    {% include "css/projects-landing.css" %}<br />  {% endif %}<br />{% endset %}<br /><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>style</span><span class="token punctuation">></span></span><span class="token style"><span class="token language-css"><span class="token punctuation">{</span><span class="token punctuation">{</span> css | cssmin | safe <span class="token punctuation">}</span><span class="token punctuation">}</span></span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>style</span><span class="token punctuation">></span></span><br /></code></pre>
<p>So far so good, for the most part. Here projects.css and projects-landing.css are included if ‘/projects/’ is in the url. This ensures that both the Projects landing page and individual Project pages get those styles. If I were really trying to squeak the bytes out I could’ve separated them into two if statements so there was no overlap, but this approach is fine for my little low-traffic site.</p>
<p>The next logical move was to separate out the styles used on content pages. This was where the if statement approach became unwieldy. <a href="https://danabyerly.com/articles/">Articles</a>, <a href="https://danabyerly.com/notes/">Notes</a> and <a href="https://danabyerly.com/changelog/">Changelog</a> all use the same styles and layout. If I had a single Blog or Writing section, the if statement approach would be fine, but trying to figure out how to include all the urls proved tricky.</p>
<p>I started off thinking that I could chain all the urls together with ‘or’ like this…</p>
<pre class="language-html"><code class="language-html">{% if '/articles/' or '/notes/' or '/changelog/' in page.url %}<br />  {% include "css/content.css" %}<br />{% endif %}<br /></code></pre>
<p>But alas this didn’t work. So I made a big Frankenstein of repetitive if statements for each section. I’ve also included styles for Syntax Highlighting (dracula.css)…</p>
<pre class="language-html"><code class="language-html">{% set css %}<br />  {% include "css/global.css" %}<br />  {% if page.url === '/' %}<br />    {% include "css/home.css" %}<br />    {% include "css/projects-landing.css" %}<br />  {% endif %}<br />  {% if '/projects/' in page.url %}<br />    {% include "css/projects.css" %}<br />    {% include "css/projects-landing.css" %}<br />    {% include "css/content.css" %}<br />    {% include "css/dracula.css" %}<br />  {% endif %}<br />  {% if '/notes/' in page.url %}<br />    {% include "css/content.css" %}<br />    {% include "css/dracula.css" %}<br />  {% endif %}<br />  {% if '/articles/' in page.url %}<br />    {% include "css/content.css" %}<br />    {% include "css/dracula.css" %}<br />  {% endif %}<br />  {% if '/changelog/' in page.url %}<br />    {% include "css/content.css" %}<br />    {% include "css/dracula.css" %}<br />  {% endif %}<br />{% endset %}<br /><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>style</span><span class="token punctuation">></span></span><span class="token style"><span class="token language-css"><span class="token punctuation">{</span><span class="token punctuation">{</span> css | cssmin | safe <span class="token punctuation">}</span><span class="token punctuation">}</span></span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>style</span><span class="token punctuation">></span></span><br /></code></pre>
<p>Yeah, that’s a bit much. It does have the benefit of being all in one place, but this is not something that should be changing that often. I <a href="https://danabyerly.com/changelog/2020-09-21/">decided to use it</a> until I could think of something better.</p>
<p>I was so caught up in trying to get this approach to work that I overlooked the fact that most variables are set at the layout/template level. Once I stopped hitting my head against if statements long enough to realize it, I was on to the next approach.</p>

      <div class="heading-wrapper">
        <h2 id="setting-css-paths-in-the-individual-layouts">Setting CSS paths in the individual layouts
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/articles/manually-splitting-css-files-in-eleventy/#setting-css-paths-in-the-individual-layouts">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Now each layout has something similar to the example below from the <a href="https://github.com/superterrific/dana-byerly/blob/master/src/_includes/layouts/home.html">layout for the homepage</a>…</p>
<pre class="language-html"><code class="language-html">{% extends "layouts/base.html" %}<br /><br />{% set css %}<br />  {% include "css/global.css" %}<br />  {% include "css/home.css" %}<br />  {% include "css/projects-landing.css" %}<br />{% endset %}<br /></code></pre>
<p>One small drawback of this approach is that everything has to live at the layouts level, so the global styles file (e.g., global.css) needs to be included in each layout. I’m OK with that, but it’s worth noting.</p>
<p>I had to rework how I was doing the content page layouts. Originally each section (Articles, Notes and Changelog) had its own layout that extended the base layout and called a partial with the code for the layout. Each section’s layout file (e.g., article.html) sets the section’s pagination between posts (e.g., read previous / read next).</p>
<p>If I kept this set up I would have to repeat the styles in three places, which isn’t ideal. So I created a new layout called content.html that extends the base template and sets the CSS…</p>
<pre class="language-html"><code class="language-html">{% extends "layouts/base.html" %}<br /><br />{% set css %}<br />  {% include "css/global.css" %}<br />  {% include "css/content.css" %}<br />  {% include "css/dracula.css" %}<br />{% endset %}<br /><br />{% block content %}{% endblock %}<br /></code></pre>
<p>Then in each individual content layout, I changed the extends from base.html to content.html, here’s the layout for Articles…</p>
<pre class="language-html"><code class="language-html">{% extends "layouts/content.html" %}<br /><br />{% set pageHeaderTitle = title %}<br />{% set previousPost = collections.articles | getPreviousCollectionItem(page) %}<br />{% set nextPost = collections.articles | getNextCollectionItem(page) %}<br /><br />    {% block content %}<br />    {% include "partials/post-content.html" %}<br />    {% endblock %}<br /></code></pre>
<p>By chaining the layouts together I can set the styles in one place and let the individual section layouts handle setting the section-specific items. It might seem counter intuitive, but the real action of the page layout happens in the post-content.html partial, not the layout file.</p>
<p>Here’s a little diagram of the set-up…</p>
<figure class="fig-container">
  <picture>
    <source srcset="https://danabyerly.com/img/content-template-structure.avif" type="image/avif" />
    <source srcset="https://danabyerly.com/img/content-template-structure.webp" type="image/webp" />
    <img src="https://danabyerly.com/img/content-template-structure.png" alt="Diagram showing the content template structure." loading="lazy" />
  </picture>
  <figcaption>
    The content sections template structure sharing CSS across several layouts. Created using <a href="https://excalidraw.com/">Excalidraw</a>.
  </figcaption>
</figure>

      <div class="heading-wrapper">
        <h2 id="the-results">The results
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/articles/manually-splitting-css-files-in-eleventy/#the-results">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>One of the articles I found most helpful was <a href="https://pustelto.com/blog/optimizing-css-for-faster-page-loads/">Optimizing CSS for faster page load</a> by Tomas Pustelto. There’s a lot of useful info especially for bigger or team projects. Aside from the excellent overview, one thing particularly useful for this effort was learning about the <a href="https://developers.google.com/web/tools/chrome-devtools/coverage/">Coverage tool</a> in Chrome Dev Tools mentioned in the ‘Use code-splitting for your stylesheets’ section <a href="https://pustelto.com/blog/optimizing-css-for-faster-page-loads/">of the article</a>. Basically the Coverage tool shows you what percentage of the loaded CSS is not being used.</p>
<p>Just using a single global stylesheet roughly 60% of it was unused on the homepage. After this effort only 35.8% was unused. The Coverage tool doesn’t count focus and hover styles or media queries until they used (e.g, if you hover over something with the Coverage panel open you’ll see the percent change). Including all of those I’m at 19% unused. I could still get the number lower, but this felt like a nice improvement.</p>
<figure class="fig-container">
  <picture>
    <source srcset="https://danabyerly.com/img/unused-css.avif" type="image/avif" />
    <source srcset="https://danabyerly.com/img/unused-css.webp" type="image/webp" />
    <img src="https://danabyerly.com/img/unused-css.png" alt="Chrome Dev Tools Coverage showing how much unused CSS is present." loading="lazy" />
  </picture>
  <picture>
    <source srcset="https://danabyerly.com/img/unused-additional.avif" type="image/avif" />
    <source srcset="https://danabyerly.com/img/unused-additional.webp" type="image/webp" />
    <img src="https://danabyerly.com/img/unused-additional.png" alt="The unused number in Coverage changes as you use styles on the page." loading="lazy" />
  </picture>
  <figcaption>
    From the Coverage tool in Chrome Dev Tools, the top image is the default state of the homepage, with 35.8% of the styles unused. The bottom image after hovering, focusing and using media queries shows unused styles at 19%.
  </figcaption>
</figure>
<p>By clicking on the bar chart in the Usage Visualization column you can see which styles are currently used and which are not. This is helpful for deciding what can be moved elsewhere.</p>
<p>Here’s an example from the default state of the homepage, the styles with blue indicator (lines 476-493) are currently being used, and the styles with the red indicator (lines 495-498) are not currently being used…</p>
<figure class="fig-container">
  <picture>
    <source srcset="https://danabyerly.com/img/unused-styles.avif" type="image/avif" />
    <source srcset="https://danabyerly.com/img/unused-styles.webp" type="image/webp" />
    <img src="https://danabyerly.com/img/unused-styles.png" alt="Coverage can also show you which styles are currently being used and which are not." loading="lazy" />
  </picture>
  <figcaption>
    Here <strong>.hp-hero</strong> and <strong>.hp-hero a</strong> are being used but <strong>.hp-hero a:hover</strong> hasn't yet been invoked.
  </figcaption>
</figure>

      <div class="heading-wrapper">
        <h2 id="summary">Summary
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/articles/manually-splitting-css-files-in-eleventy/#summary">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>More than anything else, this was a good learning exercise. While I didn’t have earth shattering gains, I did shave off about 1.2k in file size and drop overall loading time over 100ms.</p>
<figure class="fig-container">
  <picture>
    <source srcset="https://danabyerly.com/img/perf-summary-before.avif" type="image/avif" />
    <source srcset="https://danabyerly.com/img/perf-summary-before.webp" type="image/webp" />
    <img src="https://danabyerly.com/img/perf-summary-before.png" alt="Before splitting out CSS file the total load time was at 464ms." loading="lazy" />
  </picture>
  <picture>
    <source srcset="https://danabyerly.com/img/perf-summary-after.avif" type="image/avif" />
    <source srcset="https://danabyerly.com/img/perf-summary-after.webp" type="image/webp" />
    <img src="https://danabyerly.com/img/perf-summary-after.png" alt="Before splitting out CSS file the total load time was at 324ms." loading="lazy" />
  </picture>
  <figcaption>
    Before (top image) and after (bottom image) splitting out CSS from the Performance tab in Chrome Dev Tools.
  </figcaption>
</figure>
<p>Perhaps more important than my modest improvements is that I learned something about performance that will be helpful moving forward. As a bonus I also discovered yet another thing that Eleventy makes easy, so if you want to do some CSS code-splitting without using Webpack or the like, Eleventy gives you a couple of options.</p>

      ]]></content>
    </entry>
	
    
    <entry>
      <title>Fun with image optimization</title>
      <link href="https://danabyerly.com/notes/fun-with-image-optimization/"/>
      <updated>2020-09-13T00:00:00Z</updated>
      <id>https://danabyerly.com/notes/fun-with-image-optimization/</id>
      <content type="html"><![CDATA[
        <p>I’ve been having fun fiddling around with the new site, making little changes here there, cleaning up this and that. The focus of my <a href="https://danabyerly.com/about/">Rip van Winkle-esque</a> return to web dev over the last few years was primarily focused on CSS and JS. When it came time to do the image production for the <a href="https://danabyerly.com/projects/">projects section</a> section I realized I had a lot to (re)learn in that department too.</p>
<p>Over the weekend I set out to improve the site’s image optimization. I <a href="https://danabyerly.com/articles/finally-a-new-site/">mentioned here</a> that I dipped my toes in the srcset waters, initially creating a set of responsively sized images. Even though I was <a href="https://www.responsivebreakpoints.com/">using this</a> to create the different sizes, it was a bit of a slog, and I thought maybe I’d look into using a CDN. But then <a href="https://jakearchibald.com/2020/avif-has-landed/">this article</a> made it’s way into my timeline and I decided to investigate next-generation image formats.</p>
<p>Putting aside .avif for a moment, or <a href="https://twitter.com/hankchizljaw/status/1303430155898159110">.wee as I think I’ll be calling it</a>, WebP was one of the many things that happened when I wasn’t paying attention. So even optimizing for WebP was a notable performance improvement (even though <a href="https://www.macrumors.com/2020/06/22/webp-safari-14/">Safari doesn’t support it just quite yet</a>).</p>
<p>With the help of <a href="https://reachlightspeed.com/blog/using-the-new-high-performance-avif-image-format-on-the-web-today/">this article</a> I was able to easily make the necessary changes.</p>
<ol>
<li>Use <a href="https://squoosh.app/">Squoosh</a> to create WebP and AVIF files from my PNGs</li>
<li>Swap in picture code.</li>
</ol>
<p>Here’s the original code using srcset and responsively sized images (with an example image instead of the Nunjucks code calling the image)…</p>
<pre class="language-html"><code class="language-html"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>img</span> <span class="token attr-name">src</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>/img/projects/pile_axxcyn_c_scale,w_1380.png<span class="token punctuation">"</span></span><br />          <span class="token attr-name">sizes</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>(min-width: 720px) 1380px, calc(100vw - 16px)<span class="token punctuation">"</span></span><br />          <span class="token attr-name">srcset</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>/img/projects/pile_axxcyn_c_scale,w_480.png 480w, /img/projects/pile_axxcyn_c_scale,w_768.png 768w, /img/projects/pile_axxcyn_c_scale,w_1019.png 1019w, /img/projects/pile_axxcyn_c_scale,w_1380.png 1380w<span class="token punctuation">"</span></span><br />          <span class="token attr-name">alt</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>Pile of hrefs site<span class="token punctuation">"</span></span> <span class="token attr-name">loading</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>lazy<span class="token punctuation">"</span></span> <span class="token punctuation">/></span></span></code></pre>
<p>Updated code using <code>picture</code> and next-generation formats…</p>
<pre class="language-html"><code class="language-html"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>picture</span><span class="token punctuation">></span></span><br />  <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>source</span> <span class="token attr-name">srcset</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>/img/projects/pile.avif<span class="token punctuation">"</span></span> <span class="token attr-name">type</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>image/avif<span class="token punctuation">"</span></span><span class="token punctuation">></span></span><br />  <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>source</span> <span class="token attr-name">srcset</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>/img/projects/pile.webp<span class="token punctuation">"</span></span> <span class="token attr-name">type</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>image/webp<span class="token punctuation">"</span></span><span class="token punctuation">></span></span><br />  <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>img</span> <span class="token attr-name">src</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>/img/projects/pile.png<span class="token punctuation">"</span></span> <span class="token attr-name">alt</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>Pile of hrefs site<span class="token punctuation">"</span></span> <span class="token attr-name">loading</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>lazy<span class="token punctuation">"</span></span><span class="token punctuation">></span></span><br /><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>picture</span><span class="token punctuation">></span></span></code></pre>
<p>I don’t have that many images on the site so it was a relatively easy update, but even with the laziest approach possible of using the defaults at <a href="https://squoosh.app/">Squoosh</a> the difference in file size was impressive.</p>
<p>According to Lighthouse the image size totals for the <a href="https://danabyerly.com/projects/">Projects landing page</a> were…</p>
<ul>
<li><strong>1,721k</strong> total using a set of images sized for breakpoints</li>
<li><strong>523.4k</strong> total using next-generation formats</li>
</ul>
<p>That’s almost 70% smaller just using the Squoosh default settings. With a little more fine-tuning I was able to get it down to 300.9k, or 83% smaller. Of course Lighthouse is using AVIF for those totals, so the percentage would be a bit less with WebP. Still it’s very much a nice performance bump as well as a progressive enhancement, otherwise known as a win-win!</p>
<figure class="fig-container">
  <picture>
    <source srcset="https://danabyerly.com/img/file-size-chart.avif" type="image/avif" />
    <source srcset="https://danabyerly.com/img/file-size-chart.webp" type="image/webp" />
    <img src="https://danabyerly.com/img/file-size-chart.png" alt="Chart showing the difference in file size between the file types" loading="lazy" />
  </picture>
  <figcaption>
    The final image size totals by file type for the <a href="https://danabyerly.com/projects">Projects page</a> after additional optimization.
  </figcaption>
</figure>
<p class="caption">
<strong>Note:</strong> The 300.9k came from localhost, and it was consistent over several checks. Now that the update is live the numbers have ranged from about 285k to 380k, still a much better size than 1,721! But wanted to note the discrepancy, and that network and performance issues are a bit out of my league!
</p>
<p>The <a href="https://jakearchibald.com/2020/avif-has-landed/">article by Jake Archibald</a> that set me on this little journey has a lot of detailed techinical information and comparisons. Some of it was just beyond my technical comprehension, but if you’re looking for more technical information on AVIF, this is a good place to find it. The article mentions one of the downsides of the format, which is also a <a href="https://developers.google.com/speed/webp/faq#does_webp_support_progressive_or_interlaced_display">downside of WebP</a>, no progressive display. Although the article on WebP does point to an <a href="https://developers.google.com/speed/webp/docs/api#advanced_decoding_api">advance decoding API</a>.</p>
<p>For my little site that no one reads I’m OK with the tradeoff of progressive display, especially considering that the file sizes are relatively small for both formats and I’m using lazy loading, your mileage may vary.</p>
<p class="caption">
<strong>Update:</strong> Matthias Ott has a <a href="https://matthiasott.com/notes/avif-a-new-image-format">good post on AVIF</a> that includes a list of encoders. Manual conversion was fine for my little site, but there are options for bigger scale conversions!
</p>  

      ]]></content>
    </entry>
	
    
    <entry>
      <title>Finally, a new site</title>
      <link href="https://danabyerly.com/articles/finally-a-new-site/"/>
      <updated>2020-09-06T00:00:00Z</updated>
      <id>https://danabyerly.com/articles/finally-a-new-site/</id>
      <content type="html"><![CDATA[
        <p>It’s been awhile since I’ve had a personal site beyond my side-projects, and I’ve been wanting to change that for a while.</p>

      <div class="heading-wrapper">
        <h2 id="slowly-in-the-beginning">Slowly in the beginning
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/articles/finally-a-new-site/#slowly-in-the-beginning">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>I started to think about it last year and quickly put together a little one-page placeholder site that’s <a href="https://danabyerly.com/archive/01/">archived here</a>. Once I got the placeholder site out there I started trying to approach it as a “real” project rather than something I was just fiddling with. I made a ton of notes, and did a ton of research. I made a problem statement. I made a <a href="https://www.notion.so/">Notion</a> board and filled it up with tasks, and then ignored it. I usually use <a href="https://trello.com/">Trello</a> for boards, so I made a Trello board and filled it up with tasks, and then ignored that too.</p>
<p>After doing so much thinking, researching and attempting to plan I just let it sit there for a while, knowing I would eventually come back to it. In the meantime I <a href="https://twitter.com/superterrific/status/1223416466965508098">reworked a side-project</a>, threw together <a href="https://danabyerly.com/projects/pile-of-hrefs/">another new project</a> and then <a href="https://twitter.com/superterrific/status/1233926346402881541">fiddled around with some design concepts</a> (that I mostly tossed with a few exceptions).</p>
<p>I knew I wanted to use <a href="https://www.11ty.dev/">Eleventy</a>, and tried playing around with it on my own, <a href="https://twitter.com/superterrific/status/1173747434880733186">but I didn’t get very far</a>. I already knew how to use partials and templates, and I understood static site generators in general, but my front-end skills are very front of the front-end and light on Javascript, so I just couldn’t get that far on my own.</p>
<p>Eventually I put my initial Eleventy floundering aside too, thinking that at some point I could come back and figure it out enough to get something out there. But then <a href="https://twitter.com/hankchizljaw">Andy Bell</a> created the <a href="https://piccalil.li/course/learn-eleventy-from-scratch/">Learn Eleventy from Scratch</a> course and the prospect of being able to make this site started to look hopeful!</p>
<p>Andy’s teaching and writing style work well for me, his how-to articles in the early issues of the Piccalilli newsletter were incredibly helpful right at the time I was getting serious about leveling up my CSS. I took part in the <a href="https://piccalil.li/category/front-end%20challenges%20club/">Front-end Challenges Club</a> and got a lot out of that effort as well. So it was no surprise that the <a href="https://piccalil.li/course/learn-eleventy-from-scratch/">Eleventy course</a> was exactly what I needed to go from “I think I might be able to figure Eleventy out, maybe?” to being able to understand <a href="https://www.11ty.dev/docs/">the Docs</a> (for the most part!) and solve problems on my own. I highly <a href="https://piccalil.li/course/learn-eleventy-from-scratch/">recommend the course</a>.</p>

      <div class="heading-wrapper">
        <h2 id="finally-progress">Finally, progress
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/articles/finally-a-new-site/#finally-progress">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>A little over a month ago I finished the course then <a href="https://twitter.com/superterrific/status/1285215442940944384">started the site again</a>, this time knowing I could do it. It took longer that it normally would have, not only because I was ramping up on Eleventy, but because I was designing as I went. Normally I would’ve made a static HTML/CSS version and then integrated it, but it wasn’t too terrible doing it this way.</p>
<p>At first I was focused on taking what I learned in the course and seeing what I could do with it. Pretty quickly I was able to do all sorts of things, like install plugins and change things around to be more to my liking. Soon I was out there reading posts and lengthy discussions of issues at Github, as well as looking at starter projects or repos, and for the most part I understood what was going on! This was really a great feeling.</p>
<p>Eventually I started focusing more on the design, which of course would lead to more investigation and poking around to find answers… you know, the fun stuff. I used some things from <a href="https://twitter.com/superterrific/status/1233926346402881541">initial rough design</a>, like the limited <a href="https://codepen.io/superterrific/pen/wvBwLKL">color palette</a> from the placeholder site but let the site and design unfold as I worked on.</p>
<p>It was so much fun looking around to see all the many ways people set up their projects or solved problems. One of the things I like the most about Eleventy is the flexibility and vast range of ways to accomplish things. It feels very inclusive to allow people to use their own preferred approaches.</p>

      <div class="heading-wrapper">
        <h2 id="thank-you-one-and-all">Thank you one and all
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/articles/finally-a-new-site/#thank-you-one-and-all">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>There were a lot of resources that helped me figure out various things on this site. I’m sure I’ll miss a few, but hopefully not!</p>

      <div class="heading-wrapper">
        <h3 id="snazzy-gradient-hover-on-site-title">Snazzy gradient hover on site title
      </h3>
        <a class="anchor-link" href="https://danabyerly.com/articles/finally-a-new-site/#snazzy-gradient-hover-on-site-title">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p><a href="https://fossheim.io/writing/posts/css-text-gradient/">This post by Sarah Fossheim</a> was straightforward and useful, especially since gradients are one of the things in CSS that don’t come easy to me.</p>

      <div class="heading-wrapper">
        <h3 id="creating-the-all-tags-page">Creating the All Tags page
      </h3>
        <a class="anchor-link" href="https://danabyerly.com/articles/finally-a-new-site/#creating-the-all-tags-page">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>This is one of those “there are several ways to solve this problem” items. This <a href="https://github.com/11ty/eleventy/issues/927">discussion at GitHub was very useful</a>. I ended up <a href="https://github.com/11ty/eleventy/issues/927#issuecomment-585539708">using one from this example</a> with a few small modifications. It didn’t require creating a filter or a tag list collection (check the <a href="https://github.com/11ty/eleventy-base-blog">Eleventy Base Blog starter project</a> for that approach!).</p>
<p>One thing to note about the approach I took is that collections show up in this list in addition to tags. That ended up being OK for me, but if you want more control the Base Blog approach is probably better for you.</p>
<p>Here’s what I used, which <a href="https://danabyerly.com/tags-all/">resulted in this</a>.</p>
<pre class="language-html"><code class="language-html"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>ul</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>flow-0<span class="token punctuation">"</span></span><span class="token punctuation">></span></span><br />{% for tag, posts in collections | dictsort %}<br />{% set tagUrl %}/tag/{{ tag | replace(' ', '-') }}/{% endset %}<br />  <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>li</span><span class="token punctuation">></span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>a</span> <span class="token attr-name">href</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>{{ tagUrl }}<span class="token punctuation">"</span></span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>tag-cap<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>{{ tag }}<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>a</span><span class="token punctuation">></span></span> ({{ posts | length }})<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>li</span><span class="token punctuation">></span></span><br />{% endfor %}<br /><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>ul</span><span class="token punctuation">></span></span></code></pre>
<p>I also <a href="http://dirtystylus.com/2020/09/01/eleventy-tag-list-sorting-and-post-count/">noticed this article</a> earlier in the week with a similar approach to the Base Blog.</p>

      <div class="heading-wrapper">
        <h3 id="applying-an-active-style-to-current-nav-item">Applying an “active” style to current nav item
      </h3>
        <a class="anchor-link" href="https://danabyerly.com/articles/finally-a-new-site/#applying-an-active-style-to-current-nav-item">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>In <a href="https://piccalil.li/course/learn-eleventy-from-scratch/">Learn Eleventy from Scratch</a> there’s a <a href="https://piccalil.li/course/learn-eleventy-from-scratch/lesson/7/">nice approach</a> to navigation that uses a <a href="https://www.11ty.dev/docs/data-global/">global data file</a> and a little bit of Javascript to apply an “active” style to the current page or pages within a section, such as posts within the Articles section.</p>
<p>Initially I was going to have only one collection for writing and I was not going to use tags in project posts. Using this approach all the tags would’ve been for things in the Writing section, and I wanted to apply the “active” style to the Writing nav item when viewing a tag listing page. For example on the listing page for <a href="https://danabyerly.com/tag/eleventy/">all the posts tagged “Eleventy”</a> the Writing navigation item would have the “active” style.</p>
<p>This was just beyond my grasp with the global data and JS approach! Luckily <a href="https://bryanlrobinson.com/blog/using-nunjucks-if-expressions-to-create-an-active-navigation-state-in-11ty/">I had saved this article</a> by Bryan Robinson. It took a different approach to creating the navigation that helped me  to do exactly what I wanted.</p>
<p>As it turns out I now have two writing collections and am using tags in project posts, so that approach no longer makes sense, so I’m back to the data file and JS solution, but it was still a very useful post!</p>

      <div class="heading-wrapper">
        <h3 id="making-paired-shortcodes">Making paired shortcodes
      </h3>
        <a class="anchor-link" href="https://danabyerly.com/articles/finally-a-new-site/#making-paired-shortcodes">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>This <a href="https://www.youtube.com/watch?v=nUlB8SR039w">straightforward five minute video</a> by Alex Carpenter will have you making <a href="https://www.11ty.dev/docs/shortcodes/#paired-shortcodes">paired shortcodes</a> in no time. This was very useful to me, and I probably went a little paired shortcode mad with five and counting. I guess I’ll see if I really use them all.</p>

      <div class="heading-wrapper">
        <h3 id="responsive-images">Responsive images
      </h3>
        <a class="anchor-link" href="https://danabyerly.com/articles/finally-a-new-site/#responsive-images">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>I dipped my toes in the srcset waters and <a href="https://cloudfour.com/thinks/responsive-images-the-simple-way/">this easy to understand explainer from Cloud 4</a> helped immensely. At first I manually produced the different sizes, which was kind of a mistake and I think lead to some Lighthouse dings, but I redid them <a href="https://www.responsivebreakpoints.com/">using this resource</a> listed in the article and that helped. I probably still need to work on the images, and I might bite the bullet and use Cloudinary or Imgix, but this article was the most helpful one I found in terms of quickly ramping up.</p>

      <div class="heading-wrapper">
        <h3 id="limiting-number-of-posts-displayed-on-a-page">Limiting number of posts displayed on a page
      </h3>
        <a class="anchor-link" href="https://danabyerly.com/articles/finally-a-new-site/#limiting-number-of-posts-displayed-on-a-page">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>This is another one that can be accomplished in multiple ways. I ended up using the filter that <a href="https://stylestage.dev/">Style Stage</a> by Stephanie Eckles  is using (hoping to contribute there eventually!). When I was trying to think of examples I remembered that Style Stage shows three featured contributions and sure enough that solution was the most direct and easy to understand of all the ones I found, which was no surprise <a href="https://moderncss.dev/">considering Stephanie’s writing</a>!</p>
<p>In the <code>module.exports</code> section of your .eleventy.js file add…</p>
<pre class="language-js"><code class="language-js">eleventyConfig<span class="token punctuation">.</span><span class="token function">addFilter</span><span class="token punctuation">(</span><span class="token string">'limit'</span><span class="token punctuation">,</span> <span class="token keyword">function</span> <span class="token punctuation">(</span><span class="token parameter">arr<span class="token punctuation">,</span> limit</span><span class="token punctuation">)</span> <span class="token punctuation">{</span><br />  <span class="token keyword">return</span> arr<span class="token punctuation">.</span><span class="token function">slice</span><span class="token punctuation">(</span><span class="token number">0</span><span class="token punctuation">,</span> limit<span class="token punctuation">)</span><span class="token punctuation">;</span><br /><span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span></code></pre>
<p>And then to display a limited amount of posts from a collection, use this…</p>
<pre class="language-css"><code class="language-css"><span class="token punctuation">{</span>% for item in collections.writing  | <span class="token function">limit</span><span class="token punctuation">(</span>2<span class="token punctuation">)</span> %<span class="token punctuation">}</span><br /> <span class="token selector">... your template code here ...</span><br /><span class="token punctuation">{</span>% endfor %<span class="token punctuation">}</span></code></pre>
<p>I’m using this on my homepage to display what’s in the Recent Writing section.</p>

      <div class="heading-wrapper">
        <h3 id="additional-eleventy-resources">Additional Eleventy resources
      </h3>
        <a class="anchor-link" href="https://danabyerly.com/articles/finally-a-new-site/#additional-eleventy-resources">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>There are plenty of great resources to help you get started with Eleventy, and new one seem to pop-up all the time!</p>
<p><a href="https://tatianamac.com/tags/Eleventy/">Tatiana Mac’s Beginner’s Guide to Eleventy</a> starts with “What is a static site generator?” and not only explains it in detail, but lays out the pros and cons. This sort of detail and approach is both beginner-friendly and hard to find. It’s going to be a four part series and currently the first two parts are available, keep an eye on this one!</p>
<p>If you’re looking to create a community-driven site <a href="https://css-tricks.com/a-community-driven-site-with-eleventy-building-the-site/">Stephanie Eckles has a useful post at CSS Tricks</a>. Looking to accept submissions for your site? This will help you.</p>
<p>Here’s one that just popped up this week, <a href="https://www.notion.so/How-the-heck-do-I-use-Eleventy-The-intro-guide-I-wish-I-had-ef349def783247dca7f65e33b780288e">billed as “The intro guide I wished I had”</a> by Julius Tarng and geared towards a conceptual understanding of how Eleventy works. It’s also got a lot of hands-on examples and illustrations to help get you started.</p>

      <div class="heading-wrapper">
        <h2 id="whats-next">What’s Next?
      </h2>
        <a class="anchor-link" href="https://danabyerly.com/articles/finally-a-new-site/#whats-next">
          <span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2.5" stroke="var(--heading-small)" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <line x1="5" y1="9" x2="19" y2="9"></line>
    <line x1="5" y1="15" x2="19" y2="15"></line>
    <line x1="11" y1="4" x2="7" y2="20"></line>
    <line x1="17" y1="4" x2="13" y2="20"></line>
</svg></span>
          <span class="visually-hidden">(permalink)</span>
        </a>
      </div><p>Here are a few of the things I’m plan on working on around here…</p>
<ul>
<li>Adding a dark mode for the <code>prefers-color-scheme: dark</code> among you</li>
<li>Adding ability to toggle between dark and light mode</li>
<li>Tightening up the CSS</li>
<li>Improving accessibility</li>
<li>Maybe expanding the color palette a bit</li>
<li>Depending on the volume and type of writing I end up doing I might make individual feeds for <a href="https://danabyerly.com/articles">Articles</a> and <a href="https://danabyerly.com/notes/">Notes</a></li>
<li>Add more details to some of the <a href="https://danabyerly.com/projects/">Projects</a></li>
<li>Maybe eventually add a Photos section</li>
<li>Add release notes</li>
<li>Keep on fiddling!</li>
</ul>

      ]]></content>
    </entry>
	
    
    <entry>
      <title>Using Eleventy data files for frequently used links</title>
      <link href="https://danabyerly.com/notes/using-eleventy-data-files-for-frequently-used-links/"/>
      <updated>2020-09-05T00:00:00Z</updated>
      <id>https://danabyerly.com/notes/using-eleventy-data-files-for-frequently-used-links/</id>
      <content type="html"><![CDATA[
        <p><a href="https://chriskirknielsen.com/blog/building-and-maintaining-components-from-utility-classes-in-eleventy/">This useful post on maintaining utility class components</a> recently made its way into my timeline, inspiring me to write up a similar approach I used to make maintaining this site a little easier.</p>
<p>One of the fun things about creating this site was playing with different approaches, especially with regard to data. In <a href="https://piccalil.li/course/learn-eleventy-from-scratch/">Learn Eleventy from Scratch</a> there are several useful examples of how to push the envelope with <a href="https://learneleventyfromscratch.com/lesson/4.html">front matter</a>, <a href="https://learneleventyfromscratch.com/lesson/7.html">data files</a> and <a href="https://learneleventyfromscratch.com/lesson/9.html">remote data</a>. This helped me keep those ideas in mind as I played around with how to build this site.</p>
<p>As I was writing up the <a href="https://danabyerly.com/projects/">Projects</a> section it didn’t take long to realize that I was going to be referencing my go-to tools like <a href="https://airtable.com/">Airtable</a> frequently, so using <a href="https://www.11ty.dev/docs/data-global/">Eleventy’s handy global data</a> feature I created a tools.json file in the _data directory.</p>
<p>Here’s what’s in tools.json:</p>
<pre class="language-json"><code class="language-json"><span class="token punctuation">{</span><br />  <span class="token property">"airtable"</span><span class="token operator">:</span> <span class="token string">"https://airtable.com/"</span><span class="token punctuation">,</span><br />  <span class="token property">"11ty"</span><span class="token operator">:</span> <span class="token string">"https://www.11ty.dev/"</span><span class="token punctuation">,</span><br />  <span class="token property">"feedly"</span><span class="token operator">:</span> <span class="token string">"https://feedly.com/"</span><span class="token punctuation">,</span><br />  <span class="token property">"googleCharts"</span><span class="token operator">:</span> <span class="token string">"https://developers.google.com/chart/"</span><span class="token punctuation">,</span><br />  <span class="token property">"netlify"</span><span class="token operator">:</span> <span class="token string">"https://netlify.com"</span><span class="token punctuation">,</span><br />  <span class="token property">"notion"</span><span class="token operator">:</span> <span class="token string">"https://www.notion.so/"</span><span class="token punctuation">,</span><br />  <span class="token property">"piccalilli"</span><span class="token operator">:</span> <span class="token string">"https://piccalil.li/"</span><span class="token punctuation">,</span><br />  <span class="token property">"pinboard"</span><span class="token operator">:</span> <span class="token string">"http://pinboard.in/"</span><span class="token punctuation">,</span><br />  <span class="token property">"sergey"</span><span class="token operator">:</span> <span class="token string">"https://sergey.cool"</span><span class="token punctuation">,</span><br />  <span class="token property">"sheety"</span><span class="token operator">:</span> <span class="token string">"https://sheety.co/"</span><span class="token punctuation">,</span><br />  <span class="token property">"standardNotes"</span><span class="token operator">:</span> <span class="token string">"https://standardnotes.org/"</span><span class="token punctuation">,</span><br />  <span class="token property">"trello"</span><span class="token operator">:</span> <span class="token string">"https://trello.com"</span><span class="token punctuation">,</span><br />  <span class="token property">"vue"</span><span class="token operator">:</span> <span class="token string">"https://vuejs.org/"</span><br /><span class="token punctuation">}</span></code></pre>
<p>And here’s a sample paragraph in the markdown file from the <a href="https://danabyerly.com/projects/horse-racing-datasets/">Horse Racing Datasets</a> project page:</p>
<pre class="language-md"><code class="language-md">In 2018 I migrated it to [Airtable]({{ tools.airtable }}) and [Vue]({{ tools.vue }}) leaving the original design mostly intact...</code></pre>
<p>This was an excellent time and annoyance saver! I also created a json file for links to my various accounts, as well as one to manage projects on landing pages, more on that one later.</p>
<p>In the meantime if there’s anything you reference with regularity, storing it in a json file in your _data directory can make things a little easier!</p>

      ]]></content>
    </entry>
	
</feed>
