Responsible responsive typography: a crash-course on variable fonts and accessibility

A presentation at c’t webdev in February 2020 in Cologne, Germany by Damien Senger

Slide 1

Slide 1

RESPONSIBLE RESPONSIVE WEB TYPOGRAPHY c’t webdev • Köln, Germany • February 5, 2020

Slide 2

Slide 2

Hi! 👋 I’m Damien.

Slide 3

Slide 3

Reading is one of the most universal yet personal human activity. c’t webdev • February 2019 • @iamhiwelo

Slide 4

Slide 4

Buckle up! Let’s talk about readability.

Slide 5

Slide 5

But first, why?

Slide 6

Slide 6

Slide 7

Slide 7

Reading is a complex cognitive process with an important learning curve. c’t webdev • February 2019 • @iamhiwelo

Slide 8

Slide 8

± 10% of the global population is having a degree of dyslexia. World Health Organization, 2011 c’t webdev • February 2019 • @iamhiwelo

Slide 9

Slide 9

Literacy is not always a life-long skill. You can acquire reading difficulties. c’t webdev • February 2019 • @iamhiwelo

Slide 10

Slide 10

Not always since childhood: it can appear after brain injuries, strokes or just for new languages you are learning. c’t webdev • February 2019 • @iamhiwelo

Slide 11

Slide 11

So no, a text is not accessible by essence. c’t webdev • February 2019 • @iamhiwelo

Slide 12

Slide 12

In 2018, W3C-WAI introduced an accessibility success criterion related to readability. c’t webdev • February 2019 • @iamhiwelo

Slide 13

Slide 13

WCAG Success Criterion 1.4.12 Text Spacing (Level AA): In content implemented using markup languages that support the following text style properties, no loss of content or functionality occurs by setting all of the following and by changing no other style property: Line height (line spacing) to at least 1.5 times the font size; Spacing following paragraphs to at least 2 times the font size; Letter spacing (tracking) to at least 0.12 times the font size; Word spacing to at least 0.16 times the font size. c’t webdev • February 2019 • @iamhiwelo

Slide 14

Slide 14

WCAG 1.4.12 ✅ c’t webdev • February 2019 • @iamhiwelo

Slide 15

Slide 15

WCAG 1.4.12 ❌ c’t webdev • February 2019 • @iamhiwelo

Slide 16

Slide 16

WCAG 1.4.12 are not a set of guidelines to apply, but a series of rules to test. When applied, the layout should not break. c’t webdev • February 2019 • @iamhiwelo

Slide 17

Slide 17

How do we read?

Slide 18

Slide 18

Reading is about sounds. 🎵 Reading is about rhythm. 🎶 Reading is about music. 🎼 c’t webdev • February 2019 • @iamhiwelo

Slide 19

Slide 19

Reading is mainly a phonological process, heavily influenced by the environment. c’t webdev • February 2019 • @iamhiwelo

Slide 20

Slide 20

Reading is not linear, we are reading by saccades. c’t webdev • February 2019 • @iamhiwelo

Slide 21

Slide 21

And between each saccades, we have something called fixation. c’t webdev • February 2019 • @iamhiwelo

Slide 22

Slide 22

During a fixation, everything except the focus is blurry. § c’t webdev • February 2019 • @iamhiwelo

Slide 23

Slide 23

So reading is not so much about letters… it is more about identifying shapes. c’t webdev • February 2019 • @iamhiwelo

Slide 24

Slide 24

Typical result of eye tracking sessions (extrapolated from the result of a study made by the Norman Nielsen Group (2017) Web Content Accessibility Guidelines (WCAG) is developed through the W3C process in cooperation with individuals and organizations around the world, with a goal of providing a single shared standard for web content accessibility that meets the needs of individuals, organizations, and governments internationally. c’t webdev • February 2019 • @iamhiwelo

Slide 25

Slide 25

Taht’s wyh yuo cna porbalby raed tihs esaliy desptie teh msispeillgns. That’s why you can probably read this easily despite the misspellings. c’t webdev • February 2019 • @iamhiwelo

Slide 26

Slide 26

Shape recognition is possible thanks to letters’ identifying features c’t webdev • February 2019 • @iamhiwelo

Slide 27

Slide 27

Readability READABILITY c’t webdev • February 2019 • @iamhiwelo

Slide 28

Slide 28

problem porbelm Not only we recognize shapes, but we are also identifying phonemes, it is one of the methods used to recognize words despite misspellings in a sentence. pbleorm c’t webdev • February 2019 • @iamhiwelo

Slide 29

Slide 29

So, that’s how we read. But, what’s the point?

Slide 30

Slide 30

Because multiple cognitive processes are involved, this universal method becomes highly personal. c’t webdev • February 2019 • @iamhiwelo

Slide 31

Slide 31

Readability is far more than font style and size. Colors, spacing, tracking, layout can have an impact. c’t webdev • February 2019 • @iamhiwelo

Slide 32

Slide 32

The gradient helps you to track your position in a sentence. The usage of different colors helps you to track your position in a paragraph. Inline color variations and gradients improve readability for dyslexic & ADHD folks Laboratory for Visual Learning at the Harvard-Smithsonian Center for Astrophysics

Slide 33

Slide 33

People can adapt their experience to their needs, even if they are often not aware of that. c’t webdev • February 2019 • @iamhiwelo

Slide 34

Slide 34

For example, assistive technologies are doing more than offering “screen-reader”-ish experiences. c’t webdev • February 2019 • @iamhiwelo

Slide 35

Slide 35

⚠ This is not a night-mode or a dark theme. Some assistive technologies can help people to improve their reading experience

Slide 36

Slide 36

i.e. Midnight Lizard applies a custom color scheme to all visited websites

Slide 37

Slide 37

But you can also offer variations for people not using assistive technologies. Twitter offers font size, primary color and background color customization.

Slide 38

Slide 38

Let’s take a look to something designed for readability. c’t webdev • February 2019 • @iamhiwelo

Slide 39

Slide 39

credits: Mijksenaar

Slide 40

Slide 40

A series of weight variations for a good visual hierarchy credits: Mijksenaar

Slide 41

Slide 41

A tracking depending of the context credits: Mijksenaar

Slide 42

Slide 42

A system as consistent as possible credits: Mijksenaar

Slide 43

Slide 43

This is readable, and efficient. Great. But can we do better? credits: Mijksenaar

Slide 44

Slide 44

So, I’m sold. What can we do?

Slide 45

Slide 45

Based on the airport signs, here’s 8 universal guidelines to apply: c’t webdev • February 2019 • @iamhiwelo

Slide 46

Slide 46

Divide your content in sections. 1.

Slide 47

Slide 47

Structure your content with headings. 2.

Slide 48

Slide 48

Provide visuals to illustrate the content 3.

Slide 49

Slide 49

Be straightforward, go directly to the point 4.

Slide 50

Slide 50

Limit the usage of italic and all-caps 5.

Slide 51

Slide 51

There is never too much white space 6.

Slide 52

Slide 52

Break lines after 50-70 characters 7.

Slide 53

Slide 53

Use colors and bold to highlight information 8.

Slide 54

Slide 54

These guidelines are not only about design, it must rely on a semantic implementation. c’t webdev • February 2019 • @iamhiwelo

Slide 55

Slide 55

HTML & CSS rock. Good accessibility comes out of the box with a semantic HTML c’t webdev • February 2019 • @iamhiwelo

Slide 56

Slide 56

Use relative sizes instead of fixed values c’t webdev • February 2019 • @iamhiwelo

Slide 57

Slide 57

Using rem is straightforward. Especially with tricks like a 62,5% font-size on :root c’t webdev • February 2019 • @iamhiwelo

Slide 58

Slide 58

Variable fonts will help you doing the extra mile.

Slide 59

Slide 59

Accessibility is hard. c’t webdev • February 2019 • @iamhiwelo

Slide 60

Slide 60

It is hard because there is no one-fits-all solution. c’t webdev • February 2019 • @iamhiwelo

Slide 61

Slide 61

Creating accessible and inclusive experiences is about collaboration and customisation. c’t webdev • February 2019 • @iamhiwelo

Slide 62

Slide 62

Variable fonts can help create collaboration between designers and engineers. c’t webdev • February 2019 • @iamhiwelo

Slide 63

Slide 63

We can use variable fonts to offer a better experience when using justification. c’t webdev • February 2019 • @iamhiwelo

Slide 64

Slide 64

Variable fonts can also help users to customize their experience. c’t webdev • February 2019 • @iamhiwelo

Slide 65

Slide 65

Customization is needed because we have different capabilities, we are used to different media and platforms, and we are not reading the same way. c’t webdev • February 2019 • @iamhiwelo

Slide 66

Slide 66

There is no standard “readable” experience. c’t webdev • February 2019 • @iamhiwelo

Slide 67

Slide 67

When we aim to provide content to users, there is 3 strategies: Pushing a single reading experience regardless of the needs of your users Providing the content with limited customization (font size, font family, background color, …) Offering the content only, the user is free to customize c’t webdev • February 2019 • @iamhiwelo

Slide 68

Slide 68

Variable fonts can offer the best of both worlds c’t webdev • February 2019 • @iamhiwelo

Slide 69

Slide 69

You can think about variable fonts like a super-complete font-size toggle. Only downside: it can’t rely on the browser. c’t webdev • February 2019 • @iamhiwelo

Slide 70

Slide 70

What is the variable part of a variable font?

Slide 71

Slide 71

Source: Enhancing the On-Screen Reading Experience With Variable Fonts Bianca Berning, Blog Shopify Partners c’t webdev • February 2019 • @iamhiwelo

Slide 72

Slide 72

There is 4 registered axes. c’t webdev • February 2019 • @iamhiwelo

Slide 73

Slide 73

Source: Variable fonts for a variable world Phil Garnham, Fontsmith c’t webdev • February 2019 • @iamhiwelo

Slide 74

Slide 74

c’t webdev • February 2019 • @iamhiwelo

Slide 75

Slide 75

c’t webdev • February 2019 • @iamhiwelo

Slide 76

Slide 76

c’t webdev • February 2019 • @iamhiwelo

Slide 77

Slide 77

c’t webdev • February 2019 • @iamhiwelo

Slide 78

Slide 78

Variable fonts offer also custom axes defined by the font designer. c’t webdev • February 2019 • @iamhiwelo

Slide 79

Slide 79

And that’s the real game changer: the ability to configure the optical size. c’t webdev • February 2019 • @iamhiwelo

Slide 80

Slide 80

The optical size is an old design concept finally available for our Web experiences. c’t webdev • February 2019 • @iamhiwelo

Slide 81

Slide 81

c’t webdev • February 2019 • @iamhiwelo

Slide 82

Slide 82

Each optical size can be one of the variations defined in a design systems. (i.e. body, small text, caption, subhead, display variations) c’t webdev • February 2019 • @iamhiwelo

Slide 83

Slide 83

Source: Typography guidelines Polaris, Shopify Design System c’t webdev • February 2019 • @iamhiwelo

Slide 84

Slide 84

c’t webdev • February 2019 • @iamhiwelo

Slide 85

Slide 85

With only one font file, we could offer an important number of variations. c’t webdev • February 2019 • @iamhiwelo

Slide 86

Slide 86

It could include all design variation needed, but also some accessibility presets. c’t webdev • February 2019 • @iamhiwelo

Slide 87

Slide 87

With dyslexia, there is 3 main axes to watch: ascender or descender length, bowl size and bowl shape. c’t webdev • February 2019 • @iamhiwelo

Slide 88

Slide 88

With dyslexia, there is 3 main axes to watch: ascender or descender length, bowl size and bowl shape. c’t webdev • February 2019 • @iamhiwelo

Slide 89

Slide 89

Source: An exploration of Variable Fonts Mathieu Triay, BBC Research & Development Blog c’t webdev • February 2019 • @iamhiwelo

Slide 90

Slide 90

Wanna experiment with your projects?

Slide 91

Slide 91

Font size, optical size and media queries: an endless world of opportunities

Slide 92

Slide 92

Variable fonts like Fit can offer new ways to play with the layout.

Slide 93

Slide 93

Adapting the font design to the message, like this experimentation by the BBC

Slide 94

Slide 94

You can experiment with color and font variations

Slide 95

Slide 95

You can be creative, while offering an easy way for people to remove the custom font if needed

Slide 96

Slide 96

You can also adapt the text based on external factors Source: Enhancing the On-Screen Reading Experience With Variable Fonts Bianca Berning, Blog Shopify Partners

Slide 97

Slide 97

Finally, I would advise you to follow David Jonathan Ross. c’t webdev • February 2019 • @iamhiwelo

Slide 98

Slide 98

But also to read BBC’s experimentations, and to visit v-fonts.com and axis-praxis.org. c’t webdev • February 2019 • @iamhiwelo

Slide 99

Slide 99

Be bold, be creative, but keep accessibility in mind

Slide 100

Slide 100

One font file to rule them all. Ready to implement?

Slide 101

Slide 101

Bedankt! 🇳🇱 Merci beaucoup ! 🇫🇷 Tack så mycket! 🇸🇪 Thank you! 🇬🇧 Tusen takk! 🇳🇴 Vielen Dank! 🇩🇪 @iamhiwelo

Slide 102

Slide 102

Damien Senger Queer Web worker, specialized in accessibility & design systems. raccoon.studio • noti.st/hiwelo @iamhiwelo