Accessible SVGs: Pattern, Color Contrast, and Motion Considerations

A presentation at CodeItLive Twitch Stream - We ❤ A11y in February 2022 in by Carie Fisher

Slide 1

Slide 1

Accessible SVGs: Pattern, Color Contrast, & Motion Considerations

Slide 2

Slide 2

Carie Fisher Sr. Accessibility Consultant & Trainer @ Deque HCI Ph.D. student @ Iowa State University

Slide 3

Slide 3

Today’s Agenda 01 Patterns 03 Animation 02 Color + Contrast 04 Wrap-up + Q&A

Slide 4

Slide 4

SVG Exporting Demo Step 1: codepen.io/cariefisher/pen/podrvxr

Slide 5

Slide 5

Patterns 01

Slide 6

Slide 6

SVG Pattern Considerations 01 02 03 Options AT Support Environment What image information needs to be conveyed? Which AT devices & tools need supporting? Are there any framework or user limitations?

Slide 7

Slide 7

SVG Pattern Matrix codepen.io/cariefisher/pen/QWpjded

Slide 8

Slide 8

SVG Pattern Choice Demo Step 2: codepen.io/cariefisher/pen/KKyvwjX

Slide 9

Slide 9

Color + Contrast 02

Slide 10

Slide 10

SVG Color + Contrast Considerations 01 02 03 WCAG Rules Tools Media Queries Essential images must meet a color contrast ratio of 3:1 Color contrast is a formula = many, many tool options @prefers-colorscheme supported by 92-93% of all browsers

Slide 11

Slide 11

SVG Prefers-Color-Scheme Demo Step 3: codepen.io/cariefisher/pen/NWwvqYy

Slide 12

Slide 12

Animation 03

Slide 13

Slide 13

SVG Animation Considerations 01 02 03 Be Selective WCAG Rules Media Queries First consider why the movement is needed at all You may need to include pause, stop, or hide options for users @prefers-reducedmotion supported by 94% of all browsers

Slide 14

Slide 14

SVG Adding Animation Demo Step 4: codepen.io/cariefisher/pen/abVyvOd

Slide 15

Slide 15

SVG Prefers-Reduced-Motion Demo Step 5: codepen.io/cariefisher/pen/ZEaJbpz

Slide 16

Slide 16

Wrap-up + Q&A 04

Slide 17

Slide 17

SVG Animation Considerations 01 02 03 Patterns Color + Contrast Animation There are a lot of pattern options regardless of platform/AT support you need! With a few more lines of code you can accommodate more of your users’ visual needs! With a few more lines of code you can accommodate more of your users’ motion needs!

Slide 18

Slide 18

“How many opportunities do we have to dramatically improve people’s lives just by doing our job a little better?” Steve Krug

Slide 19

Slide 19

Thanks! @cariefisher cariefisher.com