wai-aria: real world examples and solutions - artur ortega, yahoo!

21
1 WAI-ARIA Real world Examples and Solutions September 2009 Techshare

Upload: artur-ortega

Post on 12-Nov-2014

3.347 views

Category:

Technology


4 download

DESCRIPTION

WAI-ARIA: Real world examples and Solutions - Artur Ortega, Yahoo! Wednesday 16 September, 2009: W3C workshop: Web Applications Enabled http://www.w3.org/WAI/presentations/2009/techshare#session5 WAI-ARIA-example in the real world: http://m.www.yahoo.com and http:/www.ysearch.com. Description of how WAI ARIA was implented and an overview of the real world challenges we face when using WAI ARIA: e.g. focus management and virtual buffer updates and the solutions. Additionally a small overview what is actually supported: http://www.marcozehe.de/2009/07/01/the-wai-aria-windows-screen-reader-shootout/

TRANSCRIPT

Page 1: WAI-ARIA: Real world examples and Solutions - Artur Ortega, Yahoo!

1

WAI-ARIAReal world Examples and Solutions

September 2009

Techshare

Page 2: WAI-ARIA: Real world examples and Solutions - Artur Ortega, Yahoo!

Speaker

Artur Ortega

Accessibility Evangelist

Yahoo!

2

Page 3: WAI-ARIA: Real world examples and Solutions - Artur Ortega, Yahoo!

Who is Artur Ortega?

Blind Software Engineer

Page 4: WAI-ARIA: Real world examples and Solutions - Artur Ortega, Yahoo!

Real world examples

m.www.yahoo.com

(sneak preview at http://uk.yahoo.com/trynew )

www.ysearch.com

Page 5: WAI-ARIA: Real world examples and Solutions - Artur Ortega, Yahoo!

Why WAI ARIA?

Page 6: WAI-ARIA: Real world examples and Solutions - Artur Ortega, Yahoo!

How did we implement it?

Page 7: WAI-ARIA: Real world examples and Solutions - Artur Ortega, Yahoo!

Yahoo! WAI ARIA Demo

m.www.yahoo.com

www.ysearch.com

Page 8: WAI-ARIA: Real world examples and Solutions - Artur Ortega, Yahoo!

Javascript

Page 9: WAI-ARIA: Real world examples and Solutions - Artur Ortega, Yahoo!

WAI ARIA

Creating the own

WAI ARIA

JavaScript service

Page 10: WAI-ARIA: Real world examples and Solutions - Artur Ortega, Yahoo!

The new Yahoo! Frontpage

Implemented ARIA service using YUI

[courier new schriftart für den block]

YUI.add("aria_service", function(Y){

var MP = Y.ModulePlatform,

SERVICES_NAMESPACE = "MPServices",

SERVICE_PROVIDER = "AriaProvider",

[...]

Page 11: WAI-ARIA: Real world examples and Solutions - Artur Ortega, Yahoo!

Virtual buffer

update: function(){

if(!bufferUpdater){

bufferUpdater = document.createElement("input");

bufferUpdater.type = "hidden";

bufferUpdater.value = 1;

document.body.appendChild(bufferUpdater);

} bufferUpdater.value = (bufferUpdater.value ==

1 ? 0 :

Page 12: WAI-ARIA: Real world examples and Solutions - Artur Ortega, Yahoo!

Focus Management

focusable: function(node, enable){

node.tabIndex = enable ? 0 : -1;

}

Page 13: WAI-ARIA: Real world examples and Solutions - Artur Ortega, Yahoo!

Check for WAI ARIA enabled browsers

supported = (

Y.UA.ie >= 8 ||

Y.UA.gecko >= 1.9 ||

Y.UA.webkit >= 530);

Page 14: WAI-ARIA: Real world examples and Solutions - Artur Ortega, Yahoo!

Setting the state

setState: function(node, state){

node.setAttribute(ARIA_PREFIX + state, true);

}

Page 15: WAI-ARIA: Real world examples and Solutions - Artur Ortega, Yahoo!

Setting a role

setRole: function(node, role){

return node.setAttribute("role", role);

}

Page 16: WAI-ARIA: Real world examples and Solutions - Artur Ortega, Yahoo!

Clearing Roles

clearState: function(node, state){

return node.removeAttribute(ARIA_PREFIX + state);

}

Page 17: WAI-ARIA: Real world examples and Solutions - Artur Ortega, Yahoo!

Unit Tests

Storing the service provider on a global namespace

Easy access

for unit tests

Y.namespace(SERVICES_NAMESPACE);

Y[SERVICES_NAMESPACE][SERVICE_PROVIDER] = {

name: "aria",

getService : function(moduleplatform, id) {

return AriaService;

}

};

Page 18: WAI-ARIA: Real world examples and Solutions - Artur Ortega, Yahoo!

Teststeps for ysearch

Using different screen readers

- speaks the “Search query” label

- speaks the “Use the..” description

- transition to the list of suggested terms is announced along with

- the full instructions

- the selected item

- each focus transition is properly announced and the highlighted item read

Page 19: WAI-ARIA: Real world examples and Solutions - Artur Ortega, Yahoo!

Conclusion

- Implementation

- Tests

Page 20: WAI-ARIA: Real world examples and Solutions - Artur Ortega, Yahoo!

20

Page 21: WAI-ARIA: Real world examples and Solutions - Artur Ortega, Yahoo!

Artur Ortega

Accessibility EvangelistYahoo! Europe Ltd

125 Shaftesbury AvenueLondon WC2H 8AD

United [email protected]