A place to cache linked articles (think custom and personal wayback machine)
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

pirms 4 gadiem
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. title: Responsive day out 3: the final breakpoint
  2. url: https://hiddedevries.nl/en/blog/2015-06-20-responsive-day-out-3-the-final-breakpoint/
  3. hash_url: b81e5ead29fc9dcca90932464e54c8ed
  4. <p><img alt="" height="407" src="https://hiddedevries.nl/perch/resources/opening-.jpg" width="700" /> <em>Jeremy Keith opening Responsive Day Out 3</em> </p>
  5. <p>Yesterday I attended the third (and hopefully not final) edition of Responsive Day Out, Clearleft&#8217;s one day conference about all things responsive web design. </p>
  6. <p>The talks were very varied this year. There were practical talks about improvements to the web with features like Web Components, Service Workers and flexbox. There were also conceptual talks, which looked at meta issues surrounding responsive web design: how web designers and developers adopt new ways of working or choose not to do so, and how to work together.</p>
  7. <p>Like <a href="/en/blog/2014-06-29-responsive-day-out-2-the-squishening">last year</a>, the conference was hosted by Jeremy Keith, talks were divided into four segments, with three short talks in each segment, followed by a short interview-like discussion.</p>
  8. <h2>Part 1: Alice Bartlett, Rachel Shillcock and Alla Kholmatova</h2>
  9. <p class="intro">In the first segment, Alice Bartlett looked at whether and how we might be able to come up with a business case for accessibility, Rachel Shillcock looked at the relationship between web design and accessibility and Alla Kholmatova did a fantastic talk about (libraries of) patterns and, amongst other things, how to name them.</p>
  10. <h3>The business case for accessibility</h3>
  11. <blockquote>
  12. <p>Coming up with a business case may be a much shorter route to getting everyone on board with accessibility</p>
  13. </blockquote>
  14. <p><a href="http://alicebartlett.co.uk">Alice Bartlett</a> from the <a href="https://www.gov.uk/government/organisations/government-digital-service">Government Digital Service</a> opened with a convincing talk about how to sell accessibility. Designing and building websites accessibly is a no-brainer to web designers and web developers who are convinced by the moral case for accessibility. But to some, that argument won&#8217;t cut it. There may be people in your organisation that want to learn more about the return on investment, and instead of trying to make the moral case, coming up with a business case may be ‘a much shorter route’ to getting everyone on board with accessibility, Alice said.</p>
  15. <p>A business case is a document that proves that you have a problem and shows how you can solve it in the most cost effective manner. For accessibility this is hard, as there is not much evidence to show that accessibility solves the problems that we assume it solves. Sites that are accessible may be more maintainable, better for <span class="caps">SEO</span> or beneficial to usability, but, said Alice, there is hardly any evidence supporting such claims. See also Karl Groves&#8217; <a href="http://www.karlgroves.com/category/accessibility-business-case/">series of blog posts</a> about this, and the <a href="http://www.karlgroves.com/2012/01/27/chasing-the-accessibility-business-case-conclusion/">conclusion of that series</a>.</p>
  16. <p>Litigation may prove to be a way out: if non-accessibility is something one can be sued for, accessibility may be the result of a strategy avoiding being sued. The problem with that approach, is that whereas the risk of being sued is likely to be substantial for <em>high profile</em> companies, it is unlikely to be big enough to make a case for <em>low profile</em> companies. This should not stop us from making low profile companies&#8217; sites accessible, but it does show that coming up with a business case for accessibility is problematic.</p>
  17. <h3>Accessibility and web design</h3>
  18. <p><a href="https://www.rachilli.com">Rachel Shillcock</a> is a web designer and talked about how she integrates accessibility in her web design workflow. She gave practical tips and discussed tools like Lea Verou&#8217;s <a href="https://leaverou.github.io/contrast-ratio/">Contrast Ratio</a> for determining <span class="caps">WCAG</span> colour compliance, <a href="http://squizlabs.github.io/HTML_CodeSniffer/"><span class="caps">HTML</span> Code Sniffer</a> that checks your front-end code for potential problems in web accessibility guidelines compliance, and <a href="http://khan.github.io/tota11y/">tota11y</a>, a similar tool that was recently launched by Khan Academy. Rachel made the moral case for accessibility: she emphasised that accessibility is a responsibility and that improving it can hugely improve your users&#8217; lives.</p>
  19. <h3>Pattern libraries and shared language</h3>
  20. <p><a href="http://www.craftui.com">Alla Kholmatova</a> talked about the pattern library she works on at <a href="https://www.futurelearn.com">Future Learn</a>. One of the problems she highlighted, is the boundary between a component being just something on its own, and it having enough similarities to something else to form a shared component. Like in language, interpretations may vary. I may see two separate components, you may see one component and one variation. “Naming is hard”, Alla explained. Visual names like ‘pink button’ are easy, but will quickly become limiting and burdensome (to the project). Functional names may be better, but then you might end up with two components that have different functions, but are visually the same. Higher level functions could be the basis for better names. </p>
  21. <p>Alla emphasised that language is incredibly important here, shared language in particular. Pattern libraries and frameworks for modular design like <a href="http://bradfrost.com/blog/post/atomic-web-design/">atomic design</a> and <a href="http://www.google.com/design/">material design</a> are ‘examples of controlled vocabularies’, she said. Naming is the method teams use to establish such frameworks. The framework will be used by the team, therefore the naming should be done by the team that will use it. The language that is established should remain in use to stay ‘alive’ and keep its meaning. Because a name like ‘billboard’, one of Alla&#8217;s examples, is quite broad. By using it in daily conversations, it remains meaningful. It made me think of Wittgenstein, who <a href="https://en.wikipedia.org/wiki/Private_language_argument">held</a> that language only has meaning in virtue of the group / community it is used in.</p>
  22. <blockquote>
  23. <p>Many of their naming conversations […] are done with everyone involved: not just designers or developers, but also content producers and users.</p>
  24. </blockquote>
  25. <p>She explained how the team at Future Learn work on their shared language: they have a wall with all the (printed out) bits of design of their website for reference and overview. Many of their naming conversation takes place on Slack, and are done with everyone involved: not just designers or developers, but also content producers and users. They look at terminology of architecture and printing press for inspiration.</p>
  26. <h2>Part 2: Peter Gasston, Jason Grigsby and Heydon Pickering</h2>
  27. <p class="intro">In the second part, Peter Gasston talked about the state of web components, Jason Grigsby explained some of the puzzles of responsive images and Heydon Pickering showed how when viewing <span class="caps">CSS</span> as (<span class="caps">DOM</span>) pattern matches, clever <span class="caps">CSS</span> systems can be built.</p>
  28. <h3>Web Components</h3>
  29. <p><a href="http://www.broken-links.com">Peter Gasston</a> gave an overview of Web Components, which provides a way for web developers to create widgets or modular components, that can have their own styles and behaviour (as in: not inherited from the page, but really their own). React and <span class="caps">BEM</span> have provided ways to do that with existing tech, Web Components brings it to the browsers. </p>
  30. <p>There are four key modules to Web Components: templates, <span class="caps">HTML</span> imports, custom elements and Shadow <span class="caps">DOM</span>. </p>
  31. <ul>
  32. <li>Templates offer a way to declare reusable bits of markup in a <code>&lt;template&gt;</code> element. Works everywhere but IE.</li>
  33. <li><span class="caps">HTML</span> imports lets you import bits of <span class="caps">HTML</span>. Major problem: these imports block rendering (the imported file can link to stylesheets or scripts, which will need to be fetched). This may be replaced altogether by ES6 Modules.</li>
  34. <li>Custom elements let you have meaningful markup with custom properties. You create them in JS. The custom element names have a hyphen in them, because standard <span class="caps">HTML</span> elements will never have those, so browsers know which ones are custom. ES6 also offers a way to do this, possibly better, ES6 Classes.</li>
  35. <li>Shadow <span class="caps">DOM</span>: hide complex markup inside an element. This works by creating a shadow root (createShadowRoot()). Little agreement amongst browser vendors about other features than the createShadowRoot function. Still a lot to be defined.</li>
  36. </ul>
  37. <p>Custom elements in Web Components bring a lot of responsibility, as they are empty in terms of accessibility, <span class="caps">SEO</span> and usability. With standard <span class="caps">HTML</span> elements, browsers have those things built in. With custom elements, they <a href="https://hiddedevries.nl/en/blog/2015-05-26-the-accessibility-tree">become the developer&#8217;s responsibility</a>, Peter stressed. Potentially, there will be a lot of badly built Web Components once people start playing with them (like there are a lot of badly built jQuery plug-ins). The <a href="https://github.com/webcomponents/gold-standard/wiki">Gold Standard</a> Peter mentioned may be a helpful checklist for how to build a Web Component and do it well. Peter also said we should use the <span class="caps">UNIX</span> philosophy: ‘every component does one job [and does it really well]’.</p>
  38. <p>Peter said Web Components are good enough to be used now (but not for a business to depend on). He recommended using a library like <a href="https://www.polymer-project.org/1.0/">Polymer</a> for those who want to explore Web Components in more detail.</p>
  39. <h3>Responsive images</h3>
  40. <p><a href="http://blog.cloudfour.com/author/jason-grigsby/">Jason Grigsby</a> discussed Responsive Images, which has now shipped in most browsers and will work in others (IE and Safari) soon. His talk was about the why of responsive images. It has been designed to serve two use cases: resolution switching (best quality image for each resolution) and art direction (different image in different circumstances).</p>
  41. <p>One of the puzzles around responsive images, Jason explained, is when to add image breakpoints. What dictates when to add an image breakpoint? Art direction might dictate breakpoints; this can be figured out and is mostly a design/art direction concern. Resolution might also dictate breakpoints, but this is much harder to figure out. How do we figure out how many breakpoints to use? In many companies, three breakpoints would to mind (phone-tablet-desktop), but that&#8217;s pretty artificial. </p>
  42. <p>The ideal image width is the width it will have as it is displayed on the page. But in many responsive websites, images are sized with a percentage and can have many, many different widths, so often, some bytes will be ‘wasted’. So the question is: what is a sensible jump in file size? Maybe we should use performance budgets to make our choices about image resolutions? Important to note here, is that the larger the image, the larger the potential number of bytes wasted. That means we should have more breakpoints at larger sizes, as at larger sizes, differences are more expensive in bytes. </p>
  43. <p>We can distinguish between methods that tell the browser exactly which image to use when, and methods that let the browser choose what is best. In most cases, Jason recommended, the latter is probably best: we just let the browser figure out which image to use. </p>
  44. <h3>Solving problems with <span class="caps">CSS</span> selectors</h3>
  45. <p><a href="http://www.heydonworks.com">Heydon Pickering</a> looked at making use of some powerful features of <span class="caps">CSS</span> (<a href="http://slides.com/heydon/solving-problems-with-selectors">slides</a>). He disagrees with those that say <span class="caps">CSS</span> is badly designed and should be recreated in JavaScript (‘pointless’) and showed in his talk how we can use the very design of <span class="caps">CSS</span> to our own benefit. <span class="caps">CSS</span> is indeed very well designed.</p>
  46. <blockquote>
  47. <p>Most grid systems are not grid systems, they are grid prescriptions</p>
  48. </blockquote>
  49. <p>Most grid systems out there, Heydon argued, aren&#8217;t much of a system. As they are not self-governing, they are more like grid <em>prescriptions</em>. Automatic systems can be done, using the power of <span class="caps">CSS</span>. Heydon suggested to look at <span class="caps">CSS</span> selectors as pattern matches. Matching containers full of content, we can look at how many bits of content we have, and let the browser come up with the best grid to display our content in. In other words: <a href="http://alistapart.com/article/quantity-queries-for-css">quantity queries</a>. With <code>nth-child</code> selectors, Heydon showed how we can create a ‘divisibility grid’: looking at what your total amount of columns is divisible by, we can set column widths accordingly. </p>
  50. <p><span class="caps">BEM</span>-like conventions create order and control, but they throw out the baby with the bathwater by not using the cascade. The divisibility grid and quantity queries that Heydon create chaos, one might say, but as he rightly pointed out, this is in fact a ‘controllable chaos’.</p>
  51. <h2>Part 3: Jake Archibald, Ruth John and Zoe Mickley Gillenwater</h2>
  52. <p class="intro">The third segment started off with Jake Archibald, who talked about progressive enhancement in ‘apps’, followed by Ruth John who discussed a number of so-called Web <span class="caps">API</span>s and lastly Zoe Mickley Gillenwater, with a talk about the many uses of flexbox on Booking.com.</p>
  53. <h3>Offline first</h3>
  54. <blockquote>
  55. <p>“A splash screen is an admission of failure”</p>
  56. </blockquote>
  57. <p><a href="http://jakearchibald.com">Jake Archibald</a> looked at progressive enhancement on the web, and showed how progressive enhancement and web apps are a false dichotomy. He emphasised it is indeed a great feature of the web that web pages show content as soon as they can, as opposed to last decade&#8217;s native apps, that often show a loading screen until everything you will ever need has loaded. On the web, we don&#8217;t need loading screens, yet some web apps have mimicked this behaviour. Jake argued this is a mistake and we can do better: ‘a splash screen is an admission of failure’. On the web, we can actually have users play level 1, even when the rest of the game is still loading in the background.</p>
  58. <p><img alt="Jake Archibald on stage" height="340" src="https://hiddedevries.nl/perch/resources/progressive1-.jpg" title="Jake Archibald on stage" width="700" /> <em>Jake Archibald making the case for progressive enhancement</em> </p>
  59. <p>Some web app slowness exists because all the required JavaScript is requested as one big lump, with a relatively big file size. Not a huge problem in ideal, fast WiFi situations, but quite a <span class="caps">PITA</span> for those with two bars of 3G on the go. Or for those accessing the web on what Jake referred to as Lie-Fi. </p>
  60. <p>People may say all the JavaScript should download first, as it is a ‘web app’, and that this is how ‘web apps’ work, but that will not impress users. We can actually load the essential bits of JavaScript first and others later. Although this will decrease total loading time, it can hugely increase the time to first interaction. This is more important than overall load time: people will likely want to use your thing as soon as possible. </p>
  61. <blockquote>
  62. <p>A Service Worker can be put in place to make sure users can always access the cached version first, even when offline</p>
  63. </blockquote>
  64. <p>After the first load, assets can be stored in cache. A Service Worker can be put in place to make sure users can always access the cached version first, even when offline. Whilst the cached version is being displayed, everything else else can be taken care of in the background, you can notify the user when it is ready. I felt this is a bit like offering your restaurant guests a table and some bread and wine, whilst you prepare their starter. You don&#8217;t have to let them stand outside until everything is ready, that would get them unnecessarily annoyed.</p>
  65. <p>Service Workers, that allow for taking over the network management of the browser and thus for serving cache/offline first, can be used now. Not because they have support across all browsers ever made, but because they are pretty much an extra layer on top of your existing application. If your browser doesn&#8217;t understand this mechanism to get the app served from cache first, that&#8217;s okay, it will just be served a fresh version (as it would have been without a Service Worker). If it does, you can save your users from Lie-Fi.</p>
  66. <p>Link: <a href="https://jakearchibald.github.io/svgomg/"><span class="caps">SVG</span> <span class="caps">OMG</span></a> (load it, turn WiFi off, load it again, it still works!)</p>
  67. <h3>Web <span class="caps">API</span>s</h3>
  68. <p><a href="http://rumyrashead.com">Ruth John</a> talked us through various different Web <span class="caps">API</span>s, or as she likes to call them: client side web <span class="caps">API</span>s. She showed interesting demoes of Geolocation, which gives access to a user&#8217;s location if they give permission, including a ‘watch’ function that can update so that you could build a sat nav application, Web Animation, which offers the animation properties from <span class="caps">CSS</span> in JavaScript, the Web Audio <span class="caps">API</span>, that lets one manipulate audio amongst other things, and finally the Ambient Light <span class="caps">API</span>, that gives us the tools to do useful little improvements for our users.</p>
  69. <h3>Flexbox</h3>
  70. <p><a href="http://zomigi.com">Zoe Mickley Gillenwater</a> works at hotel booking website Booking.com, which is a hugely flexible website, as it is served in many different languages and on many different screen sizes and browsers.</p>
  71. <p>When designing for the web, Zoe explained, we can used fixed units like <code>px</code>, or relative units, like <code>em</code>, <code>rem</code> or <code>vw</code>. Relative units can be a useful ‘best guess’, let you be close to an ideal, <em>and</em> work in many different circumstances. Even better than flexible units, is designing without units at all. Flexbox allows you to do exactly this. It lets you tell the browser an element&#8217;s starting size and whether it can grow/shrink, and lets the browser figure out the math.</p>
  72. <blockquote>
  73. <p>[Flexbox] does responsive lay-outs without media queries</p>
  74. </blockquote>
  75. <p>Flexbox, Zoe showed, is great for improving whitespace and wrapping for better coherency in lay-out. It often does this better than floats, <code>inline-block</code> or <code>table-cell</code>, but can (and probably should) be used in conjunction with those, as they provide a usable feedback. It is also great for reordering: with its ‘order’ property, you can achieve visual improvements by setting an element to display in another place than your source order. Lastly, it does responsive lay-outs without media queries, as it will display within your constraints and figure out its ‘breakpoints’ all by itself.</p>
  76. <p>Zoe pointed out that the interesting difference between flexbox and other <span class="caps">CSS</span> features, is not really code, but our way of thinking about lay-out. It requires a bit of a mental shift. Responsiveness, Zoe concluded, is not binary, it is a continuum, and flexbox can help making your site more responsive. You can make lots of small minor changes to your site, each of which can make it more flexible. Browsers will make use of those improvements if they understand them, devices will make use of them if they are smaller or bigger than usual (most of them are, but all in different ways).</p>
  77. <h2>Part 4: Rosie Campbell, Lyza Gardner and Aaron Gustafson</h2>
  78. <p class="intro">In the final part, Rosie Campbell looked at the future of web design beyond the screens as we know them, Lyza Gardner pleaded for generalists in the web industry and Aaron Gustafson presented his idea of what we should expect next.</p>
  79. <h3>Beyond the screen</h3>
  80. <p><a href="https://medium.com/@RosieCampbell">Rosie Campbell</a> from the <span class="caps">BBC</span> talked us through some of the experiments she was involved with at the <span class="caps">BBC</span> Research lab. She noted that screens will only get weirder, and urged us to think about designing for such screens that don&#8217;t even exist yet. How? Stay agnostic to underlying hardware, she recommended. And reconsider assumptions: we are used to designing with rectangles, but future screens may be round, or indeed have completely different sizes. We should not be afraid of constraints, but embrace them as they can fuel creativity.</p>
  81. <h3>Skillsets</h3>
  82. <p><a href="http://www.lyza.com">Lyza Gardner</a> talked about how the web designer/developer job has changed in recent years, and what that does to us as people that just try to work in the web industry.</p>
  83. <p>The web used to be much simpler, Lyza explained. In the beginning there was no JavaScript, there were no stylesheets, even images hardly had browser support. These constraints made working on the web interesting. This has changed hugely, as we now have a daily influx of new frameworks, tools and methodologies to learn about, consider adopting and perhaps specialise in. Because there is now so much information about so many different things we can do with the web, working on the web has become quite complex. There is more than anyone can possibly keep up with. This, Lyza said, can make us feel down and unsure.</p>
  84. <blockquote>
  85. <p>[Generalists] think and talk about the web with nuance</p>
  86. </blockquote>
  87. <p>The web industry celebrates specialists, we adore single subject rock stars, but we should be careful not to dismiss people that don&#8217;t specialise, but generalise. Generalists, unlike specialists, cannot show off their specialisms on their CV, and may not be great at fizzbuzz, but they have other things to offer. They can think and talk about the web with nuance. They synthesise and when combining synthesis with their skills, show how valuable they are. When given a problem they have not seen before, they can synthesise and do it. Generalists are beginners over and over again.</p>
  88. <p>We should be generalists, Lyza concluded, we should cultivate wisdom and share it.</p>
  89. <h3>Where do we go from here?</h3>
  90. <p>The day was concluded by <a href="http://www.aaron-gustafson.com">Aaron Gustafson</a>, who looked at what&#8217;s next. The A List Apart article <a href="http://alistapart.com/article/responsive-web-design">Responsive web design</a>, Aaron said, was the first to provide a concrete example of the principles of <a href="http://alistapart.com/article/dao">A Dao of Web Design</a> (speaking of how valuable generalists are…). That article goes into the flexible nature of information on the web. Content created once, accessible anywhere, as it was envisioned by Tim Berners-Lee. </p>
  91. <blockquote>
  92. <p>Accessibility is core to the web, and it goes hand in hand with the flexible approach John Allsopp and Ethan Marcotte describe in their articles.</p>
  93. </blockquote>
  94. <p>Accessibility is core to the web, and it goes hand in hand with the flexible approach John Allsopp and Ethan Marcotte describe in their articles. Don&#8217;t make assumptions about how people want to access your website, just let them access it in any way they want, by providing solid mark-up of well structured content.</p>
  95. <p>Accessible websites have a benefit in the future of the web. There will be more controls and inputs, like gaze and eye/facial tracking. Voice will play a bigger role, too. You may have provided <span class="caps">CSS</span> with your content to display it beautifully across devices, but those users using voice will not see that. They will just be listening, so it is of utmost importance that your mark-up is well structured and the source order makes sense. That it is accessible. </p>
  96. <p>Responsive web design, Aaron concluded, is all about accessibility. It is about making things accessible in the best possible way. </p>
  97. <h2>Wrap-up</h2>
  98. <p>As may have become clear from my notes above, Responsive Day Out 3 was a day full of variety. I had the feeling it could have easily been called Web Day Out, and I guess that makes sense, as responsive web design has naturally grown to be a pleonasm in the past few years. </p>
  99. <p>I found a couple of common themes throughout the talks:</p>
  100. <ul>
  101. <li><strong>Let the browser figure it out.</strong> Throw multiple image types/resolutions at it, and let the browser decide which one to display, as Jason explained. Or like Zoe demonstrated, tell the browser roughly how you want your element to be with flexbox, and let the browser figure out the maths. Give it some relatively simple <span class="caps">CSS</span> instructions, and let it grid your content for you, as Heydon did.</li>
  102. <li><strong>Soon, we will be given more responsibilities.</strong> As Peter noted, Web Components will let us define our own components, which makes us responsible for setting up their usability and accessibility. Service Workers, as Jake showed, put us in control of network handling, so that we can decide how to handle requests (and respond to them with offline/cached content first). If we use Web Components or Service Workers, we explicitly choose not to let the browser figure it out, and provide our own algorithms.</li>
  103. <li><strong>Responsive web design is all about accessibility</strong>. Although it is hard to make a business case for it, accessibility is very important, as it is a core concept of the web, as Aaron mentioned, and, being mostly device-agnostic, our best bet at future proofing content for screens that don&#8217;t even exist yet, as Rosie pointed out.</li>
  104. <li><strong>Make things as flexible as you can</strong>. Good responsive design makes things very flexible. Flexbox and the non-binary improvements it creates, as Zoe discussed, make sure things work in many places at the same time.</li>
  105. </ul>