WCAG 2.1 - What’s it all about?

A presentation at Melbourne Web A11y meetup in November 2018 in Melbourne VIC, Australia by Allison Ravenhall

Slide 1

Slide 1

WCAG 2.1 - What’s it all about?

Presented by Allison Ravenhall @RavenAlly Digital Accessibility Sensei at Intopia @Intopia

Slide 2

Slide 2

The W3C publish the Web Content Accessibility Guidelines (WCAG)

Version 1.0 was published in 1999. Version 2.0 was published in 2008. Version 2.1 was published in 2018.

Slide 3

Slide 3

WCAG 2.1 = WCAG 2.0 + 17 new success criteria

Slide 4

Slide 4

Level A (5 new success criteria)

Slide 5

Slide 5

2.1.4 Character Key Shortcuts

Prevent keyboard shortcut clashes with screen readers

Slide 6

Slide 6

Examples of potential keyboard clashes

Single-key keyboard commands for Microsoft Outlook, JAWS and Slack. JAWS uses keyboard commands that are also used by these web applications.

Slide 7

Slide 7

If you're going to build single-key keyboard commands, you must support at least one of:

  1. Turn off
  2. Remap
  3. Active only on focus

Slide 8

Slide 8

2.5.1 Pointer Gestures

Define simple pointer gestures

Slide 9

Slide 9

Single digit and single interaction is simple. Multiple digit and/or multiple interaction is complex.

Pinch = complex Tap = simple Screenshot of Google maps app on tablet with single finger tap and two-finger pinch icons.

Slide 10

Slide 10

Simple gestures = one finger, single interaction

  1. Tap
  2. Double-tap
  3. Long-press

Slide 11

Slide 11

Complex gestures = multiple fingers and/or multiple movements

  1. Swipe
  2. Tap & drag (slider)
  3. Tracing a path
  4. Pinch zoom
  5. One finger hold, second finger tap
  6. Multi-finger tap or swipe

Slide 12

Slide 12

Exceptions to simple gestures requirement

  1. Essential gestures
  2. User agent gestures (e.g. swipe to scroll browser)
  3. Assistive tech gestures (e.g. VoiceOver, TalkBack)

Slide 13

Slide 13

2.5.2 Pointer Cancellation

Enable users to cancel pointer gestures

Slide 14

Slide 14

Four scenarios to support pointer cancellation

  1. No down-event - fire event on release
  2. Up reversal - press to fire event, release to stop event
  3. Provide abort or undo after the event
  4. OK to fire on down event if it’s essential e.g. weapon fire in game

Slide 15

Slide 15

2.5.3 Label in Name

Start element labels with (unbroken) on-screen content

Slide 16

Slide 16

If there’s five “Add to Cart” buttons on screen, how is a screen reader user meant to tell them apart? A sighted voice control user can activate a specific button by saying “Click Add to cart” then saying the number applied to the button.

Slide 17

Slide 17

If the buttons have been enhanced with extra off-screen content, then a screen reader user can identify them more easily. “Add to cart” on-screen versus “Add apple to cart” for a screen reader. However, the voice control software doesn’t recognise “Add to cart” as a button anymore because that button label isn’t in the code anymore - it looks up the screen reader text, not the visible text.

Slide 18

Slide 18

If the screen reader label is rearranged so the on-screen label is read first, in full, unbroken, then screen reader users can uniquely identify buttons and voice control users can activate buttons by name. e.g. “Add to cart” on-screen, “Add to cart, apple” in code.

Slide 19

Slide 19

2.5.4 Motion Actuation

Provide alternatives to motion functions

Slide 20

Slide 20

Screenshot of tilt maze in Zelda Breath of the Wild on Nintendo Switch

A tilt maze gives no alternative to motion input. The player must tilt the controller to move the ball through the maze. This fails the requirement.

Slide 21

Slide 21

Screenshot of Mario Kart tilt controls setting

The Mario Kart game allows players to decide whether or not they want to user tilt controls. This enables people who can’t control the tilt steering to use the controller buttons to steer their kart instead.

Slide 22

Slide 22

Motion actuation exception #1

If movement is an essential part of the experience, then an alternative doesn’t need to be provided. Example: Just Dance game for Nintendo Switch tracks user motion and scores accuracy and timing. Without movement, there would be no game - it’s essential to the experience.

Slide 23

Slide 23

Motion actuation exception #2

If there is an accessible interface that can simulate the player motion, then the game/site/app itself doesn’t need to provide a non-motion experience. Example: XBox adaptive controller.

Slide 24

Slide 24

Level AA (7 new success criteria)

Slide 25

Slide 25

1.3.4 Orientation

Don’t make users read like this (text is presented sideways)

Slide 26

Slide 26

If content is locked to a particular orientation (portrait or landscape), this makes it hard to use for people with limited mobility who have their devices mounted on a stand.

Slide 27

Slide 27

It’s better for content to detect and adapt to the current device orientation.

Slide 28

Slide 28

Sometimes single orientation is essential. Example: piano can only be presented in landscape.

Slide 29

Slide 29

1.3.5 Identify Input Purpose

Add metadata to forms to enable autofill

Slide 30

Slide 30

A long list of all of the personal data input field types that can have autocomplete applied. Examples: given-name, family-name, address-line1, postal-code, tel, email.

Slide 31

Slide 31

Code example applying autocomplete to fields expecting a home email address and a password

<input type=”email” autocomplete=”home email” /> <input type=”password” autocomplete=”off” />

Slide 32

Slide 32

1.4.10 Reflow

Build responsive sites

Slide 33

Slide 33

Screenshot of a fixed-width desktop site, 100% zoom, one vertical scrollbar.

Slide 34

Slide 34

Screenshot of the same fixed-width desktop site at 400% zoom - one vertical and one horizontal scrollbar. People aren’t used to scrolling sideways and will likely miss information that’s “off to the right”.

Slide 35

Slide 35

Screenshot of a responsive mobile site at 400% zoom - one vertical scrollbar only. Big content has rearranged and flowed down.

Slide 36

Slide 36

Exceptions to Reflow

It’s OK to have horizontal scrollbars to maintain layout of: Data tables, images/diagrams/maps, video/games, presentations

Slide 37

Slide 37

1.4.11 Non-Text Contrast

Make graphics and UI elements really pop

Slide 38

Slide 38

All of the minimum AA contrast requirements

Headings = 3.0 : 1 Body text = 4.5 : 1 Element outlines = 3.0 : 1 Icons/graphics = 3.0 : 1 State styles = 3.0 : 1

Slide 39

Slide 39

1.4.12 Text Spacing

Text shouldn’t truncate, overlap, or overrun when users increase spacing

Slide 40

Slide 40

Sites need to maintain good layout with spacing up to these amounts: Letter spacing x 0.12 Word spacing x 0.16 Line spacing x 1.5 Paragraph spacing x 2

Slide 41

Slide 41

1.4.13 Content on Hover or Focus

Make tooltips and submenus more usable

Slide 42

Slide 42

First principle: Dismissable Keyboard users should be able to dismiss a menu at any time without moving to a specific element e.g. press Tab.

Slide 43

Slide 43

Second princple: Hoverable Pointer users should be able to move their pointer anywhere over the trigger element and the triggered content (e.g. a tooltip) without the content disappearing

Slide 44

Slide 44

Third principle: Persistent If a user triggers a menu or tooltip, it shouldn’t automatically disappear after some time. It should stay visible as long as the keyboard focus or pointer is within it.

Slide 45

Slide 45

4.1.3 Status Messages

Mark up status messages for assistive technology

Slide 46

Slide 46

Code example of a notification

<span role=”status”> Loading, please wait…</span>

Slide 47

Slide 47

Levels of announcement urgency

Alerts are Assertive (immediate) Status and Log are Polite (queued after current announcement) Marquee and Timer are Off (no announcement)

Slide 48

Slide 48

Bootstrap uses role=”alert” Screenshot of code sample of Bootstrap notification.

Slide 49

Slide 49

Summary

Keyboard shortcuts Simple gestures Orientation Metadata Responsive Pointer cancellation Non-text contrast Speech-friendly labels Text spacing Motion alternative Hover / focus behaviour Mark up status messages

Slide 50

Slide 50

Get accessible! Allison Ravenhall @RavenAlly Digital Accessibility Sensei at Intopia @Intopia