<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/"  xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>Adactio: Journal</title>
        <description>The online journal of Jeremy Keith, an author and web developer living and working in Brighton, England.</description>
        <language>en</language>
        <link>https://adactio.com/journal/</link>
        <managingEditor>jeremy@adactio.com (Jeremy Keith)</managingEditor>
        <webMaster>jeremy@adactio.com (Jeremy Keith)</webMaster>
        <image>
            <title>Adactio: Journal</title>
            <link>https://adactio.com/journal/</link>
            <url>https://adactio.com/images/rssbutton.gif</url>
            <width>88</width>
            <height>19</height>
        </image>
        <atom:link href="https://adactio.com/journal/rss" rel="self" type="application/rss+xml" />
        <item>
            <title>Someday</title>
            <link>https://adactio.com/journal/11274</link>
            <description>
<![CDATA[
<p>In <a href="http://us4.campaign-archive2.com/?u=559bc631fe5294fc66f5f7f89&amp;id=8f68160ba6">the latest issue</a> of Justin&#8217;s excellent <a href="http://responsivedesign.is/">Responsive Web Design</a> weekly newsletter, he includes a segment called &#8220;The Snippet Show&#8221;:</p>

<blockquote>
  <p>This is what tells all our browsers on all our devices to set the viewport to be the same width of the current device, and to also set the initial scale to 1 (not scaled at all). This essentially allows us to have responsive design consistently.</p>
</blockquote>

<pre><code>&lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt;
</code></pre>

<p>The <code>viewport</code> value for the <code>meta</code> element was invented by Apple when the iPhone was released. Back then, it was a safe bet that most websites were wider than the iPhone&#8217;s 320 pixel wide display—most of them were 960 pixels wide &#8230;because reasons. So mobile Safari would automatically shrink those sites down to fit within the display. If you wanted to over-ride that behaviour, you had to use the <code>meta viewport</code> gubbins that they made up.</p>

<p>That was nine years ago. These days, if you&#8217;re building a responsive website, you <em>still</em> need to include that <code>meta</code> element.</p>

<p>That seems like a shame to me. I&#8217;m not suggesting that the default behaviour should switch to assuming a fluid layout, but maybe the browser could just figure it out. After all, the CSS will already be parsed by the time the HTML is rendering. Perhaps a quick test for the presence of a <a href="https://adactio.com/journal/1559/">crawlbar</a> could be used to trigger the shrinking behaviour. No crawlbar, no shrinking.</p>

<p>Maybe someday the assumption behind the current behaviour <em>could</em> be flipped—assume a website is responsive unless the author explicitly requests the shrinking behaviour. I&#8217;d like to think that could happen soon, but I suspect that a depressingly large number of sites are still fixed-width (I don&#8217;t even want to know—don&#8217;t tell me).</p>

<p>There are other browser default behaviours that might someday change. Right now, if I type <code>example.com</code> into a browser, it will first attempt to contact <code>http://example.com</code> rather than <code>http<strong>s</strong>://example.com</code>. That means the <code>example.com</code> server has to do a redirect, costing the user valuable time.</p>

<p>You can mitigate this by putting your site on <a href="https://hstspreload.appspot.com/">the HSTS preload list</a> but wouldn&#8217;t it be nice if browsers first checked for <code>HTTPS</code> instead of <code>HTTP</code>? I don&#8217;t think that will happen anytime soon, but someday &#8230;someday.</p>

]]>
            </description>
            <pubDate>Fri, 30 Sep 2016 17:22:42 GMT</pubDate>
            <guid>https://adactio.com/journal/11274</guid>
            <category>browsers</category>
            <category>responsive</category>
            <category>design</category>
            <category>mobile</category>
            <category>https</category>
            <category>tls</category>
            <category>hsts</category>
            <category>security</category>
            <category>iphone</category>
            <category>meta</category>
            <category>viewport</category>
            <category>frontend</category>
            <category>development</category>
            <category>medium:id=850d3ead1dc0</category>
        </item>
        <item>
            <title>Indie Web Camp Brighton 2016</title>
            <link>https://adactio.com/journal/11246</link>
            <description>
<![CDATA[
<p><a href="https://indieweb.org/2016/Brighton">Indie Web Camp Brighton 2016</a> is done and dusted. It&#8217;s hard to believe that it&#8217;s already in its fifth(!) year. As with previous years, it was a lot of fun.</p>

<p><a href="https://www.flickr.com/photos/tollwerk/sets/72157674218415016/"><img src="https://farm8.staticflickr.com/7523/29914346995_806f4746bc_z_d.jpg" alt="IndieWebCampBrighton2016"></a></p>

<p>The first day—<a href="https://indieweb.org/2016/Brighton/Schedule">the discussions day</a>—covered a lot of topics. I led a session on service workers, where we brainstormed <a href="https://etherpad.indieweb.org/serviceworkers">offline and caching strategies</a> for personal websites.</p>

<p>There was a design session <a href="https://indieweb.org/2016/Brighton/beyondstreams">looking at alternatives</a> to simply presenting everything in a stream. Some great ideas came out of that. And there was a session all about <a href="https://indieweb.org/2016/Brighton/indiebookmarks">bookmarking and linking</a>. That one really got my brain whirring with ideas for the second day—the making/coding day.</p>

<p>I&#8217;ve learned from previous Indie Web Camps that a good strategy for the second day is to have two tasks to tackle: one that&#8217;s really easy (so you&#8217;ve at least got that to demo at the end), and one that&#8217;s more ambitious. This time, I put together a list of potential goals, and then ordered them by difficulty. By the end of the day, I managed to get a few of them done.</p>

<p>First off, I added a small bit of code to my bookmarking flow, so that any time <a href="https://adactio.com/links">I link to something</a>, I send a ping to the Internet Archive to grab a copy of that URL. So here&#8217;s <a href="https://adactio.com/links/11240">a link I bookmarked</a> to <a href="https://remysharp.com/2016/09/13/first-impressions-of-react">one of Remy&#8217;s blog posts</a>, and <a href="https://web.archive.org/web/*/https://remysharp.com/2016/09/13/first-impressions-of-react">here it is in the Wayback Machine</a>—see how the date of storage matches the date of my link.</p>

<p>The code to do that was pretty straightforward. I needed to hit this endpoint:</p>

<pre><code>http://web.archive.org/save/{url}
</code></pre>

<p>I also updated my bookmarklet for posting links so that, if I&#8217;ve highlighted any text on the page I&#8217;m linking to, that text is automatically pasted in to the description.</p>

<p>I tweaked my webmentions a bit so that if I receive a webmention that has a type of <code>bookmark-of</code>, that is displayed differently to a comment, or a like, or a share. <a href="https://adactio.com/articles/9843#comment37529">Here&#8217;s an example</a> of <a href="https://aaronparecki.com/2016/09/25/18/">Aaron bookmarking one of my articles</a>.</p>

<p>The more ambitious plan was to create an over-arching <code>/tags</code> area for my site. I already have tag-based navigation for <a href="https://adactio.com/journal">my journal</a> and <a href="https://adactio.com/links">my links</a>:</p>

<ul>
<li><a href="https://adactio.com/journal/tags/indieweb">https://adactio.com/journal/tags/indieweb</a></li>
<li><a href="https://adactio.com/links/tags/indieweb">https://adactio.com/links/tags/indieweb</a></li>
</ul>

<p>But until this weekend, I didn&#8217;t have the combined view:</p>

<ul>
<li><a href="https://adactio.com/tags/indieweb">https://adactio.com/tags/indieweb</a></li>
</ul>

<p>I didn&#8217;t get around to adding pagination. That&#8217;s something I should definitely add, because some of those pages get veeeeery long. But I did spend some time adding sparklines. They can be quite revealing, especially on topics that were hot ten years ago, but have faded over time, or topics that have becoming more and more popular with each year.</p>

<p>All in all, a very productive weekend.</p>

]]>
            </description>
            <pubDate>Mon, 26 Sep 2016 10:17:03 GMT</pubDate>
            <guid>https://adactio.com/journal/11246</guid>
            <category>indieweb</category>
            <category>brighton</category>
            <category>indiewebcamp</category>
            <category>event</category>
            <category>publishing</category>
            <category>hacking</category>
            <category>making</category>
            <category>medium:id=626916ed07e6</category>
        </item>
        <item>
            <title>European tour</title>
            <link>https://adactio.com/journal/11135</link>
            <description>
<![CDATA[
<p>I&#8217;m recovering from an illness that laid me low a few weeks back. I had a nasty bout of man-flu which then led to a chest infection for added coughing action. I&#8217;m much better now, but alas, this illness meant I had to cancel my trip to Chicago for <a href="http://aneventapart.com/event/chicago-2016">An Event Apart</a>. I felt very bad about that. Not only was I reneging on a commitment, but I also missed out on an opportunity to revisit a beautiful city. But it was for the best. If I had gone, I would have spent nine hours in an airborne metal tube breathing recycled air, and then stayed in a hotel room with that special kind of air conditioning that hotels have that always seem to give me the sniffles.</p>

<p>Anyway, no point regretting a trip that didn&#8217;t happen—time to look forward to my next trip. I&#8217;m about to embark on a little mini tour of some lovely European cities:</p>

<ul>
<li>Tomorrow I travel to Stockholm for <a href="http://nordicjs.com/">Nordic.js</a>. I&#8217;ve never been to Stockholm. In fact I&#8217;ve only stepped foot in Sweden on a day trip to Malmö to hang out with <a href="https://thatemil.com/">Emil</a>. I&#8217;m looking forward to exploring all that Stockholm has to offer.</li>
<li>On Saturday I&#8217;ll go straight from Stockholm to Berlin for the <a href="https://viewsourceconf.org/berlin-2016/">View Source</a> event organised by Mozilla. Looks like I&#8217;ll be staying in the east, which isn&#8217;t a part of the city I&#8217;m familiar with. Should be fun.</li>
<li>Alas, I&#8217;ll have to miss out on the final day of View Source, but with good reason. I&#8217;ll be heading from Berlin to Bologna for the excellent <a href="https://2016.fromthefront.it/">From The Front</a> conference. Ah, I remember <a href="https://adactio.com/journal/4917">being at the very first one</a> five years ago! I&#8217;ve made it back every second year since—I don&#8217;t need much of an excuse to go to Bologna, one of my favourite places &#8230;mostly <a href="http://principiagastronomica.com/post/32">because of the food</a>.</li>
</ul>

<p>The only downside to leaving town for this whirlwind tour is that there won&#8217;t be a <a href="https://indieweb.org/events/2016-09-07-homebrew-website-club">Brighton Homebrew Website Club</a> tomorrow. I feel bad about that—I had to cancel the one two weeks ago because I was too sick for it.</p>

<p>But on the plus side, when I get back, it won&#8217;t be long until <a href="https://indieweb.org/2016/Brighton">Indie Web Camp Brighton</a> on Saturday, September 24th and Sunday, September 25th. If you haven&#8217;t been to an Indie Web Camp before, you should really come along—it&#8217;s for anyone who has their own website, or wants to have their own website. If you <em>have</em> been to an Indie Web Camp before, you don&#8217;t need me to convince you to come along; you already know how good it is.</p>

<p><a href="https://ti.to/clearleft/indie-web-camp-brighton-2016">Sign up for Indie Web Camp Brighton here</a>. It&#8217;s free and it&#8217;s a lot of fun.</p>

<blockquote>
  <p>The importance of owning your data is getting more awareness. To grow it and help people get started, we&#8217;re meeting for a bar-camp like collaboration in Brighton for two days of brainstorming, working, teaching, and helping.</p>
</blockquote>

]]>
            </description>
            <pubDate>Tue, 06 Sep 2016 16:48:44 GMT</pubDate>
            <guid>https://adactio.com/journal/11135</guid>
            <category>travel</category>
            <category>conference</category>
            <category>indiewebcamp</category>
            <category>brighton</category>
            <category>indieweb</category>
            <category>stockholm</category>
            <category>berlin</category>
            <category>bologna</category>
            <category>speaking</category>
            <category>medium:id=417384bec25f</category>
        </item>
        <item>
            <title>The imitation game</title>
            <link>https://adactio.com/journal/11130</link>
            <description>
<![CDATA[
<p>Jason shared <a href="https://cloudfour.com/thinks/designing-responsive-progressive-web-apps/">some thoughts on designing progressive web apps</a>. One of the things he&#8217;s pondering is how much you should try make your web-based offering look and feel like a native app.</p>

<p>This was prompted by an article by <a href="http://www.owencampbellmoore.com/">Owen Campbell-Moore</a> over on Ev&#8217;s blog called <a href="https://medium.com/@owencm/designing-great-uis-for-progressive-web-apps-dd38c1d20f7"><cite>Designing Great UIs for Progressive Web Apps</cite></a>. He begins with this advice:</p>

<blockquote>
  <p>Start by forgetting everything you know about conventional web design, and instead imagine you’re actually designing a native app.</p>
</blockquote>

<p>This makes me squirm. I mean, I&#8217;m all for borrowing good ideas from other media—native apps, TV, print—but I don&#8217;t think that inspiration should mean imitation. For me, that always results in an interface that sits in a kind of uncanny valley of being almost—but not quite—like the thing it&#8217;s imitating.</p>

<p>With that out of the way, most of the recommendations in Owen&#8217;s article are sensible ideas about animation, input, and feedback. But then there&#8217;s recommendation number eight: <cite>Provide an easy way to share content</cite>:</p>

<blockquote>
  <p>PWAs are often shown in a context where the current URL isn’t easily accessible, so it is important to ensure the user can easily share what they’re currently looking at. Implement a share button that allows users to copy the URL to the clipboard, or share it with popular social networks.</p>
</blockquote>

<p>See, when a developer has to implement a feature that the browser should be providing, that seems like a bad code smell to me. This is a problem that <a href="https://dev.opera.com/blog/pwa-badge-pop/">Opera is solving</a> (and Google says it is solving, while meanwhile <a href="https://adactio.com/journal/10708">penalising developers who expose the URL to end users</a>).</p>

<p>Anyway, I think my squeamishness about all the advice to imitate native apps is because it feels like a <a href="https://en.wikipedia.org/wiki/Cargo_cult">cargo cult</a>. There seems to be an inherent assumption that native is intrinsically &#8220;better&#8221; than the web, and that the only way that the web can &#8220;win&#8221; is to match native apps note for note. But that misses out on all the things that only the web can do—instant distribution, low-friction sharing, and the ability to link to any other resource on the web (and be linked to in turn). Turning our beautifully-networked nodes into standalone silos just because that&#8217;s the way that native apps have to work feels like the cure that kills the patient.</p>

<p>If anything, my advice for building a progressive web app would be the exact opposite of Owen&#8217;s: don&#8217;t forget everything you&#8217;ve learned about web design. In my opinion, the term &#8220;progressive web app&#8221; can be read in order of priority:</p>

<ol>
<li><strong>Progressive</strong>—build in a layered way so that anyone can access your content, regardless of what device or browser they&#8217;re using, rewarding the more capable browsers with more features.</li>
<li><strong>Web</strong>—you&#8217;re building for the web. Don&#8217;t lose sight of that. URLs matter. Accessibility matters. Performance matters.</li>
<li><strong>App</strong>—sure, borrow what works from native apps if it makes sense for your situation.</li>
</ol>

<p>Jason asks questions about how your progressive web app will behave when it&#8217;s added to the home screen. <a href="https://cloudfour.com/thinks/designing-responsive-progressive-web-apps/#1-how-much-do-you-match-the-platform">How much do you match the platform?</a> <a href="https://cloudfour.com/thinks/designing-responsive-progressive-web-apps/#2-how-do-you-manage-going-chromeless">How do you manage going chromeless?</a> And the big one: <a href="https://cloudfour.com/thinks/designing-responsive-progressive-web-apps/#the-key-unanswered-question">what do users expect?</a></p>

<blockquote>
  <p>Will people expect an experience that maps to native conventions? Or will they be more accepting of deviation because they came to the app via the web and have already seen it before installing it?</p>
</blockquote>

<p>These are good questions and I share Jason&#8217;s hunch:</p>

<blockquote>
  <p>My gut says that we can build great experiences without having to make it feel exactly like an iOS or Android app because people will have already experienced the Progressive Web App multiple times in the browser before they are asked to install it.</p>
</blockquote>

<p>In all the messaging from Google about progressive web apps, there&#8217;s a real feeling that the ability to install to—and launch from—the home screen is a real game changer. I&#8217;m not so sure that we should be betting the farm on that feature (the offline possibilities opened up by service workers feel like more of a game-changer to me).</p>

<p>People have been gleefully passing around the statistic that the average number of native apps installed per month is zero. So how exactly will we measure the success of progressive web apps against native apps …when the average number of progressive web apps installed per month is zero?</p>

<p>I like Android&#8217;s <a href="https://adactio.com/journal/9814">add-to-home-screen algorithm</a> (although <a href="https://adactio.com/journal/10708">it needs tweaking</a>). It&#8217;s a really nice carrot to reward the best websites with. But let&#8217;s not carried away. I think that most people are <em>not</em> going to click that &#8220;add to home screen&#8221; prompt. Let&#8217;s face it, we&#8217;ve trained people to ignore prompts like that. When someone is trying to find some information or complete a task, a prompt that pops up saying &#8220;sign up to our newsletter&#8221; or &#8220;download our native app&#8221; or &#8220;add to home screen&#8221; is a distraction to be dismissed. The fact that only the third example is initiated by the operating system, rather than the website, is irrelevant to the person using the website.</p>

<p><a href="https://adactio.com/notes/10768">
<picture>
<source media="all and (min-width: 65em)" srcset="https://adactio.com/images/uploaded/10768/large.jpg">
<source media="all and (min-width: 27em)" srcset="https://adactio.com/images/uploaded/10768/medium.jpg, https://adactio.com/images/uploaded/10768/large.jpg 1.25x">
<img class="u-photo" src="https://adactio.com/images/uploaded/10768/small.jpg" srcset="https://adactio.com/images/uploaded/10768/medium.jpg 1.5x, https://adactio.com/images/uploaded/10768/large.jpg 2.5x" alt="Getting the “add to home screen” prompt for https://huffduffer.com/ on Android Chrome.">
</picture>
</a></p>

<p>My hunch is that the majority of people will still interact with your progressive web app via a regular web browser view. If, then, only a minority of people are going to experience your site launched from the home screen in a native-like way, I don&#8217;t think it makes sense to prioritise that use case.</p>

<p>The great thing about progressive web apps is that they are first and foremost websites. Literally <em>everyone</em> who interacts with your progressive web app is first going to do so the old-fashioned way, by following a link or typing in a URL. They <em>may</em> later add it to their home screen, but that&#8217;s just a bonus. I think it&#8217;s important to build progressive web apps accordingly—don&#8217;t pretend that it&#8217;s just like building a native app just because some people will be visiting via the home screen.</p>

<p>I&#8217;m worried that developers are going to think that progressive web apps are something that need to built from scratch; that you have to start with a blank slate and build something new in a completely new way. Now, there are some good examples of these kind of one-off progressive web apps—<a href="https://www.theguardian.com/info/developer-blog/2016/aug/19/how-we-made-the-riorun-progressive-web-app">The Guardian&#8217;s RioRun</a> is nicely done. But I don&#8217;t think that the majority of progressive web apps should fall into that category. There&#8217;s nothing to stop you taking an existing website and transforming it step-by-step into a progressive web app:</p>

<ol>
<li>Switch over to HTTPS if you aren&#8217;t already.</li>
<li>Use a service worker, even if it&#8217;s just to provide a custom offline page and cache some static assets.</li>
<li>Make a manifest file to point to an icon and specify some colours.</li>
</ol>

<p>See? Not exactly a paradigm shift in how you approach building for the web &#8230;but those deceptively straightforward steps will really turbo-boost your site.</p>

<p>I&#8217;m really excited about progressive web apps &#8230;but mostly for the &#8220;progressive&#8221; and &#8220;web&#8221; parts. Maybe I&#8217;ll start calling them progressive web sites. Or <a href="https://adactio.com/journal/6246/">progressive web thangs</a>.</p>

]]>
            </description>
            <pubDate>Mon, 05 Sep 2016 12:24:24 GMT</pubDate>
            <guid>https://adactio.com/journal/11130</guid>
            <category>progressive</category>
            <category>webapps</category>
            <category>pwas</category>
            <category>native</category>
            <category>interface</category>
            <category>browsers</category>
            <category>serviceworkers</category>
            <category>google</category>
            <category>mobile</category>
            <category>ui</category>
            <category>design</category>
            <category>frontend</category>
            <category>development</category>
            <category>medium:id=56544ebd90d0</category>
        </item>
        <item>
            <title>Marking up help text in forms</title>
            <link>https://adactio.com/journal/11109</link>
            <description>
<![CDATA[
<p><a href="http://zomigi.com/">Zoe</a> asked a question on Twitter recently:</p>

<blockquote class="twitter-tweet" data-lang="en"><p lang="en" dir="ltr"><a href="https://twitter.com/hashtag/a11y?src=hash">#a11y</a> folks: Is it still best to put form field instruction/help text inside the &lt;label&gt;, or is aria-describedby sufficient nowadays?</p>&mdash; Zoe M. Gillenwater (@zomigi) <a href="https://twitter.com/zomigi/status/766264402152558593">August 18, 2016</a></blockquote>

<p>&#8216;Sfunny—I had been pondering this exact question. In fact, <a href="https://codepen.io/adactio/pen/jAXyxP">I threw a CodePen together</a> a couple of weeks ago.</p>

<div class="embed"><iframe height="433" scrolling="no" src="https://codepen.io/adactio/embed/jAXyxP/?height=433&amp;theme-id=0&amp;default-tab=html,result&amp;embed-version=2" style="width: 100%;">See the Pen <a href="https://codepen.io/adactio/pen/jAXyxP/">Form field accessibility question</a> by Jeremy Keith (<a href="https://codepen.io/adactio">@adactio</a>) on <a href="https://codepen.io">CodePen</a>.
</iframe></div>

<p>Visually, both examples look the same; there&#8217;s a label, then a form field, then some extra text (in this case, a validation message).</p>

<p>The first example puts the validation message in an <code>em</code> element inside the <code>label</code> text itself, so I know it won&#8217;t be missed by a screen reader—I think I first learned this technique from <a href="http://simplyaccessible.com/">Derek</a> many years ago.</p>

<pre><code>&lt;div class="first error example"&gt;
 &lt;label for="firstemail"&gt;Email
&lt;em class="message"&gt;must include the @ symbol&lt;/em&gt;
 &lt;/label&gt;
 &lt;input type="email" id="firstemail" placeholder="e.g. you@example.com"&gt;
&lt;/div&gt;
</code></pre>

<p>The second example puts the validation message after the form field, but uses <code>aria-describedby</code> to explicitly associate that message with the form field—this means the message should be read after the form field.</p>

<pre><code>&lt;div class="second error example"&gt;
 &lt;label for="secondemail"&gt;Email&lt;/label&gt;
 &lt;input type="email" id="secondemail" placeholder="e.g. you@example.com" aria-describedby="seconderror"&gt;
 &lt;em class="message" id="seconderror"&gt;must include the @ symbol&lt;/em&gt;
&lt;/div&gt;
</code></pre>

<p>In both cases, the validation message won&#8217;t be missed by screen readers, although there&#8217;s a slight difference in the order in which things get read out. In the first example we get:</p>

<ol>
<li>Label text,</li>
<li>Validation message,</li>
<li>Form field.</li>
</ol>

<p>And in the second example we get:</p>

<ol>
<li>Label text,</li>
<li>Form field,</li>
<li>Validation message.</li>
</ol>

<p>In this particular example, the ordering in the second example more closely matches the visual representation, although I&#8217;m not sure how much of a factor that should be in choosing between the options.</p>

<p>Anyway, I was wondering whether one of these two options is &#8220;better&#8221; or &#8220;worse&#8221; than the other. I suspect that there isn&#8217;t a hard and fast answer.</p>

]]>
            </description>
            <pubDate>Wed, 24 Aug 2016 13:44:41 GMT</pubDate>
            <guid>https://adactio.com/journal/11109</guid>
            <category>html</category>
            <category>markup</category>
            <category>accessibility</category>
            <category>a11y</category>
            <category>forms</category>
            <category>aria</category>
            <category>medium:id=9d69548237</category>
        </item>
        <item>
            <title>Why do pull quotes exist on the web?</title>
            <link>https://adactio.com/journal/11102</link>
            <description>
<![CDATA[
<p>There you are reading an article when suddenly it’s interrupted by a big piece of text that’s repeating something you just read in the previous paragraph. Or it’s interrupted by a big piece of text that’s spoiling a sentence that you are about to read in subsequent paragraphs.</p>

<blockquote><h3>There you are reading an article when suddenly it’s interrupted by a big piece of text that’s repeating something you just read in the previous paragraph.</h3></blockquote>

<p>To be honest, I find <a href="https://en.wikipedia.org/wiki/Pull_quote">pull quotes</a> pretty annoying in printed magazines too, but I can at least see the justification for them there: if you’re flipping through a magazine, they act as eye-catching inducements to stop and read (in much the same way that good photography does or illustration does). But once you’re actually reading an article, they’re incredibly frustrating.</p>

<blockquote><h3>You either end up learning to blot them out completely, or you end up reading the same sentence twice.</h3></blockquote>

<p>You either end up learning to blot them out completely, or you end up reading the same sentence twice. Blotting them out is easier said than done on a small-screen device. At least on a large screen, pull quotes can be shunted off to the side, but on handheld devices, pull quotes really make no sense at all.</p>

<p>Are pull quotes online an example of a skeuomorph? “An object or feature which imitates the design of a similar artefact made from another material.”</p>

<p>I think they might simply be an example of unexamined assumptions. The default assumption is that pull quotes on the web are fine, because everyone else is doing pull quotes on the web. But has anybody ever stopped to ask why? It was this same spiral of unexamined assumptions that led to the web drowning in a sea of splash pages in the early 2000s.</p>

<blockquote><h3>I think they might simply be an example of unexamined assumptions.</h3></blockquote>

<p>I’m genuinely curious to hear the design justification for pull quotes on the web (particularly on mobile), because as a reader, I can give plenty of reasons for their removal.</p>

]]>
            </description>
            <pubDate>Tue, 23 Aug 2016 14:58:14 GMT</pubDate>
            <guid>https://adactio.com/journal/11102</guid>
            <category>pullquotes</category>
            <category>reading</category>
            <category>design</category>
            <category>legibility</category>
            <category>clarity</category>
            <category>medium:id=30e87e7773ab</category>
        </item>
        <item>
            <title>Exploring web technologies</title>
            <link>https://adactio.com/journal/11078</link>
            <description>
<![CDATA[
<p>Last week, I had two really enjoyable experiences discussing completely opposite ends of the web technology stack.</p>

<p>Tuesday is <a href="https://codebar.io/">Codebar</a> day here in Brighton. <a href="http://clearleft.com/">Clearleft</a> hosted it at <a href="http://68middle.st/">68 Middle Street</a> last week. I really, really enjoy coaching at Codebar. I particularly like teaching the absolute basics of HTML and CSS. There&#8217;s something so rewarding about seeing the &#8220;a-ha!&#8221; moments when concepts click with people.  I also love answering the inevitable questions that arise, like &#8220;<em>why</em> is it like that?&#8221;, or &#8220;how do I do this?&#8221;</p>

<p><a href="https://twitter.com/CodebarBrighton/status/760595316332695552"><img src="https://pbs.twimg.com/media/Co4tZp7WIAAt1Lx.jpg" alt="Fantastic coding tonight! Great to see you all. Thanks for coming and thanks @68MiddleSt &amp; @clearleft for having us."></a></p>

<p>Thursday was devoted to the opposite end of the spectrum. I ran <a href="http://clearleft.com/thinks/398">a workshop at Clearleft</a> with some developers from one of our clients. The whole day was dedicated to exploring and evaluating up-and-coming web technologies. Basically, it was a chance to geek out about all the stuff <a href="https://adactio.com/links">I&#8217;ve been linking to</a> or <a href="https://adactio.com/journal/">writing about</a>. During the workshop I ended up making a lot of use of my tagging system here on adactio.com:</p>

<ul>
<li><a href="https://adactio.com/journal/tags/webcomponents">My thoughts on web components</a>,</li>
<li><a href="https://adactio.com/links/tags/webcomponents">Links to resources on web components</a>,</li>
<li><a href="https://adactio.com/journal/tags/serviceworker">My posts on implementing service workers</a>,</li>
<li><a href="https://adactio.com/links/tags/serviceworker">Lots and lots of links to handy service worker resources</a>,</li>
<li><a href="https://adactio.com/links/tags/performance">Links relating to performance</a>,</li>
<li><a href="https://adactio.com/links/tags/accessibility">A whole bunch of accessibility links</a>, and</li>
<li><a href="https://adactio.com/links/tags/pwa">Everything I&#8217;ve linked to regarding progressive web apps</a>.</li>
</ul>

<p><a href="https://adactio.com/notes/11060"><img src="https://adactio.com/images/uploaded/11060/large.jpg" alt="Prioritising topics for discussion."></a></p>

<p>Web components and service workers ended up at the top of the list of technologies to tackle, which was fortuitous, given <a href="https://adactio.com/journal/11052">my recent thoughts on comparing the two</a>:</p>

<blockquote>
  <p>First of all, ask the question “who benefits from this technology?” In the case of service workers, it’s the end users. They get faster websites that handle network failure better. In the case of web components, there are no direct end-user benefits. Web components exist to make developers lives easier. That’s absolutely fine, but any developer convenience gained by the use of web components can’t come at the expense of the user—that price is too high.</p>
  
  <p>The next question we usually ask when we’re evaluating a technology is “how well does it work?” Personally, I think it’s just as important to ask “how well does it fail?”</p>
</blockquote>

<p>Those two questions turned out to be a good framework for the whole workshop. The question of how to evaluate technologies is something I&#8217;ve been thinking about a lot lately. I&#8217;m pretty sure it will be what my next conference talk is going to be all about.</p>

<p>You can <a href="http://clearleft.com/thinks/398">read more about the structure of the workshop over on the Clearleft site</a>. I&#8217;m looking forward to running it again sometime. But I&#8217;m equally looking forward to getting back to the basics at <a href="https://codebar.io/events">the next Codebar</a>.</p>

]]>
            </description>
            <pubDate>Mon, 08 Aug 2016 18:17:24 GMT</pubDate>
            <guid>https://adactio.com/journal/11078</guid>
            <category>teaching</category>
            <category>codebar</category>
            <category>technology</category>
            <category>learning</category>
            <category>sharing</category>
            <category>medium:id=e6d0fdc5a315</category>
        </item>
        <item>
            <title>Extensible web components</title>
            <link>https://adactio.com/journal/11052</link>
            <description>
<![CDATA[
<p>Adam Onishi has written up his thoughts on <a href="http://adamonishi.com/2016/08/web-components-and-progressive-enhancement/">web components and progressive enhancements</a>, following on from a discussion we were having on Slack. He shares a lot of the same frustrations as I do.</p>

<p><a href="https://adactio.com/journal/7431">Two years ago</a>, I said:</p>

<blockquote>
  <p>I have conflicting feelings about Web Components. I am simultaneously very excited and very nervous.</p>
</blockquote>

<p>I still feel that way. In theory, web components are very exciting. In practice, web components are very worrying. The worrying aspect comes from <a href="https://adactio.com/journal/8276">the treatment of backwards compatibility</a>.</p>

<p>It all comes down to the way custom elements work. When you make up a custom element, it&#8217;s basically a <code>span</code>.</p>

<pre><code>&lt;fancy-select&gt;&lt;/fancy-select&gt;
</code></pre>

<p>Then, using JavaScript with ShadowDOM, templates, and the other specs that together make up the web components ecosystem, you turn that inert <code>span</code>-like element into something all-singing and dancing. That&#8217;s great if the browser supports those technologies, and the JavaScript executes successfully. But if either of those conditions aren&#8217;t met, what you&#8217;re left with is basically a <code>span</code>.</p>

<p>One of the proposed ways around this was to allow custom elements to extend existing elements (not just <code>span</code>s). The proposed syntax for this was an <code>is</code> attribute.</p>

<pre><code>&lt;select is="fancy-select"&gt;...&lt;/select&gt;
</code></pre>

<p><a href="https://adactio.com/journal/8814">Browser makers responded to this</a> by saying &#8220;Nah, that&#8217;s too hard.&#8221;</p>

<p>To be honest, I had pretty much given up on the <code>is</code> functionality ever seeing the light of day, but <a href="https://twitter.com/adactio/status/743441446557073408">Monica has rekindled my hope</a>:</p>

<blockquote class="twitter-tweet" data-lang="en"><p lang="en" dir="ltr"><a href="https://twitter.com/adactio">@adactio</a> I will go to every standards meeting until I get it done, because otherwise we are hosed for &lt;form&gt; and web components.</p>&mdash; Monica Dinosaurescu (@notwaldorf) <a href="https://twitter.com/notwaldorf/status/743443172093722624">June 16, 2016</a></blockquote>

<p>Still, I&#8217;m not holding my breath for this kind of declarative extensibility landing in browsers any time soon. Instead, a JavaScript-based way of extending existing existing elements is currently the only way of piggybacking on all the accessible behavioural goodies you get with native elements.</p>

<pre><code>class FancySelect extends HTMLSelectElement
</code></pre>

<p>But this imperative approach fails completely if custom elements aren&#8217;t supported, or if the JavaScript fails to execute. Now you&#8217;re back to having <code>span</code>s.</p>

<p><a href="https://youtu.be/pBCDdeqzUlY?t=6m34s">The presentation on web components</a> at the Progressive Web Apps Dev Summit referred to this JavaScript-based extensibility as &#8220;progressively enhancing what&#8217;s already available&#8221;, which is a bit of a stretch, given how completely it falls apart in older browsers. It was kind of a weird talk, to be honest. After fifteen minutes of talking about creating elements entirely from scratch, there was <a href="https://youtu.be/pBCDdeqzUlY?t=14m15s">a minute or two</a> devoted to the <code>is</code> attribute and extending existing elements &#8230;before carrying as though those two minutes never happened.</p>

<p>But even without <em>any</em> means of extending existing elements, it should still be possible to define custom elements that have some kind of fallback in non-supporting browsers:</p>

<pre><code>&lt;fancy-select&gt;
 &lt;select&gt;...&lt;/select&gt;
&lt;/fancy-select&gt;
</code></pre>

<p>In that situation, you at least get a regular ol&#8217; <code>select</code> element in older browsers (or in modern browsers before the JavaScript kicks in and uplifts the custom element).</p>

<p>Adam <a href="">has a great example of this</a> in his post:</p>

<blockquote>
  <p>I’ve been thinking of a gallery component lately, where you’d have a custom element, say &lt;o-gallery&gt; for want of a better example, and simply populate it with images you want to display, with custom elements and shadow DOM you can add all the rest, controls/layout etc. Markup would be something like:</p>
</blockquote>

<pre><code>&lt;o-gallery&gt;
 &lt;img src=""&gt;
 &lt;img src=""&gt;
 &lt;img src=""&gt;
&lt;/o-gallery&gt;
</code></pre>

<blockquote>
  <p>If none of the extra stuff loads, what do we get? Well you get 3 images on the page. You still get the content, but just none of the fancy interactivity.</p>
</blockquote>

<p>Yes! This, in my opinion, is how we should be approaching the design of web components. This is what gets me excited about web components.</p>

<p>Then I look at pretty much all the examples of web components out there and my nervousness kicks in. Hardly any of them spare a thought for backwards-compatibility.  Take a look, for example, at <a href="view-source:https://shop.polymer-project.org/">the entire contents</a> of the <code>body</code> element for the <a href="https://shop.polymer-project.org/">Polymer Shop demo site</a>:</p>

<pre><code>&lt;shop-app unresolved=""&gt;SHOP&lt;/shop-app&gt;
</code></pre>

<p>This seems really odd to me, because I don&#8217;t think it&#8217;s a good way to &#8220;sell&#8221; a technology.</p>

<p>Compare service workers to web components.</p>

<p>First of all, ask the question &#8220;who benefits from this technology?&#8221; In the case of service workers, it&#8217;s the end users. They get faster websites that handle network failure better. In the case of web components, there are no direct end-user benefits. Web components exist to make developers lives easier. That&#8217;s absolutely fine, but any developer convenience gained by the use of web components can&#8217;t come at the expense of the user—that price is too high.</p>

<p>The next question we usually ask when we&#8217;re evaluating a technology is &#8220;how well does it work?&#8221; Personally, I think it&#8217;s just as important to ask &#8220;how well does it fail?&#8221;</p>

<p>Service workers work well and fail well. If a browser supports service workers, the user gets all the benefits. If a browser doesn&#8217;t support service workers, the user get the same experience they would have always had.</p>

<p>Web components (will) work well, but fail badly. If a browser supports web components, the user gets the experience that the developer has crafted using these new technologies. If a browser doesn&#8217;t support web components, the user gets &#8230;probably nothing. It depends on how the web components have been designed.</p>

<p>It&#8217;s <strong>so</strong> much easier to get excited about implementing service workers. You&#8217;ve literally got nothing to lose and everything to gain. That&#8217;s not the case with web components. Or at least not with the way they are currently being sold.</p>

<p>See, this is why I think it&#8217;s so important to put some effort into designing web components that have some kind of fallback. <em>Those</em> web components will work well <em>and</em> fail well.</p>

<p>Look at the way new elements are designed for HTML. Think of complex additions like <code>canvas</code>, <code>audio</code>, <code>video</code>, and <code>picture</code>. Each one has been designed with backwards-compatibility in mind—there&#8217;s always a way to provide fallback content.</p>

<p>Web components give us developers the same power that, up until now, only belonged to browser makers. Web components also give us developers the same responsibilities as browser makers. We should take that responsibility seriously.</p>

<p>Web components are supposed to be the poster child for <a href="https://github.com/extensibleweb/manifesto">The Extensible Web Manifesto</a>. I&#8217;m all for an extensible web. But the way that web components are currently being built looks more like an endorsement of The Replaceable Web Manifesto. I&#8217;m not okay with a replaceable web.</p>

<p><small>Here&#8217;s hoping that my concerns won&#8217;t be <a href="https://infrequently.org/2014/09/uncomfortably-excited/">dismissed as &#8220;piffle and tosh&#8221;</a> again by the very people who should be thinking about these issues.</small></p>

]]>
            </description>
            <pubDate>Wed, 03 Aug 2016 16:48:27 GMT</pubDate>
            <guid>https://adactio.com/journal/11052</guid>
            <category>webcomponents</category>
            <category>extensible</category>
            <category>web</category>
            <category>customelements</category>
            <category>markup</category>
            <category>html</category>
            <category>progressive</category>
            <category>enhancement</category>
            <category>frontend</category>
            <category>development</category>
            <category>medium:id=e794559b8c2e</category>
        </item>
        <item>
            <title>Animating</title>
            <link>https://adactio.com/journal/11017</link>
            <description>
<![CDATA[
<p>I&#8217;ve noticed a few nice examples of motion design on the web lately.</p>

<p>The <a href="https://cloudfour.com/">Cloud Four</a> gang recently <a href="https://cloudfour.com/thinks/redesigned/">redesigned their site</a>, including a nice little animation on <a href="https://cloudfour.com/">the home page</a>.</p>

<p>Malcolm Gladwell has a new podcast called <a href="http://revisionisthistory.com/">Revisionist History</a>. The website for the podcast is quite lovely. <a href="http://revisionisthistory.com/episodes">Each episode</a> is illustrated with an animated image. Lovely!</p>

<p>If you want to see some swishy animations triggered by navigation, <a href="http://waaark.com/">the waaark websites</a> has them a-plenty. Personally I find the scroll-triggered animations on internal pages too much to take (I have yet to find an example of <a href="http://blog.arronhunt.com/post/66973746030/stop-scrolljacking">scrolljacking</a> that doesn&#8217;t infuriate me). But the homepage illustrations have some lovely subtle movement.</p>

<p>When it comes to subtlety in animation, my favourite example comes from <a href="http://www.lottejackson.com/">Charlotte</a>. She recently refactored the homepage of <a href="http://leadingdesignconf.com/">the website for the Leading Design conference</a>. It originally featured one big background image. Switching over to SVG saved a <em>lot</em> of bandwidth. But what I really love is that the shapes in the background are now moving &#8230;ever so gently.</p>

<p>It&#8217;s like gazing at a slow-motion lava lamp of geometry.</p>

]]>
            </description>
            <pubDate>Mon, 25 Jul 2016 17:30:13 GMT</pubDate>
            <guid>https://adactio.com/journal/11017</guid>
            <category>animation</category>
            <category>motion</category>
            <category>design</category>
            <category>visual</category>
            <category>svg</category>
            <category>medium:id=66fc12001952</category>
        </item>
        <item>
            <title>Class teacher</title>
            <link>https://adactio.com/journal/11012</link>
            <description>
<![CDATA[
<p>ES6 introduced a whole bunch of new features to JavaScript. One of those features is <a href="https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Classes">the <code>class</code> keyword</a>. This introduction has been accompanied by a fair amount of concern and criticism.</p>

<p>Here&#8217;s the issue: classes in JavaScript aren&#8217;t quite the same as classes in other programming languages. In fact, technically, JavaScript doesn&#8217;t really have classes at all. But some say that technically isn&#8217;t important. If it looks like a duck, and quacks like a duck, shouldn&#8217;t we call it a duck even if technically it&#8217;s somewhat similar—but not quite the same—species of waterfowl?</p>

<p>The argument for doing this is that classes are so familiar from other programming languages, that having some way of using classes in JavaScript—even if it isn&#8217;t technically the same as in other languages—brings a lot of benefit for people moving over to JavaScript from other programming languages.</p>

<p>But that comes with a side-effect. Anyone learning about classes in JavaScript will basically be told &#8220;here&#8217;s how classes work &#8230;but don&#8217;t look too closely.&#8221;</p>

<p>Now if you believe that outcomes matter more than understanding, then this is a perfectly acceptable trade-off. After all, we use computers every day without needing to understand the inner workings of every single piece of code under the hood.</p>

<p>It doesn&#8217;t sit well with me, though. I think that understanding how something works is important (in most cases). That&#8217;s why I favour learning underlying technologies first—HTML, CSS, JavaScript—before reaching for abstractions like frameworks and libraries. If you understand the way things work first, then your choice of framework, library, or any other abstraction is an <em>informed</em> choice.</p>

<p>The most common way that people refer to the new <code>class</code> syntax in JavaScript is to describe it as syntactical sugar. In other words, it doesn&#8217;t fundamentally introduce anything new under the hood, but it gives you a shorter, cleaner, nicer way of dealing with objects. It&#8217;s an abstraction. But because it&#8217;s an abstraction taken from other programming languages that work differently to JavaScript, it&#8217;s a bit of fudge. It&#8217;s a little white lie. The <code>class</code> keyword in JavaScript will work just fine as long as you don&#8217;t try to understand it.</p>

<p>My personal opinion is that this isn&#8217;t healthy.</p>

<p>I&#8217;ve come across two fantastic orators who cemented this view in my mind. At Render Conf in Oxford earlier this year, I had the great pleasure of hearing <a href="https://vimeo.com/album/3953264/video/166790295">Ashley Williams talk about the challenges of teaching JavaScript</a>. Skip to the 15 minute mark to hear her introduce the issues thrown up classes in JavaScript.</p>

<div class="embed"><iframe src="https://player.vimeo.com/video/166790295" width="360" height="270"></iframe></div>

<p>More recently, the mighty <a href="http://getify.me/">Kyle Simpson</a> was on <a href="https://devchat.tv/js-jabber/220-jsj-teaching-javascript-with-kyle-simpson">an episode of the JavaScript Jabber podcast</a>. Skip to the 17 minute mark to hear him talk about classes in JavaScript.</p>

<p><audio src="https://media.devchat.tv/js-jabber/JSJ220KyleSimpson.mp3?download=true" controls preload="none"><object type="application/x-shockwave-flash" data="https://huffduffer.com/flash/player.swf?soundFile=https://media.devchat.tv/js-jabber/JSJ220KyleSimpson.mp3?download=true" width="290" height="24"><param name="movie" value="https://huffduffer.com/flash/player.swf?soundFile=https://media.devchat.tv/js-jabber/JSJ220KyleSimpson.mp3?download=true" /><param name="wmode" value="transparent" />
<a href="https://huffduffer.com/adactio/344723">220 JSJ Teaching JavaScript with Kyle Simpson on Huffduffer</a></object></audio></p>

<p>(Full disclosure: Kyle also some very kind things about some of my blog posts at the end of that episode, but you can switch it off before it gets to that bit.)</p>

<p>Both Ashley and Kyle bring a much-needed perspective to the discussion of language design. That perspective is the perspective of a teacher.</p>

<p>In his <a href="https://www.w3.org/People/Bos/DesignGuide/toc.html">essay on W3C&#8217;s design principles</a>, Bert Bos lists <a href="https://www.w3.org/People/Bos/DesignGuide/learnability.html">learnability</a> among the fundamental driving forces (closely tied to <a href="https://www.w3.org/People/Bos/DesignGuide/readability.html">readability</a>). Learnability and teachability are two sides of the same coin, and I find it valuable to examine any language decisions through that lens. With that mind, introducing a new feature into a language that comes with such low teachability value as to warrant a teacher actively telling a student <em>not</em> to learn how things really work &#8230;well, that just doesn&#8217;t seem right.</p>

]]>
            </description>
            <pubDate>Mon, 25 Jul 2016 12:55:52 GMT</pubDate>
            <guid>https://adactio.com/journal/11012</guid>
            <category>es6</category>
            <category>javascript</category>
            <category>class</category>
            <category>programming</category>
            <category>teaching</category>
            <category>learning</category>
            <category>code</category>
            <category>ecmascript</category>
            <category>frontend</category>
            <category>development</category>
            <category>abstraction</category>
            <category>medium:id=6bacdb6304c0</category>
        </item>

   </channel>
</rss>