Using WCAG and ARIA for an accessible project

52
Using WCAG and ARIA for an accessible project

description

Presentation about web accessibility on HTML5 Developers Conference in San Francisco in May 2014

Transcript of Using WCAG and ARIA for an accessible project

Page 1: Using WCAG and ARIA for an accessible project

Using WCAG and ARIA for an accessible project

Page 2: Using WCAG and ARIA for an accessible project
Page 3: Using WCAG and ARIA for an accessible project
Page 4: Using WCAG and ARIA for an accessible project

Do you think you know everything

about your user?

Page 5: Using WCAG and ARIA for an accessible project

NO

Page 6: Using WCAG and ARIA for an accessible project

You have no control over the user

Page 7: Using WCAG and ARIA for an accessible project
Page 8: Using WCAG and ARIA for an accessible project

• Blindness

• Low vision

• Deafness

• Hearing loss

• Learning disabilities

• Cognitive limitations

• Limited movement

• Speech disabilities

• Photosensitivity…

• and combinations of these

Page 9: Using WCAG and ARIA for an accessible project

People with disabilities in the world

15% It means, more than

1.000.000.000 people Source: UN - 2011

http://www.who.int/disabilities/world_report/2011/en/

Page 10: Using WCAG and ARIA for an accessible project

People with disabilities in Brazil

24% 45.623.910 people Source: Brazilian Census 2010

http://censo2010.ibge.gov.br/en/

Page 11: Using WCAG and ARIA for an accessible project
Page 12: Using WCAG and ARIA for an accessible project
Page 13: Using WCAG and ARIA for an accessible project

Web Accessibility must be part of development

routine

Page 14: Using WCAG and ARIA for an accessible project

Web Content Accessibility Guidelines

http://www.w3.org/TR/WCAG/

WCAG

Page 15: Using WCAG and ARIA for an accessible project

Principle 1: Perceiveble

Principle 2: Operable

Principle 3: Understandable

Principle 4: Robust

WCAG Principles

Page 16: Using WCAG and ARIA for an accessible project

ARIA e HTML5

WAI-ARIA (Accessible Rich Internet Applications)

defines a way to make Web content and Web

applications more accessible to people with

disabilities. It especially helps with dynamic content

and advanced user interface controls developed

with Ajax, HTML, JavaScript, and related

technologies.

http://www.w3.org/WAI/intro/aria

Page 17: Using WCAG and ARIA for an accessible project

ARIA e HTML5

progressbar

radiogroup

scrollbar

slider

spinbutton

status

Tab

tabpanel

textbox

tooltip

73 ROLES

alert

Alertdialog

button

checkbox

dialog

menu

menubar

menuitem

option

...

http://www.w3.org/TR/wai-aria/roles#role_definitions

Page 18: Using WCAG and ARIA for an accessible project

ARIA e HTML5

aria-activedescendant

aria-atomic

aria-autocomplete

aria-busy (state)

aria-checked (state)

aria-controls

aria-describedby

aria-disabled (state)

aria-dropeffect

aria-expanded (state)

aria-flowto

aria-grabbed (state)

35 States and Properties

aria-haspopup

aria-hidden (state)

aria-invalid (state)

aria-label

aria-labelledby

aria-level

aria-live

aria-multiline

aria-multiselectable

aria-orientation

aria-owns

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

Page 19: Using WCAG and ARIA for an accessible project
Page 20: Using WCAG and ARIA for an accessible project
Page 21: Using WCAG and ARIA for an accessible project

Situation:

An image galery

Page 22: Using WCAG and ARIA for an accessible project

<img src=“starwars.jpg”

alt=“Cover picture of the movie Star Wars

- The Empire Strikes Back”>

Page 23: Using WCAG and ARIA for an accessible project

<div class="foto" role="img"

aria-label=“W3C Logo inside the

CSS"></div>

<img src="img-slides/w3clogo.png" alt=“W3C

Logo inside the HTML">

Page 24: Using WCAG and ARIA for an accessible project

Demo

Page 25: Using WCAG and ARIA for an accessible project

Situation:

Multiple languages

Page 26: Using WCAG and ARIA for an accessible project

Demo

Page 27: Using WCAG and ARIA for an accessible project

Situation:

A web page full of

headlines

Page 28: Using WCAG and ARIA for an accessible project
Page 29: Using WCAG and ARIA for an accessible project

<a href=“#contents”>Skip</a>

<elemento id=“skip”>

Page 30: Using WCAG and ARIA for an accessible project

<h1>...</h1>

<h2>...</h2>

<h3>...</h3>

<h2>...<h2>

<h3>...</h3>

<h4>...</h4>

<h2>...</h2>

<h3>...</h3>

Page 31: Using WCAG and ARIA for an accessible project
Page 32: Using WCAG and ARIA for an accessible project

Situation:

Menu and Submenus

Page 33: Using WCAG and ARIA for an accessible project

CSS:

a:hover

a:focus

JavaScript:

onmouseover="#"

onfocus="#"

onmouseout="#"

onblur="#"

Page 34: Using WCAG and ARIA for an accessible project

Demo

Page 35: Using WCAG and ARIA for an accessible project

Situation:

Forms

Page 36: Using WCAG and ARIA for an accessible project

<fieldset>

<legend>

Fill the form

</legend>

<label for="text">

Name</label>

<input id="text" type="text"

aria-describedby="comp">

<p id="comp">

Fill the form with your real name!</p>

</fieldset>

Page 37: Using WCAG and ARIA for an accessible project

<fieldset>

<legend>

Fill the form

</legend>

<label for="text">

Name</label>

<input id="text" type="text"

aria-describedby="comp">

<p id="comp">

Fill the form with your real name!</p>

</fieldset>

Page 38: Using WCAG and ARIA for an accessible project

<fieldset>

<legend>

Fill the form

</legend>

<label for="text">

Name</label>

<input id="text" type="text"

aria-describedby="comp">

<p id="comp">

Fill the form with your real name!</p>

</fieldset>

Page 39: Using WCAG and ARIA for an accessible project
Page 40: Using WCAG and ARIA for an accessible project

Demo

Page 41: Using WCAG and ARIA for an accessible project

Slider

Page 42: Using WCAG and ARIA for an accessible project

html5accessibility.com

Page 43: Using WCAG and ARIA for an accessible project

Demo

Page 44: Using WCAG and ARIA for an accessible project

Situation:

Use of colors

Page 45: Using WCAG and ARIA for an accessible project
Page 46: Using WCAG and ARIA for an accessible project

Demo

Page 47: Using WCAG and ARIA for an accessible project

Situation:

Dynamic elements

Page 48: Using WCAG and ARIA for an accessible project

<button role=“button” aria-pressed=“false”>

Edit mode

</button>

<button role=“button” aria-pressed=“true”>

Edit mode

</button>

Page 49: Using WCAG and ARIA for an accessible project

Live Regions

Page 50: Using WCAG and ARIA for an accessible project

Demo

Page 51: Using WCAG and ARIA for an accessible project

the last but not the least

• Validate Markup

• Follow the W3C Recommendations (WCAG and ARIA)

• Use automatic validation to help you check

accessibility issues

• Check the warnings and manually check results of

automated tool

• Test (keyboard navigation, color contrast tools,

assistive tecnologies, etc)

Page 52: Using WCAG and ARIA for an accessible project

Tks!

@reinaldoferraz

[email protected]

Web Accessibility must be part of

development routine