Web Content Accessibility Guidelines WCAG

goo.gl/m7mPNw

Dennis Deacon

What is WCAG?

The W3C's Web Content Accessibility Guidelines define how to make Web content more accessible to people with a wide range of disabilities, including:

  • visual
  • auditory
  • physical
  • speech
  • cognitive
  • language
  • learning
  • neurological

WCAG 2.0 is made up of...

  • Principles (4) - Perceivable, Operable, Understandable, and Robust
    • Guidelines (12) - the basic goals that you should work toward
      • Success Criteria (61) - testable statements that are not technology-specific; three levels of conformance; A, AA, AAA
        • Techniques (383) - Techniques sufficient for meeting the success criteria and those that go beyond

Conformance levels: A, AA, AAA

Levels of conformance, met in full.

  • A
  • AA
  • AAA

WCAG 2.0 can be overwhelming

If printed...

  • WCAG: 36 pages
  • How to Meet: 44 pages
  • Understanding: 230 pages
  • Techniques & Failures: 780 pages

That's 1090 printed pages

WCAG 2.1!

"Minor" version update to WCAG expected to be released mid-2018. Extends WCAG 2.0 with 17* success criteria to 2.0.

Focuses on three key areas (to fill known gaps):

  • Low vision
  • Cognitive or learning disabilities
  • Mobile device accessibility

... and yes, WCAG 2.2 is being considered;
3.0 is already in the works.

WCAG 2.0 Quick Reference

www.w3.org/WAI/WCAG20/quickref/

WCAG Quick Reference

1.0 Perceivable

Information and user interface components must be presentable to users in ways they can perceive.

youtube.com/watch?v=t4PY8mnShm4

Guideline 1.1 Text Alternatives

Provide text alternatives for any non-text content so that it can be changed into other forms people need, such as large print, braille, speech, symbols or simpler language.

WCAG 2.0

1.1.1 Non-text Content - Level A

All non-text content that is presented to the user has a text alternative that serves the equivalent purpose, except for the situations listed below.

  • Controls, Input: If non-text content is a control or accepts user input, then it has a name that describes its purpose.
  • Time-Based Media: If non-text content is time-based media, then text alternatives at least provide descriptive identification of the non-text content.
    ...
WCAG 2.0

1.1.1 Non-text Content - Level A (cont.)

  • Test: If non-text content is a test or exercise that would be invalid if presented in text, then text alternatives at least provide descriptive identification of the non-text content.
  • Sensory: If non-text content is primarily intended to create a specific sensory experience, then text alternatives at least provide descriptive identification of the non-text content.
    ...
WCAG 2.0

1.1.1 Non-text Content - Level A (cont.)

  • CAPTCHA: If the purpose of non-text content is to confirm that content is being accessed by a person rather than a computer, then text alternatives that identify and describe the purpose of the non-text content are provided, and alternative forms of CAPTCHA using output modes for different types of sensory perception are provided to accommodate different disabilities.
  • Decoration, Formatting, Invisible: If non-text content is pure decoration, is used only for visual formatting, or is not presented to users, then it is implemented in a way that it can be ignored by assistive technology.
WCAG 2.0

1.1.1 Non-text Content - Level A (cont.)

W3C alt Decision Tree

www.w3.org/WAI/tutorials/images/decision-tree/

alt decision tree
WCAG 2.0

1.1.1 Non-text Content - Level A (cont.)

High Level
  • Images that communicate information must provide a text alternative
  • Images that are for design purposes only should not provide a text alternative
WCAG 2.0

1.1.1 Non-text Content - Level A (cont.)

Two methods of implementing images
  • inline
  • css (background)
WCAG 2.0

1.1.1 Non-text Content - Level A (cont.)

Inline images

Presented directly within the markup/content via inline code.

  • img - html image tag
  • svg - html Scalable Vector Graphics tag
WCAG 2.0

1.1.1 Non-text Content - Level A (cont.)

Inline img

All inline img instances must provide an alt attribute.

The value of the alt attribute depends on the image's context.

WCAG 2.0

1.1.1 Non-text Content - Level A (cont.)

Example: img with no alt attribute

<img src="img/cat.jpg" />

A screen reader would read:

graphic i m g slash cat dot j p g

WCAG 2.0

1.1.1 Non-text Content - Level A (cont.)

Example: img with alternative text description

<img src="img/cat.jpg" alt="A cat looking out the window" />

A screen reader would read:

graphic A cat looking
out the window

WCAG 2.0

1.1.1 Non-text Content - Level A (cont.)

Example: img with no alternative text description

<img src="img/handshake.jpg" alt="" />

A screen reader would skip over the image completely.

WCAG 2.0

1.1.1 Non-text Content - Level A (cont.)

Inline svg

Two implement methods:

  • SVG as img src
  • Inline SVG
WCAG 2.0

1.1.1 Non-text Content - Level A (cont.)

SVG as img src

Same as inline img

<img src="cat.svg" alt="Cat" />

WCAG 2.0

1.1.1 Non-text Content - Level A (cont.)

Inline svg

Use title tag and reference its id to the svg via aria-labelledby

<svg aria-labelledby="title">
<title id="title">Red box</title> <rect width="75" height="50" rx="20" ry="20" fill="#90ee90" stroke="#228b22" stroke-fill="1" />
</svg>

WCAG 2.0

1.1.1 Non-text Content - Level A (cont.)

CSS (background) method for implementing images
  • Use for imagery that does not need any alternative text; that does not need to communicate information to a user.
  • Does not offer a default means for providing alternative text.
  • As a remediation exercise (last resort) you can use "screen reader text" on the container with the background image to add alternative text.

Guideline 1.2 Time-based Media

Provide alternatives for time-based media.

WCAG 2.0

1.2.1 Audio-only and Video-only - Level A (Prerecorded)

For prerecorded audio-only and prerecorded video-only media, the following are true, except when the audio or video is a media alternative for text and is clearly labeled as such:

WCAG 2.0

1.2.1 Audio-only and Video-only - Level A (Prerecorded) (cont.)

  • Prerecorded Audio-only: An alternative for time-based media is provided that presents equivalent information for prerecorded audio-only content.
  • Prerecorded Video-only: Either an alternative for time-based media or an audio track is provided that presents equivalent information for prerecorded video-only content.
WCAG 2.0

1.2.2 Captions (Prerecorded) - Level A

Captions are provided for all prerecorded audio content in synchronized media, except when the media is a media alternative for text and is clearly labeled as such.

WCAG 2.0

1.2.2 Captions (Prerecorded) - Level A

Example: Captions
WCAG 2.0

1.2.3 Audio Description or Media Alternative (Prerecorded) - Level A

An alternative for time-based media or audio description of the prerecorded video content is provided for synchronized media, except when the media is a media alternative for text and is clearly labeled as such.

WCAG 2.0

1.2.3 Audio Description or Media Alternative (Prerecorded) - Level A

Example: Audio Descriptions
WCAG 2.0

1.2.4 Captions (Live) - Level AA

Captions are provided for all live audio content in synchronized media.

WCAG 2.0

1.2.5 Audio Description (Prerecorded) - Level AA

Audio description is provided for all prerecorded video content in synchronized media.

WCAG 2.0

1.2.6 Sign Language (Prerecorded) - Level AAA

Sign language interpretation is provided for all prerecorded audio content in synchronized media.

WCAG 2.0

1.2.6 Sign Language (Prerecorded) - Level AAA

Example: Sign Language
WCAG 2.0

1.2.7 Extended Audio Description (Prerecorded) - Level AAA

Where pauses in foreground audio are insufficient to allow audio descriptions to convey the sense of the video, extended audio description is provided for all prerecorded video content in synchronized media.

WCAG 2.0

1.2.7 Extended Audio Description (Prerecorded) - Level AAA

Example: Extended Audio Description
WCAG 2.0

1.2.8 Media Alternative (Prerecorded) - Level AAA

An alternative for time-based media is provided for all prerecorded synchronized media and for all prerecorded video-only media.

WCAG 2.0

1.2.9 Audio-only (Live) - Level AAA

An alternative for time-based media that presents equivalent information for live audio-only content is provided.

Guideline 1.3 – Adaptable

Create content that can be presented in different ways (for example simpler layout) without losing information or structure.

WCAG 2.0

1.3.1 Info and Relationships - Level A

Information, structure, and relationships conveyed through presentation can be programmatically determined or are available in text.

WCAG 2.0

1.3.1 Info and Relationships - Level A

programmatically determined = semantic, web standards-based HTML

Related resources

Programmatically Determined - Accessible Culture

WCAG 2.0

1.3.1 Info and Relationships - Level A

Techniques
  • <p> for paragraphs, not <br>
  • <ul>/<ol>/<li> for lists, not <br>
  • <table> with a <caption> and proper column headers <th>
  • Form fields have associated labels, accessible name
WCAG 2.0

1.3.2 Meaningful Sequence - Level A

When the sequence in which content is presented affects its meaning, a correct reading sequence can be programmatically determined.

WCAG 2.0

1.3.2 Meaningful Sequence - Level A

Example: Not Good
two side-by-side panels
<div> <div>
    <div>Package 1</div> <div>Package 2</div>
  </div>
  <div>
    <div>
      <ol>
       <li>Free room upgrade</li>
       <li>Late checkout</li>
      </ol> ...
    </div>

    <div>
      <ol>
       <li>Free room upgrade</li>
       <li>Late checkout</li>
       <li>Free breakfast</li>
        ...
      </ol> ...
<div>

<div></div>
WCAG 2.0

1.3.2 Meaningful Sequence - Level A

Example: Good
two side-by-side panels
<div>
 <div>
  <div>Package 1</div>
  <div>
   <ol>
     <li>Free room upgrade</li>
     <li>Late checkout</li>
   </ol> ...
  </div>
  </div>

  <div>
   <div>Package 2</div>
    <div>
     <ol>
      <li>Free room upgrade</li>
      <li>Late checkout</li>
      <li>Free breakfast</li>
      ...
     </ol> ...
</div></div>

<div>
WCAG 2.0

1.3.3 Sensory Characteristics - Level A

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.

WCAG 2.0

1.3.3 Sensory Characteristics - Level A

Imagine you are blind...

...and your screen reader says "click the submit button on the left."


Carry-on baggage

Click the submit button on the left to complete your request.

The Transportation Security Administration (TSA) allows each traveler to carry on liquids, gels and aerosols in containers of 3.4 ounces (100 mL) or less, inside a single quart-size (or liter-size) clear, sealable bag.

For more details, visit our TSA Security Checkpoint Guidelines page.

WCAG 2.1

1.3.4 Identify Common Purpose - Level AA

The meaning of each input field collecting information about the user can be programmatically determined when:

  • The input field has a meaning that maps to the HTML 5.2 Autofill field names; and
  • The content is implemented using technologies with support for identifying the expected meaning for form input data.
WCAG 2.1

1.3.5 Identify Purpose - Level AAA

In content implemented using markup languages, the purpose of User Interface Components, icons, and regions can be programmatically determined.

This success criterion is at risk.

Guideline 1.4 – Distinguishable

Make it easier for users to see and hear content including separating foreground from background.

WCAG 2.0

1.4.1 Use of Color - Level A

Color is not used as the only visual means of conveying information, indicating an action, prompting a response, or distinguishing a visual element.

WCAG 2.0

1.4.1 Use of Color - Level A

Example (Bad)

On Sunday’s episode of Keeping Up with the Kardashians, the mother of two is trying her best to slowly get back into her old routine. So she decided to finally leave the house and attend Kanye‘s concert.

Test with NoCoffee vision simulator (Chrome)

WCAG 2.0

1.4.1 Use of Color - Level A

Example (Good)

On Sunday’s episode of Keeping Up with the Kardashians, the mother of two is trying her best to slowly get back into her old routine. So she decided to finally leave the house and attend Kanye‘s concert.

Test with NoCoffee vision simulator (Chrome)

WCAG 2.0

1.4.1 Use of Color - Level A

Example (Bad)

Regular Rate Member Rate

Example of color dependancy for information
Room Type Interior Exterior
Veranda Suite
$325
$250
$475
$380
Main Suite
$225
$150
$325
$275

Test with NoCoffee vision simulator (Chrome)

WCAG 2.0

1.4.2 Audio Control - Level A

If any audio on a Web page plays automatically for more than 3 seconds, either a mechanism is available to pause or stop the audio, or a mechanism is available to control audio volume independently from the overall system volume level.

WCAG 2.0

1.4.3 Contrast (Minimum) - Level AA

The visual presentation of text and images of text has a contrast ratio of at least 4.5:1, except for the following:

  • Large Text: Large-scale text and images of large-scale text have a contrast ratio of at least 3:1;
  • Incidental: Text or images of text that are part of an inactive user interface component, that are pure decoration, that are not visible to anyone, or that are part of a picture that contains significant other visual content, have no contrast requirement.
  • Logotypes: Text that is part of a logo or brand name has no minimum contrast requirement.
WCAG 2.0

1.4.3 Contrast (Minimum) - Level AA

Font Size

Situation A: text is less than 18 point (24 pixels) if not bold and less than 14 point (18 pixels) if bold

Passes
Passes
Fails
Passes
Fails
Fails

Colour Contrast Analyser

WCAG Contrast checker (Firefox)

WCAG 2.0

1.4.3 Contrast (Minimum) - Level AA

Font Size

Situation B: text is at least 18 point (24 pixels) if not bold and at least 14 point (18 pixels) if bold

Passes
Passes
Passes
Passes
Fails
Fails

Colour Contrast Analyser

WCAG Contrast checker (Firefox)

WCAG 2.0

1.4.3 Contrast (Minimum) - Level AA

Type embedded in ads

Colour Contrast Analyser

WCAG Contrast checker (Firefox)

WCAG 2.0

1.4.3 Contrast (Minimum) - Level AA

Type over photographic imagery

The Superb Getaway

Head west to great adventure

Colour Contrast Analyser

WCAG Contrast checker (Firefox)

WCAG 2.0

1.4.3 Contrast (Minimum) - Level AA

Type over photographic imagery

The Superb Getaway

Head west to great adventure

Colour Contrast Analyser

WCAG Contrast checker (Firefox)

WCAG 2.0

1.4.3 Contrast (Minimum) - Level AA

Type over photographic imagery

Make sure to provide a background color with proper contrast if the image doesn't load

Colour Contrast Analyser

WCAG Contrast checker (Firefox)

WCAG 2.0

1.4.4 Resize text - Level AA

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

WCAG 2.0

1.4.4 Resize text - Level AA

Example

Sign up to receive updates via email.

"psst! Text zoom only works in Firefox!"

Now is the time for all good men to come to the aid of their country.

WCAG 2.0

1.4.5 Images of Text - Level AA

If the technologies being used can achieve the visual presentation, text is used to convey information rather than images of text except for the following:

  • Customizable: The image of text can be visually customized to the user's requirements;
  • Essential: A particular presentation of text is essential to the information being conveyed.

Note: Logotypes (text that is part of a logo or brand name) are considered essential.

WCAG 2.0

1.4.6 Contrast (Enhanced) - Level AAA

The visual presentation of text and images of text has a contrast ratio of at least 7:1, except for the following:

  • Large Text: Large-scale text and images of large-scale text have a contrast ratio of at least 4.5:1;
  • Incidental: Text or images of text that are part of an inactive user interface component, that are pure decoration, that are not visible to anyone, or that are part of a picture that contains significant other visual content, have no contrast requirement.
  • Logotypes: Text that is part of a logo or brand name has no minimum contrast requirement.
WCAG 2.0

1.4.7 Low or No Background Audio - Level AAA

For prerecorded audio-only content that (1) contains primarily speech in the foreground, (2) is not an audio CAPTCHA or audio logo, and (3) is not vocalization intended to be primarily musical expression such as singing or rapping, at least one of the following is true:

  • No Background: The audio does not contain background sounds.
  • Turn Off: The background sounds can be turned off.
  • 20 dB: The background sounds are at least 20 decibels lower than the foreground speech content, with the exception of occasional sounds that last for only one or two seconds.
WCAG 2.0

1.4.8 Visual Presentation - Level AAA

For the visual presentation of blocks of text, a mechanism is available to achieve the following:

  1. Foreground and background colors can be selected by the user.
  2. Width is no more than 80 characters or glyphs (40 if CJK).
  3. Text is not justified (aligned to both the left and the right margins).
  4. Line spacing (leading) is at least space-and-a-half within paragraphs, and paragraph spacing is at least 1.5 times larger than the line spacing.
  5. Text can be resized without assistive technology up to 200 percent in a way that does not require the user to scroll horizontally to read a line of text on a full-screen window.
WCAG 2.0

1.4.9 Images of Text (No Exception) - Level AAA

Images of text are only used for pure decoration or where a particular presentation of text is essential to the information being conveyed.

WCAG 2.1

1.4.10 Reflow - Level AA

Content can be presented without loss of information or functionality, and without requiring scrolling in two dimensions for:

  • Vertical scrolling content at a width equivalent to 320 CSS pixels;
  • Horizontal scrolling content at a height equivalent to 256 CSS pixels;

Except for parts of the content which require two-dimensional layout for usage or meaning.

WCAG 2.1

1.4.11 Non-text Contrast - Level AA

The visual presentation of the following have a contrast ratio of at least 3:1 against adjacent color(s):

  • User Interface Components: Visual information used to indicate states and boundaries of active user interface components, except where the appearance of the component is determined by the user agent and not modified by the author;
  • Graphical Objects: Parts of graphics required to understand the content, except when a particular presentation of graphics is essential to the information being conveyed.

This success criterion is at risk.

WCAG 2.1

1.4.12 Text Spacing - Level AA

If the technologies being used allow the user agent to set text style properties, then 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 underneath 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.

Exception: Human languages and scripts which do not make use of one or more of these text style properties in written text can conform using only the properties that are used.

WCAG 2.1

1.4.13 Content on Hover or Focus - Level AA

Where receiving and removing pointer hover or keyboard focus triggers additional content to become visible and hidden, respectively, the following are true:

  • Dismissable: A mechanism is available to dismiss the additional content without moving pointer hover or keyboard focus, unless the additional content communicates an input error or does not obscure or replace other content;
  • Hoverable: If pointer hover can trigger the additional content, then the pointer can be moved over the additional content without the additional content disappearing;
  • Persistent: The additional content remains visible until the hover or focus trigger is removed, the user dismisses it, or its information is no longer valid.

Exception: The visual presentation of the additional content is controlled by the user agent and is not modified by the author.

2.0 Operable

User interface components and navigation must be operable.

youtube.com/watch?v=LzABv9dO4ao

Guideline 2.1 Keyboard Accessible

Make all functionality available from a keyboard.

WCAG 2.0

2.1.1 Keyboard - Level A

All functionality of the content is operable through a keyboard interface without requiring specific timings for individual keystrokes, except where the underlying function requires input that depends on the path of the user's movement and not just the endpoints.

WCAG 2.0

2.1.1 Keyboard - Level A

By default, the following elements are keyboard accessible, or focusable:

  • Links: must include a href attribute
  • Form fields: only native HTML form elements; custom form elements have to be made keyboard accessible
WCAG 2.0

2.1.1 Keyboard - Level A

Links

Go to next page

<img onmousedown="nextPage();"
src="img/next-arrow.png" alt="Go to next page">

WCAG 2.0

2.1.1 Keyboard - Level A

Links (cont.)

Go to next page

<img onmousedown="nextPage();" onkeydown="nextPage();" src="img/next-arrow.png" alt="Go to next page">

WCAG 2.0

2.1.1 Keyboard - Level A

Links (cont.)

Go to next page

<img onmousedown="nextPage();" onkeydown="nextPage();" src="img/next-arrow.png" alt="Go to next page" tabindex="0">

WCAG 2.0

2.1.1 Keyboard - Level A

Links (cont.)

Go to next page

<img onmousedown="nextPage();" onkeydown="nextPage();" src="img/next-arrow.png" alt="Go to next page" tabindex="0" role="link">

WCAG 2.0

2.1.1 Keyboard - Level A

Links (cont.)

Go to next page

<a href="next-page.html">
<img src="arrow.png"
alt="Go to next page" /></a>

WCAG 2.0

2.1.2 No Keyboard Trap - Level A

If keyboard focus can be moved to a component of the page using a keyboard interface, then focus can be moved away from that component using only a keyboard interface, and, if it requires more than unmodified arrow or tab keys or other standard exit methods, the user is advised of the method for moving focus away.

WCAG 2.0

2.1.3 Keyboard (No Exception) - Level AAA

All functionality of the content is operable through a keyboard interface without requiring specific timings for individual keystrokes.

Guideline 2.2 Enough Time

Provide users enough time to read and use content.

WCAG 2.0

2.2.1 Timing Adjustable - Level A

For each time limit that is set by the content, at least one of the following is true:

  • Turn off: The user is allowed to turn off the time limit before encountering it; or
  • Adjust: The user is allowed to adjust the time limit before encountering it over a wide range that is at least ten times the length of the default setting; or
  • Extend: The user is warned before time expires and given at least 20 seconds to extend the time limit with a simple action (for example, "press the space bar"), and the user is allowed to extend the time limit at least ten times; or
    ...
WCAG 2.0

2.2.1 Timing Adjustable - Level A

For each time limit that is set by the content, at least one of the following is true: (cont.)

  • Real-time Exception: The time limit is a required part of a real-time event (for example, an auction), and no alternative to the time limit is possible; or
  • Essential Exception: The time limit is essential and extending it would invalidate the activity; or
  • 20 Hour Exception: The time limit is longer than 20 hours.
WCAG 2.0

2.2.2 Pause, Stop, Hide - Level A

For moving, blinking, scrolling, or auto-updating information, all of the following are true:

  • Moving, blinking, scrolling: For any moving, blinking or scrolling information that (1) starts automatically, (2) lasts more than five seconds, and (3) is presented in parallel with other content, there is a mechanism for the user to pause, stop, or hide it unless the movement, blinking, or scrolling is part of an activity where it is essential; and
WCAG 2.0

2.2.2 Pause, Stop, Hide - Level A

For moving, blinking, scrolling, or auto-updating information, all of the following are true: (cont.)

  • Auto-updating: For any auto-updating information that (1) starts automatically and (2) is presented in parallel with other content, there is a mechanism for the user to pause, stop, or hide it or to control the frequency of the update unless the auto-updating is part of an activity where it is essential.
WCAG 2.0

Where are the controls to stop from being Rick-Rolled?

Rickrolling, alternatively rick-rolling, is a prank and an Internet meme involving an unexpected appearance of the music video for the 1987 Rick Astley song "Never Gonna Give You Up".

WCAG 2.0

2.2.3 No Timing - Level AAA

Timing is not an essential part of the event or activity presented by the content, except for non-interactive synchronized media and real-time events.

WCAG 2.0

2.2.4 Interruptions - Level AAA

Interruptions can be postponed or suppressed by the user, except interruptions involving an emergency.

WCAG 2.0

2.2.5 Re-authenticating - Level AAA

When an authenticated session expires, the user can continue the activity without loss of data after re-authenticating.

WCAG 2.1

2.2.6 Timeouts - Level AAA

Users are warned of the duration of any user inactivity that could cause data loss, unless the data is preserved for more than 20 hours when the user does not take any actions.

WCAG 2.1

2.2.7 Animation from Interactions - Level AAA

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

This success criterion is at risk.

Guideline 2.3 Seizures

Do not design content in a way that is known to cause seizures.

WCAG 2.0

2.3.1 Three Flashes or Below Threshold - Level A

Web pages do not contain anything that flashes more than three times in any one second period, or the flash is below the general flash and red flash thresholds.

WCAG 2.0

2.3.2 Three Flashes - Level AAA

Web pages do not contain anything that flashes more than three times in any one second period.

Guideline 2.4 Navigable

Provide ways to help users navigate, find content, and determine where they are.

WCAG 2.0

2.4.1 Bypass Blocks - Level A

A mechanism is available to bypass blocks of content that are repeated on multiple Web pages.

WCAG 2.0

2.4.1 Bypass Blocks - Level A

Example
Screen shot of global menu

<h1>Chicago Digital Accessibility and Inclusive Design</h1>
<a href="#content" class="visuallyhidden">skip to content</a>
<nav> ... </nav>
<div id="content">
<h2>WCAG 2.0 - Operable</h2>

WCAG 2.0

2.4.2 Page Titled - Level A

Web pages have titles that describe topic or purpose.

WCAG 2.0

2.4.2 Page Titled - Level A

A Big Problem

screenshot of Google search for untitled returns over 12 million results

WCAG 2.0

2.4.2 Page Titled - Level A

Not good

<title>Untitled Document</title>

<title>New Page</title>

Good

<title>Create an Account - First State Bank</title>

<title>Semantic Structure - WebAIM</title>

WCAG 2.0

2.4.3 Focus Order - Level A

If a Web page can be navigated sequentially and the navigation sequences affect meaning or operation, focusable components receive focus in an order that preserves meaning and operability.

WCAG 2.0

2.4.3 Focus Order - Level A (Cont.)

Fields with tabindex implemented

<label for="fname">First Name
<input id="fname" name="fname" type="text" tabindex="1"/> </label>

<label for="lname">Last Name
<input id="lname" name="lname" type="text" tabindex="3"/> </label>

<label for="email">Email
<input id="email" name="email" type="email" tabindex="4"/> </label>

<label for="phone">Phone
<input id="phone" name="phone" type="tel" tabindex="2"/> </label>

WCAG 2.0

2.4.3 Focus Order - Level A (Cont.)

tabindex has the capacity to improve or destroy usability for keyboard-only users. Keep these things in mind:*

  • Use tabindex=0 to include an element in the natural tab order of the content, but remember that an element that is focusable by default may be an easier option than a custom control
  • Use tabindex=-1 to give an element programmatic focus, but exclude it from the tab order of the content
  • Avoid using tabindex=1+.

*Excerpted from "Using the tabindex attribute" by Léonie Watson

WCAG 2.0

2.4.4 Link Purpose (In Context) - Level A

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, except where the purpose of the link would be ambiguous to users in general.

WCAG 2.0

2.4.4 Link Purpose (In Context) - Level A (cont.)

Enroll Today View Details Learn More

Link list
(out of context)

  • Enroll Today
    (enroll in what?)
  • View Details
    (details of what?)
  • Learn more
    (about what?)
WCAG 2.0

2.4.4 Link Purpose (In Context) - Level A (cont.)

Add Context with Screen Reader Text

<a href="#">View Details
<span class="visuallyhidden">about AARP membership</span></a>

WCAG 2.0

2.4.5 Multiple Ways - Level AA

More than one way is available to locate a Web page within a set of Web pages except where the Web Page is the result of, or a step in, a process.

WCAG 2.0

2.4.5 Multiple Ways - Level AA

Example

Screenshot of Wikipedia

WCAG 2.0

2.4.6 Headings and Labels - Level AA

Headings and labels describe topic or purpose.

WCAG 2.0

2.4.6 Headings and Labels - Level AA

Headings
  • Denotes the topic or theme of the page
  • Should be concise, yet descriptive
  • Avoid marketese
  • Use heading level 1 (<h1>); one per page
WCAG 2.0

2.4.6 Headings and Labels - Level AA

Labels

Provide a label for any interactive component that makes the component's purpose clear.

* Required

<label for="fname">First Name
<span class="visuallyhidden">Required
</span> <span aria-hidden="true">*</span> <input required="required" type="text" id="fname" name="fname"/></label>
WCAG 2.0

2.4.7 Focus Visible - Level AA

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

WCAG 2.0

2.4.7 Focus Visible - Level AA

outlinenone.com

WCAG 2.0

2.4.7 Focus Visible - Level AA

Example: Virgin America - Marcy Sutton (2014)
WCAG 2.0

2.4.7 Focus Visible - Level AA

Example: Ensure focus visible no matter the background
WCAG 2.0

2.4.7 Focus Visible - Level AA

Example: Ensure focus visible no matter the background
WCAG 2.0

2.4.8 Location - Level AAA

Information about the user's location within a set of Web pages is available.

WCAG 2.0

2.4.9 Link Purpose (Link Only) - Level AAA

A mechanism is available to allow the purpose of each link to be identified from link text alone, except where the purpose of the link would be ambiguous to users in general.

WCAG 2.0

2.4.10 Section Headings - Level AAA

Section headings are used to organize the content.

WCAG 2.1

2.4.11 Character Key Shortcuts - Level A

If a keyboard shortcut is implemented in content using only letter (including upper- and lower-case letters), punctuation, number, or symbol characters, then at least one of the following is true:

  • Turn off: A mechanism is available to turn the shortcut off;
  • Remap: A mechanism is available to remap the shortcut to use one or more non-printable keyboard characters (e.g. Ctrl, Alt, etc).
  • Active only on focus: The keyboard shortcut for a user interface component is only active when that component has focus.
WCAG 2.1

2.4.12 Label in Name - Level A

For user interface components with labels that include text or images of text, the name contains the text presented visually.

WCAG 2.1

Guideline 2.5 Pointer Accessible

Make it easier for users to operate pointer functionality

WCAG 2.1

2.5.1 Pointer Gestures - Level A

All functionality which uses multipoint or path-based gestures for operation can be operated with a single pointer, unless a multipoint or path-based gesture is essential.

WCAG 2.1

2.5.2 Pointer Cancellation - Level A

For functionality that can be operated using a single pointer, at least one of the following is true:

  • No Down-Event: The down-event of the pointer is not used to execute any part of the function;
  • Abort or Undo: Completion of the function is on the up-event, and a mechanism is available to abort the function before completion or undo the function after completion;
  • Up Reversal: The up-event reverses any outcome of the preceding down-event;
  • Essential: Completing the function on the down-event is essential.
WCAG 2.1

2.5.3 Target Size - Level AAA

The size of the target for pointer inputs is at least 44 by 44 CSS pixels except when:

  • Equivalent: The target is available through an equivalent link or control on the same page that is at least 44 by 44 CSS pixels;
  • Inline: The target is in a sentence or block of text;
  • User Agent Control: The size of the target is determined by the user agent and is not modified by the author.
  • Essential: A particular presentation of the target is essential to the information being conveyed.
WCAG 2.1

2.5.4 Concurrent Input Mechanisms - Level AAA

Web content does not restrict use of input modalities available on a platform except where the restriction is essential, required to ensure the security of the content, or required to respect user settings.

WCAG 2.1

Guideline 2.6 Additional sensor inputs

Ensure that device sensor inputs are not a barrier for users.

WCAG 2.1

2.6.1 Motion Actuation - Level A

Functionality that can be operated by device motion or user motion can also be operated by user interface components and responding to the motion can be disabled to prevent accidental actuation, except when:

  • Supported Interface: The motion is used to operate functionality through an accessibility supported interface;
  • Essential: The motion is essential for the function and doing so would invalidate the activity.
WCAG 2.1

2.6.2 Orientation - Level AA

Content does not restrict its view and operation to a single display orientation, such as portrait or landscape, unless a specific display orientation is essential.

3.0 Understandable

Information and the operation of user interface must be understandable

Guideline 3.1 Readable

Make text content readable and understandable.

WCAG 2.0

3.1.1 Language of Page - Level A

The default human language of each Web page can be programmatically determined.

WCAG 2.0

3.1.1 Language of Page - Level A (cont.)

<!DOCTYPE html>
<html lang="en">
WCAG 2.0

3.1.2 Language of Parts - Level AA

The human language of each passage or phrase in the content can be programmatically determined except for proper names, technical terms, words of indeterminate language, and words or phrases that have become part of the vernacular of the immediately surrounding text.

WCAG 2.0

3.1.2 Language of Parts - Level AA (cont.)

<!DOCTYPE html>
<html lang="en">
...
<p>She turned back towards him and said, 
<span lang="es">"No Bueno"</span>.</p>
...
WCAG 2.0

3.1.3 Unusual Words - Level AAA

A mechanism is available for identifying specific definitions of words or phrases used in an unusual or restricted way, including idioms and jargon.

WCAG 2.0

3.1.4 Abbreviations - Level AAA

A mechanism for identifying the expanded form or meaning of abbreviations is available.

WCAG 2.0

3.1.5 Reading Level - Level AAA

When text requires reading ability more advanced than the lower secondary education level after removal of proper names and titles, supplemental content, or a version that does not require reading ability more advanced than the lower secondary education level, is available.

WCAG 2.0

3.1.5 Reading Level - Level AAA

hemingwayapp.com (hat tip to Liz Ware & Kelly Zimmerman for notifying of this resource)

Screenshot of Hemingway App
WCAG 2.0

3.1.6 Pronunciation - Level AAA

A mechanism is available for identifying specific pronunciation of words where meaning of the words, in context, is ambiguous without knowing the pronunciation.

Wikipedia entry for Supercalifragilisticexpialidocious

Guideline 3.2 Predictable

Make Web pages appear and operate in predictable ways.

WCAG 2.0

3.2.1 On Focus - Level A

When any component receives focus, it does not initiate a change of context.

WCAG 2.0

3.2.1 On Focus - Level A (cont.)

Examples:
  • Opening a new window as soon as a new page is loaded
  • Removing focus when focus is received
WCAG 2.0

3.2.2 On Input - Level A

Changing the setting of any user interface component does not automatically cause a change of context unless the user has been advised of the behavior before using the component.

WCAG 2.0

3.2.2 On Input - Level A (cont.)

WCAG 2.0

3.2.3 Consistent Navigation - Level AA

Navigational mechanisms that are repeated on multiple Web pages within a set of Web pages occur in the same relative order each time they are repeated, unless a change is initiated by the user.

WCAG 2.0

3.2.3 Consistent Navigation - Level AA (cont.)

Example
WCAG 2.0

3.2.4 Consistent Identification - Level AA

Components that have the same functionality within a set of Web pages are identified consistently.

WCAG 2.0

3.2.4 Consistent Identification - Level AA (cont.)

Example
Shopping CartShopping Cart
Shopping CartShopping Basket
WCAG 2.0

3.2.4 Consistent Identification - Level AA (cont.)

Example
PrintPrint Receipt
PrintPrint Invoice
WCAG 2.0

3.2.5 Change on Request - Level AAA

Changes of context are initiated only by user request or a mechanism is available to turn off such changes.

WCAG 2.0

3.2.5 Change on Request - Level AAA (cont.)

Examples
  • Opening windows that are not requested by the user; or as soon as a new page is loaded
  • Using meta refresh to reload the page
  • Change of main content through an automatic update that the user cannot disable from within the content
WCAG 2.1

3.2.6 Status Changes - Level AA

In content implemented using markup languages, status messages can be programmatically determined through role or properties such that they can be presented to the user by assistive technologies without receiving focus.

WCAG 2.1

3.2.6 Status Changes - Level AA (Cont.)

Example

Guideline 3.3 Input Assistance

Help users avoid and correct mistakes.

WCAG 2.0

3.3.1 Error Identification - Level A

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.

WCAG 2.0

3.3.2 Labels or Instructions - Level A

Labels or instructions are provided when content requires user input.

WCAG 2.0

3.3.3 Error Suggestion - Level AA

If an input error is automatically detected and suggestions for correction are known, then the suggestions are provided to the user, unless it would jeopardize the security or purpose of the content.

WCAG 2.0

3.3.4 Error Prevention (Legal, Financial, Data) - Level AA

For Web pages that cause legal commitments or financial transactions for the user to occur, that modify or delete user-controllable data in data storage systems, or that submit user test responses, at least one of the following is true:

  1. Reversible: Submissions are reversible.
  2. Checked: Data entered by the user is checked for input errors and the user is provided an opportunity to correct them.
  3. Confirmed: A mechanism is available for reviewing, confirming, and correcting information before finalizing the submission.
WCAG 2.0

3.3.5 Help - Level AAA

Context-sensitive help is available.

WCAG 2.0

3.3.6 Error Prevention (All) - Level AAA

For Web pages that require the user to submit information, at least one of the following is true:

  1. Reversible: Submissions are reversible.
  2. Checked: Data entered by the user is checked for input errors and the user is provided an opportunity to correct them.
  3. Confirmed: A mechanism is available for reviewing, confirming, and correcting information before finalizing the submission.
WCAG 2.0

Summary: Error Identification, Labels or Instructions, Suggestions and Prevention

  • Error Identification: Identify and describe the error
  • Labels or Instructions: Provided when content requires user input
  • Suggestions: Suggestions for correction are provided to the user
  • Prevention: If the user is required to submit information, submissions are reversible, correctable and changes to resolve errors is presented for confirmation by the user.

Accessible Form Error Handling

4.0 Robust

Content must be robust enough that it can be interpreted by a wide variety of user agents, including assistive technologies.

Guideline 4.1 Compatible

Maximize compatibility with current and future user agents, including assistive technologies.

WCAG 2.0

4.1.1 Parsing - Level A

In content implemented using markup languages, elements have complete start and end tags, elements are nested according to their specifications, elements do not contain duplicate attributes, and any IDs are unique, except where the specifications allow these features.

WCAG 2.0

4.1.1 Parsing - Level A (cont.)

validator.w3.org

HTML Validator
WCAG 2.0

4.1.2 Name, Role, Value - Level A

For all user interface components (including but not limited to: form elements, links and components generated by scripts), the name and role can be programmatically determined; states, properties, and values that can be set by the user can be programmatically set; and notification of changes to these items is available to user agents, including assistive technologies.

WCAG 2.0

4.1.2 Name, Role, Value - Level A (Cont.)

All native HTML elements have default roles, values, states and properties.

WCAG 2.0

4.1.2 Name, Role, Value - Level A (Cont.)

Custom elements and controls have no roles, values, states or properties by default.

Purchase
Email:
 
WCAG 2.0

4.1.2 Name, Role, Value - Level A (Cont.)

<div> & <span>
  • No semantics; you need to build that in
  • Need to provide semantic "role" via Accessible Rich Internet Applications (ARIA)
  • Before doing this, however ...
WCAG 2.0

4.1.2 Name, Role, Value - Level A (Cont.)

ARIA Rule #1: Don't Use ARIA (by default)

If you can use a native HTML element or attribute with the semantics and behavior you require already built in, instead of re-purposing an element and adding an ARIA role, state or property to make it accessible, then do so.

WCAG 2.0

4.1.2 Name, Role, Value - Level A (Cont.)

ARIA Rule #1: Don't Use ARIA
Exceptions
  • If the feature is available in HTML but it is not implemented or it is implemented, but accessibility support is not.
  • If the visual design constraints rule out the use of a particular native element, because the element cannot be styled as required.
  • If the feature is not currently available in HTML.
WCAG 2.0

4.1.2 Name, Role, Value - Level A (Cont.)

<a> & <button>

How many times have you seen this:

<a role="button" id="btnSignUp">Sign Up</a>
<button role="link"
onclick="location.href = 'https://mysite.com'">
View Rules</a>
WCAG 2.0

4.1.2 Name, Role, Value - Level A (Cont.)

Really?
WCAG 2.0

4.1.2 Name, Role, Value - Level A (Cont.)

ARIA Rule #2: Do not change native semantics, unless you really have to.
<button id="btnSignUp">Sign Up</button>
<a href="http://mysite.com'">View Rules</a>
WCAG 2.0

4.1.2 Name, Role, Value - Level A (Cont.)

ARIA Rule #3: All interactive ARIA controls must be usable with the keyboard

If you create a widget that a user can ...

  • click
  • tap
  • drag
  • drop
  • slide
  • scroll

... a user must also be able to navigate to the widget and perform an equivalent action using the keyboard, responding to standard keystrokes or keystroke combinations.

WCAG 2.0

4.1.2 Name, Role, Value - Level A (Cont.)

ARIA Rule #3: All interactive ARIA controls must be usable with the keyboard

To make a custom control reachable via keyboard, it must be in the tab order. To add it to the tab order, use the tabindex attribute.

WCAG 2.0

4.1.2 Name, Role, Value - Level A (Cont.)

ARIA Rule #3: All interactive ARIA controls must be usable with the keyboard
  • tabindex="0": Places the element in the tabindex based on the DOM location
  • tabindex="-1": Makes it available via scripting to place the element in the tabindex based on the DOM location
  • tabindex="[any positive number]": Never do it.
WCAG 2.0

4.1.2 Name, Role, Value - Level A (Cont.)

ARIA Rule #4: Do not use role="presentation" or aria-hidden="true" on a visible focusable element .

Using either of these on a visible focusable element will result in some users focusing on 'nothing'.

WCAG 2.0

4.1.2 Name, Role, Value - Level A (Cont.)

ARIA Rule #5: All interactive elements must have an accessible name.

An interactive element only has an accessible name when its Accessibility API accessible name (or equivalent) property has a value.

WCAG 2.0

4.1.2 Name, Role, Value - Level A (Cont.)

ARIA Rule #5: All interactive elements must have an accessible name.
Example (bad):
Email:
Email:<br>
<input type="text" id="" name=""/>
WCAG 2.0

4.1.2 Name, Role, Value - Level A (Cont.)

ARIA Rule #5: All interactive elements must have an accessible name.
Example (good):
<label for="email">Email:<br>
<input type="text" id="email" name="email"/></label>
WCAG 2.0

4.1.2 Name, Role, Value - Level A (Cont.)

ARIA in HTML
w3c.github.io/html-aria/

ARIA in HTML screenshot

The End

Questions?

Resources

Thank You!