Web Accessibility for Designers

Agenda

  1. The basics of accessibility
  2. Understanding various disabilities
  3. Color contrast
  4. Heading structure and design
  5. Control design
  6. Form design
  7. Animation
  8. Visual focus indicator
  9. Touch targets/white space
  10. Content

And much more!

Intros! 👋

  1. Your name
  2. Favorite Netflix show
  3. What you hope to learn today
Design with an inclusive mindset; create products everyone can use.

What is accessibility?

Mindfulness is key

  • Poor connection speed — Performance
  • Handheld device — Responsive design
  • Person with disability — Accessibility

Disabilities

  • Visual impairments
  • Deafness / hard of hearing
  • Motor disabilities
  • Vestibular issues / seizure disorders
  • Cognitive disabilities

Understanding Disabilities

Visual impairments

A person using a braille reader.
  • Low vision — difficulty seeing things clearly
  • Color blindness — cannot perceive the difference between color
  • Legally blind — only see light, vague shapes, or nothing at all

Challenges and assistive technology

Challenges
People not being able to see the screen or have difficulty discerning color.
Assistive technology
Glasses, text zoom software, screen reader, braille reader.

Deafness / hard of hearing

Two people sitting on a couch signing.
  • Deaf — very little or no functional hearing
  • Hard of Hearing — mild-to-moderate hearing

Challenges and assistive technology

Challenges
People not being able to hear video or audio content.
Assistive technology
Hearing aid, captions/audio descriptions, transcripts.

Motor disabilities

A wheelchair user riding a pool at a skate park wearing a helmet.
  • Paraplegia or quadriplegia — paralysis of the limbs
  • Cerebral palsy — decreased muscle control
  • Parkinson's disease — uncontrollable tremors

Challenges and assistive technology

Challenges
Being accurate with interactions, using a mouse, interacting with small UI elements.
Assistive technology
Keyboard, voice dictation software, wand mouth stick

Vestibular issues / seizure disorders

A young woman holds her head in pain.
  • Vestibular disorder — feelings of dizziness or Vertigo
  • Seizures — strobing, flickering, or flashing effects

Challenges and assistive technology

Challenges
Navigating a web with an increasing amount of animations, no warning of flashing content
Assistive technology
Using "reader mode" to remove animations, "Reduce motion" operating system feature

Cognitive disabilities

A young child looks off into the distance. A teacher stands at a blackboard behind them, looking for their attention.

Clinical diagnoses:

  • Autism
  • Down Syndrome
  • Dementia/Alzheimer's

Less severe:

  • Attention deficit disorder (ADD)
  • Dyslexia (difficulty reading)
  • Learning disabilities

Challenges and assistive technology

Challenges
Reading content, understanding design patterns, completing timed tasks, general focus
Assistive technology
Using "reader mode" to remove distractions, Kurzweil software

Temporary disabilities

A person's arm slung in a temporary cast.
  • A broken arm or finger
  • Reading text on your phone while outside
  • Loud, busy environment
  • Having Lasik eye surgery
  • Traveling to a new country
  • Holding a baby in one arm and your phone in the other!
Make accessibility considerations for all disabilities to provide an inclusive user experience.

The four principles of accessibility

W3C 👉 WAI 👉 WCAG

A screenshot of the WCAG homepage.

P.O.U.R.

  1. Perceivable
  2. Operable
  3. Understandable
  4. Robust
Perceivable & Operable & Understandable & Robust t-shirt.

Perceivable

Interface components must be presentable to users in ways they can comprehend.

A line graph with various patterns to denote each data point.
  • Short text equivalents for images
  • Description of data represented on charts
  • Brief descriptions of non-text content
  • labels for controls and interface components

Operable

User interface components and navigation must be operable or usable.

A person typing on a keyboard.
  • Functionality available by mouse is also available by keyboard
  • No keyboard traps
  • Web browsers and tooling provides keyboard support

Understandable

Information and the operation of user interface must be understandable or easily comprehensible.

A Japanese street sign.
  • Identify the primary language of a page
  • Providing definitions for uncommon words
  • Use clear and simple language

Robust

Content must be created in a way which can be interpreted reliably by a wide variety of user agents.

A table with various mobile phones and tablets.
  • Markup can be reliably interpreted
  • Provide a name, role, and value
If any of these principles are not met, users with disabilities will not be able to use the web.

Color contrast

Contrast threshold

Object Ratio
Text and images of text 4.5:1
Large text (greater than 18pt) 3.0:1
Non-text (borders, icons) 3.0:1

Contrast tools

Don't rely on color alone

Screenshot of input field in an error state; red border, light red background, red error text with icon below.
Screenshot of input field in an error state which is difficult to notice; grey border, light grey background, grey error text with icon below.
  • An icon along side error text
  • An underline for links embedded within body text
  • Textures or patterns to differentiate sections of a graph or chart

1.4.3 Contrast (Minimum)

"The visual presentation of text and images of text has a contrast ratio of at least 4.5:1."

Exercise! 🎨

  1. Right click an element on the page which you suspect may have poor color contrast
  2. Click Inspect
  3. In the Styles tab, find the color property and click the color swatch
  4. Review the color contrast ratio value
  5. Use the color picker to move the cursor above the white line in order to select an accessible color

Heading structure

Logical heading order is key

            
              <h1>Primary heading</h1>
              <!-- … -->

              <h2>Sub-section</h2>
              <!-- … -->

              <h3>Sub-sub-section</h3>
              <!-- … -->

              <h2>Sub-section</h2>
              <!-- … -->
            
          

Examples

2.4.6 Headings and Labels

"Headings and labels describe topic or purpose."

Control design

Control design and accessibility

An underlined link with the text, 'Link'. A button with the text, 'Button'.
  • Consistent control design allows people to identify and use with confidence
  • Voice dictation software accuracy
  • Color alone may not be enough to perceive the control

Hover, focus, and active state

Hover state

An animated GIF highlighting mouse hover styles; from red to dark red.
            
              a:hover {
                color: FireBrick;
              }
            
          

Focus state

An animated GIF highlighting keyboard focus styles.
            
              a:hover, a:focus  {
                color: FireBrick;
              }
            
          

Active state

An animated GIF highlighting mouse activation styles; dark red to black.
            
              a:active {
                color: Black;
              }
            
          

2.4.4 Link Purpose

"The purpose of each link can be determined from the link text alone or from the link text together with its programmatically determined link context."

Proximity/text zoom

The straw test

  1. Take one hand and making a fist
  2. Open your fist just enough to let a "straw" through
  3. Hold your fist up to one of your eyes

The straw test "test" part 1

The straw test "test" part 2

1.3.3 Sensory Characteristics

"Instructions provided for understanding and operating content do not rely solely on sensory characteristics of components such as shape, size, visual location, orientation, or sound."

Screenshot of a bank website form. Primary input is at the top of a modal window, call to action buttons are at the bottom.

Form design

Labels

Placeholders

  • 👎 Unable to convey the purpose of the input by screen readers
  • 👎 Placeholder text is removed from view when typing
  • 👎 May look like text has been entered

Give the Placeholder demo a try.

Floating labels

  • 👍 "Floats" labels up above the input when typing
  • 👍 Saves screen real estate
  • 👍 label associated with its input
  • 👎 Small text size
  • 👎 Potential for poor implementation

Give the floating label demo a try.

Always-visible labels

  • 👍 label is consistent, predictable
  • 👍 No cognitive load to remember the input purpose
  • 👍 Screen reader support
  • 👍 Full text size

Try out the always-visible label demo form.

Required fields

  • Notes which fields are absolutely necessary to fill in
  • Ensure placement of the icon is consistent
  • Contrast ratio high enough to be visible

See an example of required fields notice.

3.3.2 Labels or Instructions

"Labels or instructions are provided when content requires user input."

Error messaging

  • Error text
  • Input styles
  • Error list

Error text

Screenshot of input field in error state. Arrows point out features of error state which bring in attention.

Input styles

Screenshot of input field in an error state; red border, light red background, red error text with icon below.

Error list

Screenshot of error list. Arrows point out features of error list which bring in attention.

Error list demo

3.3.1 Error Identification

"If an input error is automatically detected, the item that is in error is identified and the error is described to the user in text."

Animation

What actually makes up a "poor" animation

  • Size of movement — Keep animations small and purposeful
  • Direction and speed – Allow the user to scroll at their own pace.
  • Distance — Refrain from animating long lengths of content

Animation and accessibility

A young woman holds her head in pain.
  • Someone with a cognitive impairment may get easily distracted or frustrated
  • Someone with Vestibular issues may experience vertigo or feel nauseated

Animation example

How to ensure "accessible-friendly" animations

  • Design subtle animations — minimize altering speed, movement, or control
  • Animations should be easily understood and predictable
  • Design a "no animation" state — allow people to use tools in their operating system
  • Allow animations to be paused — give control to the user

2.3.3 Animation from Interactions

"Motion animation triggered by interaction can be disabled, unless the animation is essential to the functionality or the information being conveyed."

Exercise! 🎈

  1. Break into groups of 3 (or 4)
  2. Each group gets 1 balloon
  3. Designate someone to inflate and tie off the balloon
  4. Toss the balloon between your group members, and…
  5. Complete this task on your phone:
    • Find what's playing at a local movie theatre, this Saturday, 7pm
  6. Try not to drop the balloon!

Focus indicator

If you can't see where the cursor currently resides on the page, you've got an accessibility issue

Custom focus indicator

            
              *:focus {
                outline: solid 3px red;
              }
            
          

Keep in mind…

  • Ensure the contrast ratio of the indicator against the background is high. If people can't see the focus indicator the its purpose is lost.
  • Make it consistent. Since a custom focus indicator will be unexpected on first visit, it's a good idea to keep things consistent and predictable throughout the user experience of the site.

Detect keyboard/mouse usage

2.4.7 Focus Visible

"Any keyboard operable user interface has a mode of operation where the keyboard focus indicator is visible."

Exercise! ⌨️

Go to your browser and open up some of your favorite sites. Try navigating with just the Tab key. Are you able to see where the keyboard cursor is currently placed? Or is there any focus indicator at all?

Touch target size and whitespace

Touch target size

Touch target example

2.5.5 Target Size

"The size of the target for pointer inputs is at least 44 by 44 CSS pixels."

Whitespace

Content is also design

Screenshot of hemingwayapp.com

Designing for Dyslexia


  • Avoid justified text, always left/right align
  • Avoid pure black text on pure white background
  • Sparingly use italicized styles
  • Consider offering Dyslexie as an option
Screenshot of Dyslexie font characters.

Font size

Font size and accessibility

Screenshot of the 'Considerations when writing alt text' article.
  • Readability: Better reading experience for those with low-vision
  • Usability: Larger fonts, less content, less cognitive load
  • Scannability: Quickly scan page content
Larger font size means less screen clutter which generates a clearer reading path and more of what people want; content.

More design considerations

Line length

Screenshot of W3C Web Payments Working Group homepage.

Line height

Screenshot of Brad Frost's article discussing line height.

Text zoom

Screenshot of a hotel booking website with 200% zoom enabled. Text elements are overlapped and difficult to read.

1.4.4 Resize text

"Except for captions and images of text, text can be resized without assistive technology up to 200 percent without loss of content or functionality."

Image alt text

Image alt text

Image on a web page with text bubble, 'Creative writing objects on a table; pens, pencils, a sketch book, and a cup of coffee. Image'

Benefits of alt text include SEO, and sighted users when the image fails to load.

However, screen reader users benefit most; allows participation in consuming non-text content.

When to include alt text

  • If the image contains text, the alt value should be an exact match
  • If the image doesn’t add any value, the alt attribute value should be left empty
  • If the image adds content or value, add descriptive alt text

How to write alt text

  • Be accurate and descriptive
  • Don't overwhelm with too much information
"A pair of low-top shoes are placed on top of a dark-brown table in front of a white brick wall. The shoes are mostly dark blue with a white midsole, brown laces, a black back tab, and white lining."
"Dark blue, low-top shoes with white midsole, brown lace, black back tab, and white lining."

1.1.1 Non-text Content

"All non-text content that is presented to the user has a text alternative that serves the equivalent purpose."

Thank you! ☺️

Animated GIF of Harry Potter saying, 'Great work everyone. Well, well done.' Children clapping.

Find me @svinkle — DMs are always open!