edit text blank – Inputs & Accessibility

A presentation at Berlin.JS in February 2020 in Berlin, Germany by Oscar

Slide 1

Slide 1

🚨🚨 🚨🚨 🚨🚨 🚨🚨 🚨🚨 🚨🚨 🚨🚨 🚨🚨 🚨🚨 🚨🚨 🚨🚨 🚨🚨 🚨🚨 🚨🚨 🚨🚨 🚨🚨 🚨🚨 🚨🚨 🚨🚨 🚨🚨 🚨🚨 🚨🚨 🚨🚨 🚨🚨 🚨🚨 🚨🚨 🚨 59,653,607

Slide 2

Slide 2

edit text blank Accessibility, Inputs & JavaScript tournant I think we need to talk about accessibility more broadly Oscar, he/him Tournant

Slide 3

Slide 3

https://r.ovl.design/bjs-200220 Slides, Resources & Co. Twitter: @_ovlb

Slide 4

Slide 4

Babelfish

Slide 5

Slide 5

WAI W3C Web Accessibility Initiative https://www.w3.org/WAI/ Group of authors in W3C working improving accessibility in websites

Slide 6

Slide 6

ARIA Accessible Rich Internet Applications https://www.w3.org/WAI/standards-guidelines/aria/ A Specification «These semantics are designed to allow an author to properly convey user interface behaviors and structural information to assistive technologies in document-level markup.»

Slide 7

Slide 7

«WAI-ARIA provides a collection of accessibility states and properties […].» ARIA https://www.w3.org/TR/wai-aria/#usage which are used to support platform accessibility APIs on various operating system platforms Markup static, ARIA allows developers to change things dynamically. Hence the rich

Slide 8

Slide 8

WCAG Web Content Accessibility Guidelines https://www.w3.org/WAI/standards-guidelines/wcag/ Define Success Criteria Show Techniques

Slide 9

Slide 9

A11Y Shorthand for accessibility Eleven letters between a and y Term itself is not undisputed in the accessibility community

Slide 10

Slide 10

«The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.» Tim Berners-Lee, 1997 https://www.w3.org/Press/IPO-announce When the W3C launched the Web Accessibility Initiative

Slide 11

Slide 11

«Users with disabilities would expect to encounter detectable errors on 1 in every 13 elements with which they engage.» The WebAIM Million – Errors and Error Density https://webaim.org/projects/million/ 97.8% of home pages had detectable WCAG 2 failures! Accessibility is a topic incredibly hard to test automatically WCAG conformant sites probably under 1 %

Slide 12

Slide 12

🤦 What happened?

Slide 13

Slide 13

Neglect

Slide 14

Slide 14

These are very basic things Mostly easy to fix Alt text for large publications requires a team effort, especially if it is missing for a long time

Slide 15

Slide 15

Slide 16

Slide 16

🙈 24% of organisations think they are WCAG compliant

Slide 17

Slide 17

👨👨👨👨👨👨👨👨👨👨 Mostly white, male and able-bodied

Slide 18

Slide 18

It’s not us. It’s society. But also us. We are privileged We are responsible for what we do with it

Slide 19

Slide 19

Slide 20

Slide 20

«Privilege is not my fault. But it is my responsibility.» Tatiana Mac https://www.youtube.com/watch?v=Hzs_8e3Xhhc

Slide 21

Slide 21

Complexity Over time websites have evolved from a medium to exchange scientific papers to one in which you can do basically anything These are the things that are – more often than not – not easy to fix

Slide 22

Slide 22

🚀

Slide 23

Slide 23

Accessibility is no rocket science. And everybody benefits. Some things are hard, yes. But let’s get the basics right.

Slide 24

Slide 24

WE NEED TO ACT. If we don’t want to look like a bunch of overpaid bollocks. Get people involved in web dev Listen to those who speak up

Slide 25

Slide 25

Making the Web Accessible

Slide 26

Slide 26

COLLABORATION On your own, understanding the ARIA and WCAG pages can be daunting

Slide 27

Slide 27

«The only way this work gets done is if we start small, and if we work together.» Ethan Marcotte – The web we broke https://ethanmarcotte.com/wrote/the-web-we-broke/ He asked the question «What’s one thing I wish I understood better about accessibility?»

Slide 28

Slide 28

USE SEMANTIC MARKUP. And ARIA where applicable. The first rule of ARIA is «Do not use ARIA» e.g. buttons «ARIA, the language created to help make interfaces more accessible, was found on more than sixty percent of the home pages surveyed. Unfortunately, those home pages were more likely to have detectable accessibility errors.» Ethan Marcotte citing from AIM 1 million

Slide 29

Slide 29

USE ASSISTIVE TECHNOLOGY. Start small, by clicking around and listen to the SR output Start navigating around with your keyboard Close your eyes

Slide 30

Slide 30

ASK USERS. They are the experts. Nothing about us without us Be humble We are not able to say what works, e.g. steep wheelchair ramp

Slide 31

Slide 31

PUT ACCESSIBILITY IN THE DEFINITION OF DONE … and be it your own. That means things you are going to do. It’s impossible to just make a whole existing site accessible. Try to get the people you are reporting aboard and agree

Slide 32

Slide 32

Accessible Inputs Why talk about this?

Slide 33

Slide 33

https://playground.owlish.dev/inclusive-inputs/

Slide 34

Slide 34

«59% of the 3.4 million form inputs identified were unlabeled (either via <label>, aria-label, or aria-labelledby).» The WebAIM Million – Form Labeling https://webaim.org/projects/million/#labels «The presence of unlabeled form controls was a strong indicator of broader errors—pages with at least one missing form label averaged nearly 30 more errors than those without any label errors.» Past interfaces I built are full of errors, present ones probably too

Slide 35

Slide 35

Structure taken from an online course Not everything is just divs

Slide 36

Slide 36

Slide 37

Slide 37

LABELING

Slide 38

Slide 38

Slide 39

Slide 39

Slide 40

Slide 40

Slide 41

Slide 41

Very little has changed

Slide 42

Slide 42

aria-label

Slide 43

Slide 43

Slide 44

Slide 44

Two circling hearts, button

Slide 45

Slide 45

DON’T MAKE YOUR USERS GUESS. Unless you write the crosswords for the New York Times.

Slide 46

Slide 46

Slide 47

Slide 47

Slide 48

Slide 48

ACCESSIBLE ICON BUTTONS https://www.sarasoueidan.com/blog/accessible-icon-buttons/

Slide 49

Slide 49

MARKING REQUIRED FIELDS

Slide 50

Slide 50

Slide 51

Slide 51

Slide 52

Slide 52

aria-hidden Hide an element from Assistive Technology

Slide 53

Slide 53

HIDING ELEMENTS FROM SCREEN READERS USING aria-hidden https://www.accessibility-developer-guide.com/examples/sensible-aria-usage/hidden/

Slide 54

Slide 54

Slide 55

Slide 55

Source: Scott O’Hara – Inclusively Hidden https://www.scottohara.me/blog/2017/04/14/inclusively-hidden.html

Slide 56

Slide 56

Slide 57

Slide 57

Slide 58

Slide 58

REQUIRED ATTRIBUTE REQUIREMENTS https://developer.paciellogroup.com/blog/2019/02/requiredattribute-requirements/

Slide 59

Slide 59

DESCRIBING FIELDS

Slide 60

Slide 60

Slide 61

Slide 61

And with this problem we leave the realm of native HTML

Slide 62

Slide 62

aria-describedby Describe an element using the text content of another aria-describedby, provides the means to associate an element with the text of another object, or objects, in the document. When properly used, this attribute can provide the necessary information to assist in creating inclusive user experiences.»

Slide 63

Slide 63

DESCRIBING aria-describedby https://developer.paciellogroup.com/blog/2018/09/describing-aria-describedby/ Scott O’Hara

Slide 64

Slide 64

Slide 65

Slide 65

Slide 66

Slide 66

Slide 67

Slide 67

Slide 68

Slide 68

Expanding the Toolbox 🧰

Slide 69

Slide 69

«The only way this work gets done is if we start small, and if we work together.» Ethan Marcotte – The web we broke https://ethanmarcotte.com/wrote/the-web-we-broke/

Slide 70

Slide 70

https://www.ovl.design/text/inclusive-inputs/

Slide 71

Slide 71

Install all you problems away

Slide 72

Slide 72

https://r.ovl.design/bjs-200220 Slides, Resources & Co. Twitter: @_ovlb

Slide 73

Slide 73

Unbreak the web. tournant https://ui.tournant.dev @tournantdev ♡