Top Banner
62
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Accessibility and JS: side-by-side
Page 2: Accessibility and JS: side-by-side

SummaryThroughout history, JS has been pointed out as the villain when the matter is accessible websites.

By presenting some tricks and techniques, we plan to provoke this discussion among developers and show that Accessibility and JS may live together, as long as you take the right steps.

Accessibility and JS: side-by-side

Page 3: Accessibility and JS: side-by-side

Overview

● Why Should I invest on Accessibility?● What is Accessibility?● Who needs Accessibility?● Essential things about the documentation● User Agents: Do you know them?● Barriers between Accessibility and JavaScript● The great secret of accessible applications

Page 4: Accessibility and JS: side-by-side

#1 Why Should I invest on

Accessibility?

Page 5: Accessibility and JS: side-by-side

According to UN

650 Million have some kind of disabilities

Many people around the world

Page 6: Accessibility and JS: side-by-side

In Brazil are over

According to IBGE

45.6 Millionpeople could be using your application.

Page 7: Accessibility and JS: side-by-side

Business opportunity

Who wouldn´t wanted to have

23% of a population as possible clients?

Page 8: Accessibility and JS: side-by-side

The world cannot be excluded from great minds

Page 9: Accessibility and JS: side-by-side

When we talk about accessibility

Page 10: Accessibility and JS: side-by-side

#2 What is Accessibility?

Page 11: Accessibility and JS: side-by-side

It´s basically create or turn it accessible for the largest number of users, mainly for those with special needs

What would be an accessible application?

Anything isn’t enough accessible thatcouldn’t be improved

Page 12: Accessibility and JS: side-by-side

New accessibility

Passive

Robotic

Dependent

Impotent

Able

Active

Independent

Engajed

Page 13: Accessibility and JS: side-by-side

#3 Who needs accessibility?

Page 14: Accessibility and JS: side-by-side

Who needs accessibility?

Page 15: Accessibility and JS: side-by-side

Who needs accessibility?

Videos with subtitles

Page 16: Accessibility and JS: side-by-side

#4 Essential things about the

documentation

Page 17: Accessibility and JS: side-by-side

• W3C (World Wide Web Consortium)• WAI (Web Accessibility Initiative)• WCAG (Web Content Accessibility

Guidelines)• WAI-ARIA(Accessible Rich Internet

Applications)

Alphabet soup

• ATAG (Authoring Tool Accessibility Guidelines)

• UAAG(User Agent Accessibility Guidelines)

• eMAG (Brazil´s e-gov model of accessibility)

Most part of the material is produced by W3C and by institutions interested on internet development as a whole. The idea is to have internet for all people.

Page 18: Accessibility and JS: side-by-side

RobustUnderstandable

Operable

Perceivable

WCAG 4 Basic principles

Page 19: Accessibility and JS: side-by-side

WCAG #4.1 Perceivable

● Distinguishable information

● Text Alternatives

● Adaptable

● Time-based Media

Page 20: Accessibility and JS: side-by-side

WCAG #4.2 Operable

● Navigable

● Keyboard Accessible

● Seizures

● Enough Time

Page 21: Accessibility and JS: side-by-side

WCAG #4.3 Understandable

● Readable

● Predictable

● Input Assistance

Page 22: Accessibility and JS: side-by-side

WCAG #4.4 Robust

Compatible with different

User Agents

Page 23: Accessibility and JS: side-by-side

#5 Users Agents:

Do you know them?

Page 25: Accessibility and JS: side-by-side

User agents could be web browsers

Page 26: Accessibility and JS: side-by-side

...But usually Screen Readers

Page 27: Accessibility and JS: side-by-side

Screen Readers usage

WebAIM 2014

Page 28: Accessibility and JS: side-by-side

Mobile Screen Reader usage

Page 29: Accessibility and JS: side-by-side

We have to teach

We need to get connected

The user agents how to speak

Content

Presentation

Interactivity

Page 30: Accessibility and JS: side-by-side

#6 Barriers between

Accessibility and JavaScript

Page 31: Accessibility and JS: side-by-side

Accessibility Barriers

According to the University of Minnesota

● Some browsers may not support JavaScript or may have JavaScript processing disabled.

● Users may be unaware of dynamically changing page content.

● Some AJAX features (widgets) may be difficult or impossible to navigate using a keyboard alone.

● Some browsers and browser versions may not support AJAX.

● Some browsers and browser versions may not support ARIA standards.

● Some adaptive Technologies may not support AJAX and ARIA.

Page 32: Accessibility and JS: side-by-side

Accessibility Barriers

According to the University of Minnesota

● Some browsers may not support JavaScript or may have JavaScript processing disabled.

● Users may be unaware of dynamically changing page content.

● Some AJAX features (widgets) may be difficult or impossible to navigate using a keyboard alone.

● Some browsers and browser versions may not support AJAX.

● Some browsers and browser versions may not support ARIA standards.

● Some adaptive Technologies may not support AJAX and ARIA.

Summed up in four major problems

01. Browsers do not support JavaScript or it is disabled

02. Developers lack of knowledge in WAI-ARIA practices

03. Rich applications using dynamic content with Ajax (Asynchronous Javascript and XML)

04. Difficulty or impossibility to navigate using a keyboard

Page 33: Accessibility and JS: side-by-side

#6.1 Browsers Don’t Support

JavaScript

Page 34: Accessibility and JS: side-by-side

Browsers Support JavaScript

According to WebAIM 2014, over 97% of screen readers support and have javascript enabled

97,6%Enabled

2,4%Disabled

Page 35: Accessibility and JS: side-by-side

People use JavaScript and don´t know it!

Page 36: Accessibility and JS: side-by-side

Fallback strategies to others 2.4%

Provide alternative accessible controls that do not require script processing

Page 37: Accessibility and JS: side-by-side

A good idea for fallback strategiesDetect Features Instead of Browsersfunction registerEvent( sTargetID, sEventName, fnHandler )

{

var oTarget = document.getElementById( sTargetID );

if ( oTarget != null )

{

if ( oTarget.addEventListener ) {

oTarget.addEventListener( sEventName, fnToBeRun, false );

} else {

var sOnEvent = "on" + sEventName;

if ( oTarget.attachEvent )

{

oTarget.attachEvent( sOnEvent, fnHandler );

}

}

}

}

Page 38: Accessibility and JS: side-by-side

#6.2 Developers lack of knowledge

in WAI-ARIA practices

Page 39: Accessibility and JS: side-by-side

What is WAI-ARIA

Accessible Rich Internet Applications (ARIA) defines ways to make Web content and Web applications (especially those developed with Ajax and JavaScript) more accessible to people with disabilities

Page 40: Accessibility and JS: side-by-side

WAI-ARIA Workflow

Page 41: Accessibility and JS: side-by-side

The jQuery creator says

ARIA isn’t just a pipe dream of functionality,It’s implemented!

John Resig

Page 42: Accessibility and JS: side-by-side

Use semantic and Landmarks ARIA

The language your browser likes

to speak!

Page 43: Accessibility and JS: side-by-side

#6.3 Rich Internet Applications

With Ajax

Page 44: Accessibility and JS: side-by-side

Asynchronous Javascript and XML

Ajax is a technique for developing interactive Web Applications

Updating of Web content without refreshing the whole page

Every modern applications use it

Page 45: Accessibility and JS: side-by-side

Ajax and Accessibility

aria-live=”polite” How polite the live area is? The default is ‘polite’ – in that it waits until all forms of user interaction have been completed before describing the updates to the user.

aria-relevant=”additions removals” Only notify the user about new node additions and removals. This will give us the appropriate level of updates to make this possible.

aria-describedby=”users-desc”A pointer to the element that describes the contents of the live area. If the user wishes to know more about what the contents of the field represent this element can be read to them.

Page 46: Accessibility and JS: side-by-side

ARIA Live Regions

Page 47: Accessibility and JS: side-by-side

#6.4 Difficulty or impossibility to navigate using a keyboard

Page 48: Accessibility and JS: side-by-side

Navigations and menusUsers that can´t or don´t want to use the mouse

could use keyboard to navigate on the application!

Page 49: Accessibility and JS: side-by-side

Insert in the link description

On the description we should avoid generic names such as “click here”, “download”Write texts that make sense. Even when the monitor is turned off!

Preferred

Avoid

Page 50: Accessibility and JS: side-by-side

Jim Thatcher pioneering

Using Links, #hashtags and some IDs we could link and navigate in the whole page!

Skip navigation 1998

Page 51: Accessibility and JS: side-by-side

Skip navigation visual focus

Page 52: Accessibility and JS: side-by-side

Skip navigation focus

Page 53: Accessibility and JS: side-by-side

Think beyond the mouse

Page 54: Accessibility and JS: side-by-side

Semantic menu and ARIA

Page 55: Accessibility and JS: side-by-side

Show and hide sub-menus

Page 56: Accessibility and JS: side-by-side

#7 The great secrets of

accessible applications

Page 57: Accessibility and JS: side-by-side

Accessibility menu

Page 58: Accessibility and JS: side-by-side

Font size control

Page 59: Accessibility and JS: side-by-side

High and low contrast

Page 60: Accessibility and JS: side-by-side

The WEB creator says

Take the Standards to Keep the Web Free!

Tim Berners-Lee

Page 61: Accessibility and JS: side-by-side

Complementing Tim

ARIA and Interactive design too!

Felipe Albuquerque

Page 62: Accessibility and JS: side-by-side

Special thanks to

felipealbuquerque.com

[email protected]

@felipedeolinda

Felipe de AlbuquerqueAsk me here or by