<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Juan Ruitiña</title>
    <link>https://ruitina.com/en/</link>
    <description>Recent content on Juan Ruitiña</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    <lastBuildDate>Wed, 06 Jul 2022 18:06:00 +0000</lastBuildDate><atom:link href="https://ruitina.com/en/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Why you shouldn&#39;t justify text on a website or app</title>
      <link>https://ruitina.com/dont-justify-text-on-websites-and-apps/</link>
      <pubDate>Wed, 06 Jul 2022 18:06:00 +0000</pubDate>
      
      <guid>https://ruitina.com/dont-justify-text-on-websites-and-apps/</guid>
      <description>&lt;p&gt;We are used to reading texts that are fully justified to left and right in books and newspapers; we even justify them ourselves in text processors such as Word. It is so tempting. For some, it gives documents a sense of perfection and professionalism. However, justifying text on a website or app is a bad idea for several reasons.&lt;/p&gt;
&lt;h2 id=&#34;justified-text-is-harder-to-read&#34;&gt;Justified text is harder to read&lt;/h2&gt;
&lt;p&gt;As my colleague &lt;a href=&#34;https://chriseichberger.com/&#34;&gt;Chris&lt;/a&gt; put it, typo rivers are no cry-me-a-river issue. Justified text is less readable because the space between words often creates so-called &lt;a href=&#34;https://en.wikipedia.org/wiki/Sentence_spacing_studies#Related_studies&#34;&gt;&amp;ldquo;rivers&amp;rdquo;&lt;/a&gt; of white, which can be distracting.&lt;/p&gt;








  




  





  






&lt;figure&gt;&lt;picture&gt;
      &lt;source srcset=&#34;https://ruitina.com/images/2020/rio-de-blanco_hu3641808313772966963.webp&#34; type=&#34;image/webp&#34;&gt;&lt;img loading=&#34;lazy&#34; src=&#34;https://ruitina.com/images/2020/rio-de-blanco_hu7031518129622686262.png&#34;
          alt=&#34;Narrow paragraph, in which justification causes words to be excessively separated. This separation is repeated in several lines and forms a so-called river.&#34;width=&#34;270&#34;
          height=&#34;466&#34;
      /&gt;
    &lt;/picture&gt;&lt;figcaption&gt;
            &lt;p&gt;Example of rivers of white&lt;/p&gt;
        &lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;Moreover, the space between words changes from line to line, &lt;a href=&#34;https://szmigiel.design/en/blog/why-full-justification-on-the-web-is-a-bad-idea/&#34;&gt;disturbing the rhythm&lt;/a&gt; of the text. Justification also makes it difficult to keep track of the line we are reading. Even if we don&amp;rsquo;t notice, the irregular shape of left-aligned text provides a visual cue of reading progress.&lt;/p&gt;
&lt;h2 id=&#34;less-readable-means-less-accessible&#34;&gt;Less readable means less accessible&lt;/h2&gt;
&lt;p&gt;Readability issues get even worse for readers with dyslexia. Aligning text on only one side is &lt;a href=&#34;https://www.w3.org/TR/WCAG20-TECHS/G169.html&#34;&gt;required&lt;/a&gt; to comply with the World Wide Web Consortium&amp;rsquo;s (W3C) &lt;a href=&#34;https://es.wikipedia.org/wiki/Web_Content_Accessibility_Guidelines&#34;&gt;Web Content Accessibility Guidelines&lt;/a&gt; (WCAG). An estimated &lt;a href=&#34;https://w3c.github.io/wcag/coga/gap-analysis.html#prevalence&#34;&gt;10% of the population&lt;/a&gt; is dyslexic to some extent.&lt;/p&gt;
&lt;p&gt;Rivers and shifting spaces between words are &lt;a href=&#34;https://www.castlegateit.co.uk/2013/09/can-justified-text-be-justifed-for-the-web/&#34;&gt;also problematic&lt;/a&gt; when using screen magnifiers. Once again, it is easier to find the right line in left-aligned text, even after scrolling.&lt;/p&gt;
&lt;h2 id=&#34;hyphenation-is-not-reliable-on-the-web&#34;&gt;Hyphenation is not reliable on the web&lt;/h2&gt;
&lt;p&gt;OK, text is usually justified in books and newspapers. But these always rely on &lt;strong&gt;hyphenation&lt;/strong&gt; at the end of line, avoiding rivers.&lt;/p&gt;
&lt;p&gt;Hyphenation is reliable in editorial software such as InDesign, but not so much on the web. The CSS property &lt;code&gt;hyphens&lt;/code&gt; serves this purpose, but it&amp;rsquo;s not there yet. For this feature to work, the browser needs a partition dictionary &lt;a href=&#34;https://developer.mozilla.org/en-US/docs/Web/CSS/hyphens#browser_compatibility&#34;&gt;for each language&lt;/a&gt;. So far English is the only language with good support across all major browsers; only &lt;a href=&#34;https://www.mozilla.org/en-GB/firefox/&#34;&gt;Firefox&lt;/a&gt; and to a lesser extent Safari have good support beyond English.&lt;/p&gt;
&lt;p&gt;Rivers are less noticeable as the text body gets wider, but we also know that texts are much easier to read when there are &lt;a href=&#34;https://baymard.com/blog/line-length-readability&#34;&gt;75 characters or less (about 12 words) per line&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;On the other hand, more than 50% of today&amp;rsquo;s web traffic comes from mobile devices, where a significantly smaller line width and therefore more noticeable and annoying rivers are to be expected.&lt;/p&gt;
&lt;h2 id=&#34;its-bad-typography&#34;&gt;It&amp;rsquo;s bad typography&lt;/h2&gt;
&lt;p&gt;Typography is not only the shape of the characters (or glyphs) but also the spaces between characters and between words, which are carefully designed. Text justification affects the spacing between words. If you don&amp;rsquo;t have the typographical skills nor the technical ability to fine-tune word and letter spacing (and the latter is practically impossible on the web), don&amp;rsquo;t overthink it: left align all text. Let&amp;rsquo;s make the most of the work of those who design typefaces.&lt;/p&gt;
&lt;h2 id=&#34;the-most-convincing-argument-no-major-website-justifies-text&#34;&gt;The most convincing argument: no major website justifies text.&lt;/h2&gt;
&lt;p&gt;Do you think that not justifying text makes it look less professional? Look closely: no major media outlet does it on its website. Neither the &lt;a href=&#34;https://www.nytimes.com/2020/02/24/smarter-living/how-to-be-good.html&#34;&gt;New York Times&lt;/a&gt;, nor &lt;a href=&#34;https://cat.elpais.com/cat/2020/02/28/cultura/1582880963_777449.html&#34;&gt;El País&lt;/a&gt;, nor &lt;a href=&#34;https://www.theguardian.com/commentisfree/2020/feb/28/elizabeth-warren-campaign-not-dead&#34;&gt;The Guardian&lt;/a&gt;, nor &lt;a href=&#34;https://www.lemonde.fr/international/article/2020/02/28/apres-plus-d-un-siecle-de-debats-le-congres-americain-s-apprete-a-reconnaitre-le-lynchage-comme-un-crime-federal_6031138_3210.html&#34;&gt;Le Monde&lt;/a&gt;. You won&amp;rsquo;t find justified text in social networks or apps either. &lt;a href=&#34;https://wordpress.org/&#34;&gt;WordPress&lt;/a&gt;, the &lt;abbr title=&#34;Content Management System&#34;&gt;CMS&lt;/abbr&gt; that runs a third of all websites, removed the justify button from its editor &lt;a href=&#34;https://wptavern.com/wordpress-4-7-removes-the-underline-and-justify-buttons-from-the-editor&#34;&gt;in 2016&lt;/a&gt;. Figma keeps the option to justify texts, but in a rather hidden place.&lt;/p&gt;
&lt;p&gt;If you design for a living, you may have to convince others (clients, colleagues, or perhaps your boss) that you shouldn&amp;rsquo;t justify text. Show them how the media outlets they consider reputable don&amp;rsquo;t. Let &lt;a href=&#34;https://en.wikipedia.org/wiki/Argument_from_authority&#34;&gt;argument from authority&lt;/a&gt; do what usability arguments cannot.&lt;/p&gt;
&lt;h2 id=&#34;and-in-print&#34;&gt;And in print?&lt;/h2&gt;
&lt;p&gt;Although justified text is common in print, no, it is not necessary either. The problems outlined above still apply to print. The narrower the text body, especially below 40 characters, the more problematic it gets: even when using a good partitioning system - like InDesign&amp;rsquo;s - you might still get too many broken words.&lt;/p&gt;
&lt;p&gt;Some newspapers align some text to the left. Gemma Navarro, a designer I was lucky enough to have as a teacher some time ago, does not justify the texts in the magazines she designs. And &lt;a href=&#34;https://www.behance.net/gallery/26091591/Makeshift-11-Ritual&#34;&gt;they are&lt;/a&gt; &lt;a href=&#34;https://www.behance.net/gallery/6768693/The-Outpost-01&#34;&gt;beautiful&lt;/a&gt;. Try it, you might be surprised.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;This article is largely based on &lt;a href=&#34;https://designforhackers.com/blog/justify-text-html-css/&#34;&gt;this one from Design for Hackers&lt;/a&gt;. I&amp;rsquo;ve also used as a source &lt;em&gt;&lt;a href=&#34;https://www.casadellibro.com/libro-los-elementos-del-estilo-tipografico-2-ed/9786071620095/2586424&#34;&gt;The Elements of Typographic Style&lt;/a&gt;&lt;/em&gt;, by Robert Bringhurst, who, while not opposed to text justification, does argue that problems of text setting should never be &amp;ldquo;left to machines&amp;rdquo;. I don&amp;rsquo;t know if I agree (is using artificial intelligence excessive?), but it highlights the need to be careful with text wrapping.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>APCA: the new algorithm for accessible colour contrast</title>
      <link>https://ruitina.com/apca-accessible-colour-contrast/</link>
      <pubDate>Sat, 28 May 2022 09:45:00 +0000</pubDate>
      
      <guid>https://ruitina.com/apca-accessible-colour-contrast/</guid>
      <description>&lt;p&gt;Ensuring sufficient colour contrast is one of the minimum requirements for making a website or app accessible. For instance, any given user might have issues telling apart a light colour on top of a light background. This depends on many factors, such as screen quality or the user having colour perception deficiencies or cataracts.&lt;/p&gt;
&lt;p&gt;The &lt;a href=&#34;https://www.w3.org/WAI/standards-guidelines/wcag/es&#34;&gt;Web Content Accessibility Guidelines&lt;/a&gt;, the current standard in the field, offers an algorithm to check whether the combination of two colours is accessible. This algorithm is used by many design professionals to inform their colour choices. But it is not perfect.&lt;/p&gt;
&lt;p&gt;Its excessive &lt;a href=&#34;https://www.w3.org/TR/WCAG20-TECHS/G17.html&#34;&gt;simplicity&lt;/a&gt; causes &lt;strong&gt;false positives and negatives&lt;/strong&gt;. In the best case, that might result in a poorer colour palette; in the worst, in less accessible digital products. The coming version of the standard, WCAG 3, is expected to introduce a new, more sophisticated algorithm that makes up for the older one&amp;rsquo;s shortcomings.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s called &lt;strong&gt;Accessible Perceptual Contrast Algorithm (APCA)&lt;/strong&gt;.&lt;/p&gt;
&lt;h2 id=&#34;what-is-different-about-apca&#34;&gt;What is different about APCA?&lt;/h2&gt;
&lt;p&gt;The current algorithm calculates contrast simply by dividing the luminance of each colour. However, as Lisa Charlotte Muth explains in &lt;a href=&#34;https://blog.datawrapper.de/color-contrast-check-data-vis-wcag-apca/&#34;&gt;this fantastic article&lt;/a&gt;, if the calculated luminance of a colour drops 20%, real users won&amp;rsquo;t necessarily perceive the new colour as 20% darker.&lt;/p&gt;
&lt;p&gt;The new &lt;a href=&#34;https://github.com/Myndex/SAPC-APCA&#34;&gt;APCA algorithm&lt;/a&gt; accounts for this &lt;strong&gt;perceived contrast&lt;/strong&gt; of relative luminance, which also depends on:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Which colour is used for text and which for the background.
&lt;ul&gt;
&lt;li&gt;This is indifferent for WCAG 2 algorithm.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;What the text size (&lt;code&gt;font-size&lt;/code&gt;) and weight (&lt;code&gt;font-weight&lt;/code&gt;: light, regular, bold&amp;hellip;) are.
&lt;ul&gt;
&lt;li&gt;WCAG 2 only accounts for this by providing two different minimum contrast rates for &lt;a href=&#34;https://www.w3.org/WAI/WCAG21/Understanding/contrast-minimum.html&#34;&gt;&amp;ldquo;normal&amp;rdquo; and &amp;ldquo;large&amp;rdquo; text (larger than 14pt/18px)&lt;/a&gt;. The latter requires a smaller ratio given that larger text is more easily perceivable.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;the-forgotten-colours&#34;&gt;The forgotten colours&lt;/h2&gt;
&lt;p&gt;APCA provides a more accurate estimation of human contrast perception. As a result, it considers as valid colour combinations that we know work but that WCAG 2 rejected, and viceversa.&lt;/p&gt;
&lt;p&gt;A clear example is the use of orange. When relying on the WCAG 2 algorithm, you might feel inclined to use black text on top of an orange background. But something felt wrong: when conducting user research, &lt;a href=&#34;https://www.bounteous.com/insights/2019/03/22/orange-you-accessible-mini-case-study-color-ratio/&#34;&gt;like Ericka O&amp;rsquo;Connor did&lt;/a&gt;, or even out of our own intuition, it seemed clear that white text on orange was more perceivable.&lt;/p&gt;
&lt;p&gt;Here is a sample (not accounting for text characteristics):&lt;/p&gt;








  




  





  






&lt;figure&gt;&lt;picture&gt;
      &lt;source srcset=&#34;https://ruitina.com/images/2022/apca-contrast_hu18024777462437577519.webp&#34; type=&#34;image/webp&#34;&gt;&lt;img loading=&#34;lazy&#34; src=&#34;https://ruitina.com/images/2022/apca-contrast_hu11381322869402717075.png&#34;
          alt=&#34;Comparison of WCAG 2 and APCA. APCA returns positive results for colour combinations that might be more accessible, such as white text over orange and blue text over white&#34;width=&#34;600&#34;
          height=&#34;600&#34;
      /&gt;
    &lt;/picture&gt;
&lt;/figure&gt;
&lt;h2 id=&#34;validators-and-tools&#34;&gt;Validators and tools&lt;/h2&gt;
&lt;p&gt;Even if WCAG 3 is still a draft and the algorithm is not final yet, there are already plenty of tools that let us leverage APCA:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://www.myndex.com/APCA/&#34;&gt;APCA Contrast Calculator&lt;/a&gt;: the &amp;ldquo;official&amp;rdquo; calculator by Myndex Research, creators of the new algorithm. You will need to enter the colours for text and background, and it will return the minimum accessible font size that you can use for any given font weight.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://contrast.tools/&#34;&gt;Contrast tools&lt;/a&gt; is, in my experience, the most useful. It provides a table that shows how accessible different combinations &lt;em&gt;of font size and weight&lt;/em&gt; are for any given pair of colours. It also explains it all pretty clearly&lt;/li&gt;
&lt;li&gt;If you need to assess an existing colour palette or come up with a new one from scratch, you can use tools like &lt;a href=&#34;https://accessiblepalette.com/&#34;&gt;Accessible Palette&lt;/a&gt; and &lt;a href=&#34;https://www.coloreasily.com/&#34;&gt;Color Easily&lt;/a&gt;. Both will let you evaluate every colour pair with APCA.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;should-i-start-using-apca-already&#34;&gt;Should I start using APCA already?&lt;/h2&gt;
&lt;p&gt;Yes, you should. In the end, real accessibility is more important than the output of any tool: using colour combinations that are more perceivable is more important that meeting the standard. Testing these combinations with real users is also a good idea.&lt;/p&gt;
&lt;p&gt;If you &lt;em&gt;need&lt;/em&gt; to comply with the standards, then you can try to use colour combinations that are valid for both algorithms.&lt;/p&gt;
</description>
    </item>
    
  </channel>
</rss>
