51
Web Accessibility API Testing For Accessibility 03/01/2016 Hagai Asaban [email protected] linkedin.com/in/ hagaiasaban

Testing For Web Accessibility

Embed Size (px)

Citation preview

Page 1: Testing For Web Accessibility

Web Accessibility API

Testing For Accessibility

03/01/2016

Hagai Asaban

[email protected]

linkedin.com/in/hagaiasaban

Page 2: Testing For Web Accessibility
Page 3: Testing For Web Accessibility

Disability Major Types

Visual

Blindness

Low vision

Color-blindness

Hearing

Deafness

Hard-of-hearing

Motor

Inability to use a mouse

Slow response time

Limited fine motor control

Cognitive

Learning disabilities

Distractibility

Page 4: Testing For Web Accessibility

Usability & AccessibilityTwins separated at birth

a11y - accessibility

11

Page 5: Testing For Web Accessibility

Motivations for Accessibility

Legislation

Business and outreach (reach everyone)

Improving Marketing & SEO

Page 6: Testing For Web Accessibility

Accessibility Error Priorities

Critical

An absolute barrier to access

SeriousA barrier that could cause frustration to most, causing a need for work-arounds

Moderate,

A frustration that would not prevent someone from using the site

Minor

A WCAG error that is unlikely to cause problems

Page 7: Testing For Web Accessibility

W3C: Web Content Accessibility

Guidelines (WCAG) 2.0

https://www.youtube.com/watch?v=2ma44vyMOs8

Page 8: Testing For Web Accessibility

Levels of Conformance

62 specific success criteria

• Level A : 26 success criteria

• Level AA : 13 success criteria

• Level AAA: 23 success criteria

Page 9: Testing For Web Accessibility

WCAG 2.0 - Accessibility Principles

1. Perceivable: Information and user interface components must be presentable to users

in ways they can perceive.

2. Operable: User interface components and navigation must be operable.

3. Understandable: Information and the operation of user interface must be understandable.

4. Robust:Content must be robust enough that it can be interpreted reliably by a

wide variety of user agents, including assistive technologies.

Page 10: Testing For Web Accessibility

Perceivable Principle

Text alternatives for:

∙ Images

∙ Time-based media

∙ CAPTCHAs

Adaptable presentation

Use color and contrast effectively

Organize content in a meaningful sequence

Page 11: Testing For Web Accessibility

Operable Principle

Content needs to work with the keyboard

Provide enough time to read and use

Not design content in a way that known

as could cause epileptic seizures

Help users to navigate, find content, and

locate themselves in your site

Page 12: Testing For Web Accessibility

Understandable Principle

Use plain language

Define jargon and abbreviations

Consistent and predictable user interfaces

Help users avoid mistakes

Page 13: Testing For Web Accessibility

Robust Principle

Use valid markup and standards

Describe the names, roles, and values of all user interface controls

Page 14: Testing For Web Accessibility

Assistive Technology

Photo: mtstcil.org

Page 15: Testing For Web Accessibility

Mobility Disabilities

One hand keyboard Eye Tracking

Page 16: Testing For Web Accessibility

Mobility Disabilities

Mouth Stick Puff and Sip Device

Page 17: Testing For Web Accessibility

Screen Readers - VoiceOver Tool

https://youtu.be/8ZbYJSqE0EM

Page 18: Testing For Web Accessibility

Accessible API

Page 19: Testing For Web Accessibility

ARIA - Accessible Rich Internet Applications(also known as WAI-ARIA)

W3C specification

Fills the semantic gaps in HTML

Roles, states, and properties

Page 20: Testing For Web Accessibility

http://www.w3.org/TR/wai-aria/introduction

Page 21: Testing For Web Accessibility

ARIA - (Roles, States, Properties)

Roles - describe widgets not present in HTML 4

• slider, menubar, tab, dialog

Properties - describe characteristics:

draggable, hasPopup, required

States - describe what’s happening:

busy, disabled, selected, hidden

http://karlgroves-sandbox.com/CheatSheets/ARIA-Cheatsheet.html - ARIA Chectsheet

Page 22: Testing For Web Accessibility

ARIA Example - Tree

Role = tree(on outer container)

Role = treeitemexpanded=true(on open Africa node)

Role = treeitemexpanded=false(on closed Australia node)

Role = treeitemselected=true(on highlighted Egypt child node with no children)

Page 23: Testing For Web Accessibility

Designing Navigation

Page 24: Testing For Web Accessibility

Designing Navigation - Use Structured Content

Page 25: Testing For Web Accessibility

Navigable Headings

Page 26: Testing For Web Accessibility

Level 1

Level 2

Level 3 Level 3

Level 3

Level 3

Level 4

Navigable Headings

Page 27: Testing For Web Accessibility

<H1>

<H2>

<H3>

<H4>

<H3>

<H3>

<H3>

Navigable Headings

Page 28: Testing For Web Accessibility

Labelling Forms

Label for

Page 29: Testing For Web Accessibility

Labelling Forms

<li>

<label for="text-font">Font style:</label>

<select id="text-font" name="text-font-selection">

<option value="serif">Serif</option>

<option value="sansSerif">Sans-Serif</option>

<option value="arial">Arial</option>

<option value="verdana">Verdana</option>

<option value="courier">Courier</option>

<option value="times">Times</option>

</select>

<li>

Page 30: Testing For Web Accessibility

Table Structure

Header

Body

Page 31: Testing For Web Accessibility

Table Structure<table summary="An editable table of student grades and instructor comments.">

<thead>

<tr>

<th>Name</th>

<th abbr="I.D.”>User ID</th>

<th>Points</th>

<td>Comments</th>

</tr>

</thead>

<tbody>

<tr>

<td>Ahn, Jason</td>

<td>15234314</td>

<td>

<input type="text" name="points" value="87">

</td>

<td>Lorem ipsum dolor sit amet.</td>

</tr>

</tbody>

</table>

Header

Body

Page 32: Testing For Web Accessibility

Grouping Forms

Field Set

Legend

Page 33: Testing For Web Accessibility

Grouping Forms

Field Set

<fieldset>

<legend>Background Images</legend>

<span>

<input type="radio" value="true" checked="checked"

name="background-images-selection" id="background-yes">

<label for="background-yes">Yes</label>

</span>

<span>

<input type="radio" value="false" name="background-images-selection" id="background-no">

<label for="background-no">No</label>

</span>

</fieldset>

Page 34: Testing For Web Accessibility

what is “alt” text?

It is read by screen readers in place of images allowing the content

and function of the image to be accessible

It provides a semantic meaning and description to images which

can be read by search engines.

Page 35: Testing For Web Accessibility

The “alt” attribute

Be accurate and equivalent in presenting the same content and function as presented by the image.

Be succinct. Typically no more than a few words are necessary.

Do NOT be redundant or provide the exact same information as text within the context.

Do NOT use the phrases "image of ..." or "graphic of ..." to describe the image. It usually apparent to the user that it is an image.

Good Example : <img src="boat.gif" alt="Big Boat" />

Page 36: Testing For Web Accessibility

Use Captions

YouTube

Page 37: Testing For Web Accessibility

Keyboard Access

Page 38: Testing For Web Accessibility

Keyboard Conventions

Tab key focuses the control or widget

Arrow keys select an item

Enter or Spacebar activate an item

Tab is handled by the browser.

For the rest, you need to write code.

http://keycode.info/ - JavaScript Event KeyCodes

Page 39: Testing For Web Accessibility

•Statically analyze markup

•Specify the Guideline for Validation

•e.g. WCAG 2.0 AA

•Will alert you to in accessible markup

•e.g. missing alt text on images

Accessibility Checkers: What They Do

Page 40: Testing For Web Accessibility

Accessibility Checkers

http://achecker.ca/checker/index.php

http://wave.webaim.org/

Page 41: Testing For Web Accessibility

Color Validation

View in respect to Color Blindness

Determine Adjustability of Colors

Is this contrast level to spec?

Page 42: Testing For Web Accessibility

Color Validation Online Tools

http://www.checkmycolours.com/

http://www.dasplankton.de/ContrastA/

http://colorfilter.wickline.org/

Page 43: Testing For Web Accessibility

Accessibility Checkers: Limitations

Lack Of Human Judgment

Is the alt text meaningful?

Static Analysis

Will javascript make it inaccessible?

Markup Based Validation

How will CSS affect the page?

Page 44: Testing For Web Accessibility

Open Source API For Web Accessibility

Page 45: Testing For Web Accessibility

Bootstrap Accessibility Plugin

https://github.com/paypal/bootstrap-accessibility-plugin

Page 46: Testing For Web Accessibility

HTML Code Sniffer

http://squizlabs.github.io/HTML_CodeSniffer/

Page 47: Testing For Web Accessibility

tota11y - an accessibility visualization toolkit

https://github.com/Khan/tota11y

Page 48: Testing For Web Accessibility

Tools and resources

a11yproject.com

Free QA Software

Screen Readers

Books

Blogs

Guidelines

Tutorials

http://a11yproject.com/

Page 49: Testing For Web Accessibility

References

How to Meet WCAG 2.0 -

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

Building Accessible User Interfaces -

https://wiki.jasig.org/download/attachments/28574591/jQuery%20Workshop.pdf?version=1&modificationDate=1268935398318&api=v2

Web Accessibility Overview –

http://www.slideshare.net/cedwvugraphics/web-accessibility-overview

Accessible UX: beyond the checklist –

http://www.slideshare.net/whitneyq/accessible-ux-beyond-the-checklist-to-great-experiences

W3C Recommendation 20 March 2014 (WAI-ARIA) 1.0-

http://www.w3.org/TR/wai-aria/

Page 50: Testing For Web Accessibility
Page 51: Testing For Web Accessibility

Web Accessibility API

Testing For Accessibility

03/01/2016

Hagai Asaban

[email protected]

linkedin.com/in/hagaiasaban