Movatterモバイル変換


[0]ホーム

URL:


Uploaded bycolinbdclark
KEY, PPTX949 views

The Inclusive Web: hands-on with HTML5 and jQuery

The document discusses accessibility in web design, emphasizing the importance of accommodating users with disabilities through flexible, separable, and modifiable systems. It highlights the use of jQuery and HTML5 to improve the usability and accessibility of web applications, covering topics like enhanced keyboard navigation and the implementation of ARIA roles. The authors advocate for inclusive design practices and the ongoing evolution of web standards for a more accessible future.

Embed presentation

Download as KEY, PPTX
The Inclusive Web                 Hands on with                HTML5 and jQuery            Justin Obara & Colin Clark                Inclusive Design Research Centre                                  fluidproject.org
A bit about us, quickly
!"#$Decapod
What is accessibility?
Rethinking Disability
Rethinking Disability
Rethinking Disability   A mismatch between the     user   and the     user interface
Disability is a usability issue
Disability is contextual
Designing for Context
Disability is environmental
Accessibility is...      the ability of the systemto accommodate the needs of the user
the web today
jQuery Hits the Spot
jQuery Hits the Spot• Browser inconsistencies and bugs
jQuery Hits the Spot• Browser inconsistencies and bugs• Complexity of the DOM
jQuery Hits the Spot• Browser inconsistencies and bugs• Complexity of the DOM• Handling events and asynchrony
jQuery Hits the Spot•   Browser inconsistencies and bugs•   Complexity of the DOM•   Handling events and asynchrony•   Communicating with the server
Toolkits can help!•   Browser Abstraction•   Complexity of the DOM•   Handling events and asynchrony•   Communicating with the server
Toolkits can help!•   Browser abstraction•   A simple, unified API for the DOM•   Handling events and asynchrony•   Communicating with the server
Toolkits can help!•   Browser abstraction•   A simple, unified API for the DOM•   Easy, functional events system•   Communicating with the server
Toolkits can help!•   Browser abstraction•   A simple, unified API for the DOM•   Easy, functional events system•   Built-in AJAX, XML, and JSON
Without jQueryfunction stripeListElements() {   // get the items from the list   var myItems = document.getElementsByTagName("li");   // skip line 0 as it's the header row   for(var i = 0; i < myItems.length; i++) {      if ((i % 2) === 0) {           myItems[i].className = "striped";      }   }  }
With jQuery jQuery("li");
With jQueryjQuery("li:even");
With jQueryjQuery("li:even").addClass("striped");
Accessiblesystems are...  • Flexible  • Separable  • Modifiable
Graceful Degradation
Markup<!-- Only shown if browser doesn't support JavaScript --><label for="..." class="fl-progEnhance-basic">Add File:</label><!-- Only shown if JavaScript is turned on --><div class="fl-progEnhance-enhanced">                                  It’s just a couple of classes!
Styles.fl-progEnhance-enhanced {display:none}.fl-progEnhance-basic {}              Hide the fancy stuff, show the basics by default.
The Code// Use JavaScript to hide basic markup.$("head").append("<style type='text/css'>   .fl-progEnhance-basic{ display: none; }   .fl-progEnhance-enhanced { display: block; }</style>");                      Use JavaScript to flip the styles around!
how assistive technology         works
keyboard navigation & aria
Opaque Markup<!-- This is a Tabs widget.               --><!-- How would you know, looking only at the markup? --><ol>  <li id="ch1Tab">     <a href="#ch1Panel">Chapter 1</a>  </li>  <li id="ch2Tab">     <a href="#ch2Panel">Chapter 2</a>  </li>  <li id="quizTab">     <a href="#quizPanel">Quiz</a>  </li></ol><div>  <div id="ch1Panel">Chapter 1 Stuff</div>  <div id=”ch2Panel”>Chapter 2 Stuff</div>  <div id=”quizPanel”>Quiz Stuff</div></div>
Opaque Markup: Tabs
ARIA fills the gap
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
Using ARIA<!-- Now *these* are Tabs! --><ol role=”tablist”> <li id=”ch1Tab” role=”tab”>  <a href="#ch1Panel">Chapter 1</a> </li> <li id=”ch2Tab” role=”tab”>  <a href="#ch2Panel">Chapter 2</a> </li> <li id=”quizTab” role=”tab”>  <a href="#quizPanel">Quiz</a> </li></ol><div> <div id="ch1Panel" role=”tabpanel”     aria-labelledby=”ch1Tab”>Chapter 1 Stuff</div> <div id=”ch2Panel” role=”tabpanel”     aria-labelledby=”ch2Tab”>Chapter 2 Stuff</div> <div id=”quizPanel” role=”tabpanel”     aria-labelledby=”quizTab”>Quiz Stuff</div></div>
Adding ARIA in code// Identify the container as a list of tabs.tabContainer.attr("role", "tablist");// Give each tab the "tab" role.tabs.attr("role", "tab");// Give each panel the appropriate role,          panels.attr("role","tabpanel");panels.each(function (idx, panel) {   var tabForPanel = that.tabs.eq(idx);   // Relate the panel to the tab that labels it.   $(panel).attr("aria-labelledby", tabForPanel[0].id);});
Keyboard Navigation• Everything that works with the mouse  should work with the keyboard• ... but not always in the same way• Support familiar conventions   http://dev.aol.com/dhtml_style_guide
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. A lot of code.
Keyboard navigation: Tabs
Tabindex examples<!-- Tab container should be focusable --><ol id=”animalTabs” tabindex=”0”> <!-- Individual Tabs shouldn’t be focusable --> <!-- We’ll focus them with JavaScript instead --> <li id=”tab1”>  <a href=”#cats” tabindex=”-1”>Cats</a> </li> <li id=”tab2”>  <a href=”#cats” tabindex=”-1”>Dogs</a> </li> <li id=”tab3”>  <a href=”#cats” tabindex=”-1”>Alligators</a> </li></ol>
Making Things Tabbable  • Tabindex varies subtly across browsers  • jquery.attr() normalizes it as of 1.3  • For all the gory details:     http://fluidproject.org/blog/2008/01/09/       getting-setting-and-removing-tabindex-values-with-       javascript/// Make the tablist accessible with the Tab key.tabContainer.attr("tabindex", "0");// And take the anchors out of the Tab order.$(“a”, tabs).attr("tabindex", "-1");
Adding the Arrow Keys// Make each tab accessible with the left and right arrow keys.tabContainer.fluid("selectable", {   selectableSelector: that.options.selectors.tabs,   direction: fluid.a11y.orientation.HORIZONTAL,   onSelect: function (tab) {      $(tab).addClass(that.options.styles.highlighted);   },      onUnselect: function (tab) {        $(tab).removeClass(that.options.styles.highlighted);      }});
Making Them Activatable// Make each tab activatable with Spacebar and Enter.tabs.fluid("activatable", function (evt) {    // Your handler code here. Maybe the same as .click()?});
Documentation• Tutorial: http://wiki.fluidproject.org/display/fluid/Keyboard+Accessibility +Tutorial• API Reference: http://wiki.fluidproject.org/display/fluid/Keyboard+Accessibility +Plugin+API
the web tomorrow
“you have to use flash for that”                  “the web can’t do that!”       “you need an app for that!”
music and video
games
augmented reality
mobile
Beyond the buzzword...• Media, drawing, animation, and interactivity      <audio>, <video>, <canvas>• New widgets—you don’t have to roll your own      <progress>, <menu>• Richer semantics for forms and documents      <article>, <nav>, <input type=”date”>
Other cool stuff...• CSS3      transition, transform, gradient• Working with files      File API, FormData, XHR Level 2• Coming soon      Device, Text to Speech!
What about accessibility?
Making use of semantics
What’s coming• Headings      Based on nesting within sections• Continued enhancements from semantics      e.g. improved AT awareness for navigation <nav>• Native widgets
Canvas Accessibility
Canvas Accessibility
Canvas Accessibility1. Shadow DOM2. Focus indicators    ... not quite yet. In the meantime...   1. Build alternatives                      2. Degrade gracefully
The Bottom Line• HTML5 is coming—experiment with it now• Lots of great potential for improving access• Assistive technologies are slow on the uptake• Some features are going to be a challenge  (Canvas)
building cool stuff
an HTML5 uploader
Features     • Degrades gracefully     • Uploads multiple files at once     • Keyboard navigable     • Uses hot new HTML5 features:FormData   XMLHttpRequest Level 2   <progress> (almost!)
Dive right in: markup<input type="file" multiple=""  id="d-uploader-filesControl"  class="d-uploader-filesControl fl-progEnhance-basic" />
Getting the filesfilesControl.change(function () {    that.events.onAdd.fire(filesControl[0].files);});
demo.uploader.sendRequest = function (file, url, events) {  var formData = new FormData();  formData.append("file", file);     // Create a new XHR.     var xhr = new XMLHttpRequest();     xhr.open("POST", url, true);     // Register success and error listeners.     xhr.onreadystatechange = function () {        if (status === 200) {            events.onSuccess.fire(file);        } else {            events.onError.fire(file);        }     };     // Listen for progress events as the file is uploading.     xhr.upload.onprogress = function (progressEvent) {        events.onProgress.fire(file, progressEvent.loaded, progressEvent.total);     };     // Send off the request to the server.     xhr.send(formData);};
HTML5 Inputs<input   type=”tel”> <!-- phone number --><input   type=”email”> <!-- e-mail address --><input   type=”date”> <!-- date --><input   type=”search”> <!-- search field --><!-- number field --><input type=”number” min=”0” max=”10” step=”1” value=”1”><!-- Like an autocomplete widget --><input list=”dlist”><datalist id=”dlist”><option value=”HTML5”></datalist>
HTML5 Inputs:       attributes/properies<label for=”name”>Name</label><input type=”text” id=”name” placeholder=”My name is ...”  required autofocus />
Geolocation// test if geolocation api is supportedif (!!navigator.geolocation) {    // success callback is passed a location object    // coords property holds coordinate information    // Firefox also has an address property    navigator.geolocation.getCurrentPosition(success, error);}
Geolocation:           Location Object// test if geolocation api is supportedif (!!navigator.geolocation) {    // success callback is passed a location object    navigator.geolocation.getCurrentPosition(success, error);}
What’s Infusion?• Application framework built on top of jQuery• UI components you can reuse and adapt• Lightweight CSS framework for styling• Accessibility tools and plugins for jQuery• Open architecture: everything is configurable
Great UX is hard work• Your code gets unruly as it grows• UIs are hard to reuse or repurpose• Design change requires big code change• Accessibility is confusing• Combining different code/libraries doesn’t  always work
Open Architecture:      Unlock your markup      Let developers and users in      A widget isn’t just one thing      Question the rulesNo Black Boxes
Transparent   Apps• M is where it’s at• Events inside and out• Assistive technology  inside the Web, not  bolted on
UI Options & FSS
UI Options & FSS
CSS Frameworks“If you’re going to use a framework, itshould be yours; one that you’ve created.You can look at existing frameworks forideas and hack at it. But the professionalsin this room are not well served by pickingup a framework and using it as-is.”                               - Eric Meyer
Fluid Skinning System• FSS is built to be hacked on• Provides a core set of building blocks• Reset, text, layouts, themes• Namespaced: no conflicts with your stuff• Themes for better legibility & readability       http://wiki.fluidproject.org/x/96M7
https://github.com/jobara/workshops
Questions?Justin Obarae: jobara@ocad.caColin Clarke: cclark@ocad.cat: @colinbdclarkfluidproject.orggithub.com/fluid-project
Photo CreditsCurb cut, Great PA-NJ, http://www.flickr.com/photos/50393252@N02/4822063888/Stethoscope, Han-Oh Chung, http://www.flickr.com/photos/chickenlump/2038512161/Texting while walking, Mobile Monday Amsterdam, http://www.flickr.com/photos/momoams/2926622070/MOMA WiFi, http://www.flickr.com/photos/89554035@N00/2445178036Plasticine iPhone, Paula Ortiz López, http://www.flickr.com/photos/paulaortizlopez/5342740603/Skateboarder, Amin Samsudin, http://www.flickr.com/photos/aminchoc/4108543387/Plasticine Animal, panshipanshi, http://www.flickr.com/photos/panshipanshi/2123208719/

Recommended

PDF
jQuery: Nuts, Bolts and Bling
KEY
User Interface Development with jQuery
PDF
fuser interface-development-using-jquery
PPTX
JavaScript!
KEY
Nothing Hard Baked: Designing the Inclusive Web
PPTX
SharePoint and jQuery Essentials
PDF
jQuery Loves Developers - Oredev 2009
KEY
An in-depth look at jQuery UI
PDF
Introduction to jQuery
PDF
jQuery Proven Performance Tips & Tricks
PPTX
jQuery Presentation
PDF
Django Heresies
PDF
jQuery in the [Aol.] Enterprise
PDF
How to make Ajax Libraries work for you
PDF
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)
PPTX
Getting started with jQuery
PPTX
SharePoint Cincy 2012 - jQuery essentials
PDF
Web2.0 with jQuery in English
PDF
jQuery (MeshU)
PDF
JavaScript Library Overview
PDF
JavaScript Libraries (Kings of Code)
PDF
JavaScript Libraries (@Media)
PPTX
A Rich Web Experience with jQuery, Ajax and .NET
KEY
An in-depth look at jQuery
PPTX
Maintainable JavaScript 2012
KEY
the 5 layers of web accessibility - Open Web Camp II
PPTX
Getting the Most Out of jQuery Widgets
KEY
The jQuery Library
PDF
Flocking at the SuperCollider Symposium 2013
PDF
unifi ap datasheet

More Related Content

PDF
jQuery: Nuts, Bolts and Bling
KEY
User Interface Development with jQuery
PDF
fuser interface-development-using-jquery
PPTX
JavaScript!
KEY
Nothing Hard Baked: Designing the Inclusive Web
PPTX
SharePoint and jQuery Essentials
PDF
jQuery Loves Developers - Oredev 2009
KEY
An in-depth look at jQuery UI
jQuery: Nuts, Bolts and Bling
User Interface Development with jQuery
fuser interface-development-using-jquery
JavaScript!
Nothing Hard Baked: Designing the Inclusive Web
SharePoint and jQuery Essentials
jQuery Loves Developers - Oredev 2009
An in-depth look at jQuery UI

What's hot

PDF
Introduction to jQuery
PDF
jQuery Proven Performance Tips & Tricks
PPTX
jQuery Presentation
PDF
Django Heresies
PDF
jQuery in the [Aol.] Enterprise
PDF
How to make Ajax Libraries work for you
PDF
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)
PPTX
Getting started with jQuery
PPTX
SharePoint Cincy 2012 - jQuery essentials
PDF
Web2.0 with jQuery in English
PDF
jQuery (MeshU)
PDF
JavaScript Library Overview
PDF
JavaScript Libraries (Kings of Code)
PDF
JavaScript Libraries (@Media)
PPTX
A Rich Web Experience with jQuery, Ajax and .NET
KEY
An in-depth look at jQuery
PPTX
Maintainable JavaScript 2012
KEY
the 5 layers of web accessibility - Open Web Camp II
PPTX
Getting the Most Out of jQuery Widgets
KEY
The jQuery Library
Introduction to jQuery
jQuery Proven Performance Tips & Tricks
jQuery Presentation
Django Heresies
jQuery in the [Aol.] Enterprise
How to make Ajax Libraries work for you
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)
Getting started with jQuery
SharePoint Cincy 2012 - jQuery essentials
Web2.0 with jQuery in English
jQuery (MeshU)
JavaScript Library Overview
JavaScript Libraries (Kings of Code)
JavaScript Libraries (@Media)
A Rich Web Experience with jQuery, Ajax and .NET
An in-depth look at jQuery
Maintainable JavaScript 2012
the 5 layers of web accessibility - Open Web Camp II
Getting the Most Out of jQuery Widgets
The jQuery Library

Viewers also liked

PDF
Flocking at the SuperCollider Symposium 2013
PDF
unifi ap datasheet
KEY
Accessible UIs with jQuery and Infusion
PDF
Mobile Development with uPortal and Infusion
KEY
Thoughts on Open Accessibility
PPT
Dwilsonlis557
PPTX
Palm Beach Learn Green Conference 10.15.10
PDF
Benweir Book August2012 Lowres
PPT
Iit_teaching_aids
Flocking at the SuperCollider Symposium 2013
unifi ap datasheet
Accessible UIs with jQuery and Infusion
Mobile Development with uPortal and Infusion
Thoughts on Open Accessibility
Dwilsonlis557
Palm Beach Learn Green Conference 10.15.10
Benweir Book August2012 Lowres
Iit_teaching_aids

Similar to The Inclusive Web: hands-on with HTML5 and jQuery

PDF
Web Accessibility - A feature you can build
PPTX
Accessible web applications
PPTX
Accessibility with Single Page Apps
KEY
Making your jQuery Plugins More Accessible
PPTX
Accessibility of HTML5 and Rich Internet Applications - CSUN 2012
PDF
Developing an Accessible Web
PDF
Accessibility - A feature you can build
PDF
Accessibility - A feature you can build
PPSX
Accessible Design with HTML5 - HTML5DevConf.com May 21st San Francisco, 2012 ...
PPT
IWMW 1997: Next Year's Web
 
PDF
Keyboard and Interaction Accessibility Techniques
PDF
Open and Accessible UI
PDF
a11yTO - Web Accessibility for Developers
PPTX
Surviving Dev Frameworks 2019
PDF
Ajax and Accessibiity
PPTX
How you can start building accessible websites today (... and why!)
 
PPTX
AccessU 2018 - Surviving Dev Frameworks: Lessons Learned with WordPress, Drup...
PDF
Accessible web applications
PDF
Accessible JavaScript applications
PDF
Accessibility and JS: side-by-side
Web Accessibility - A feature you can build
Accessible web applications
Accessibility with Single Page Apps
Making your jQuery Plugins More Accessible
Accessibility of HTML5 and Rich Internet Applications - CSUN 2012
Developing an Accessible Web
Accessibility - A feature you can build
Accessibility - A feature you can build
Accessible Design with HTML5 - HTML5DevConf.com May 21st San Francisco, 2012 ...
IWMW 1997: Next Year's Web
 
Keyboard and Interaction Accessibility Techniques
Open and Accessible UI
a11yTO - Web Accessibility for Developers
Surviving Dev Frameworks 2019
Ajax and Accessibiity
How you can start building accessible websites today (... and why!)
 
AccessU 2018 - Surviving Dev Frameworks: Lessons Learned with WordPress, Drup...
Accessible web applications
Accessible JavaScript applications
Accessibility and JS: side-by-side

Recently uploaded

PDF
Day 3 - Data and Application Security - 2nd Sight Lab Cloud Security Class
PDF
Unlocking the Power of Salesforce Architecture: Frameworks for Effective Solu...
PDF
Vibe Coding vs. Spec-Driven Development [Free Meetup]
PDF
Day 1 - Cloud Security Strategy and Planning ~ 2nd Sight Lab ~ Cloud Security...
PDF
GPUS and How to Program Them by Manya Bansal
PDF
December Patch Tuesday
 
PDF
Making Sense of Raster: From Bit Depth to Better Workflows
PDF
Session 1 - Solving Semi-Structured Documents with Document Understanding
DOCX
iRobot Post‑Mortem and Alternative Paths - Discussion Document for Boards and...
PDF
DevFest El Jadida 2025 - Product Thinking
PDF
Day 5 - Red Team + Blue Team in the Cloud - 2nd Sight Lab Cloud Security Class
PPTX
Kanban India 2025 | Daksh Gupta | Modeling the Models, Generative AI & Kanban
PPTX
Cloud-and-AI-Platform-FY26-Partner-Playbook.pptx
DOCX
Introduction to the World of Computers (Hardware & Software)
PPT
software-security-intro in information security.ppt
PDF
Usage Control for Process Discovery through a Trusted Execution Environment
PPTX
Cybercrime in the Digital Age: Risks, Impact & Protection
PPTX
AI's Impact on Cybersecurity - Challenges and Opportunities
PPTX
Protecting Data in an AI Driven World - Cybersecurity in 2026
PDF
Six Shifts For 2026 (And The Next Six Years)
Day 3 - Data and Application Security - 2nd Sight Lab Cloud Security Class
Unlocking the Power of Salesforce Architecture: Frameworks for Effective Solu...
Vibe Coding vs. Spec-Driven Development [Free Meetup]
Day 1 - Cloud Security Strategy and Planning ~ 2nd Sight Lab ~ Cloud Security...
GPUS and How to Program Them by Manya Bansal
December Patch Tuesday
 
Making Sense of Raster: From Bit Depth to Better Workflows
Session 1 - Solving Semi-Structured Documents with Document Understanding
iRobot Post‑Mortem and Alternative Paths - Discussion Document for Boards and...
DevFest El Jadida 2025 - Product Thinking
Day 5 - Red Team + Blue Team in the Cloud - 2nd Sight Lab Cloud Security Class
Kanban India 2025 | Daksh Gupta | Modeling the Models, Generative AI & Kanban
Cloud-and-AI-Platform-FY26-Partner-Playbook.pptx
Introduction to the World of Computers (Hardware & Software)
software-security-intro in information security.ppt
Usage Control for Process Discovery through a Trusted Execution Environment
Cybercrime in the Digital Age: Risks, Impact & Protection
AI's Impact on Cybersecurity - Challenges and Opportunities
Protecting Data in an AI Driven World - Cybersecurity in 2026
Six Shifts For 2026 (And The Next Six Years)

The Inclusive Web: hands-on with HTML5 and jQuery

  • 1.
    The Inclusive Web Hands on with HTML5 and jQuery Justin Obara & Colin Clark Inclusive Design Research Centre fluidproject.org
  • 2.
    A bit aboutus, quickly
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
    Rethinking Disability A mismatch between the user and the user interface
  • 8.
    Disability is ausability issue
  • 9.
  • 10.
  • 11.
  • 12.
    Accessibility is... the ability of the systemto accommodate the needs of the user
  • 13.
  • 15.
  • 16.
    jQuery Hits theSpot• Browser inconsistencies and bugs
  • 17.
    jQuery Hits theSpot• Browser inconsistencies and bugs• Complexity of the DOM
  • 18.
    jQuery Hits theSpot• Browser inconsistencies and bugs• Complexity of the DOM• Handling events and asynchrony
  • 19.
    jQuery Hits theSpot• Browser inconsistencies and bugs• Complexity of the DOM• Handling events and asynchrony• Communicating with the server
  • 20.
    Toolkits can help!• Browser Abstraction• Complexity of the DOM• Handling events and asynchrony• Communicating with the server
  • 21.
    Toolkits can help!• Browser abstraction• A simple, unified API for the DOM• Handling events and asynchrony• Communicating with the server
  • 22.
    Toolkits can help!• Browser abstraction• A simple, unified API for the DOM• Easy, functional events system• Communicating with the server
  • 23.
    Toolkits can help!• Browser abstraction• A simple, unified API for the DOM• Easy, functional events system• Built-in AJAX, XML, and JSON
  • 24.
    Without jQueryfunction stripeListElements(){ // get the items from the list var myItems = document.getElementsByTagName("li"); // skip line 0 as it's the header row for(var i = 0; i < myItems.length; i++) { if ((i % 2) === 0) { myItems[i].className = "striped"; } } }
  • 25.
  • 26.
  • 27.
  • 28.
    Accessiblesystems are...• Flexible • Separable • Modifiable
  • 29.
  • 30.
    Markup<!-- Only shownif browser doesn't support JavaScript --><label for="..." class="fl-progEnhance-basic">Add File:</label><!-- Only shown if JavaScript is turned on --><div class="fl-progEnhance-enhanced"> It’s just a couple of classes!
  • 31.
    Styles.fl-progEnhance-enhanced {display:none}.fl-progEnhance-basic {} Hide the fancy stuff, show the basics by default.
  • 32.
    The Code// UseJavaScript to hide basic markup.$("head").append("<style type='text/css'> .fl-progEnhance-basic{ display: none; } .fl-progEnhance-enhanced { display: block; }</style>"); Use JavaScript to flip the styles around!
  • 33.
  • 34.
  • 35.
    Opaque Markup<!-- Thisis a Tabs widget. --><!-- How would you know, looking only at the markup? --><ol> <li id="ch1Tab"> <a href="#ch1Panel">Chapter 1</a> </li> <li id="ch2Tab"> <a href="#ch2Panel">Chapter 2</a> </li> <li id="quizTab"> <a href="#quizPanel">Quiz</a> </li></ol><div> <div id="ch1Panel">Chapter 1 Stuff</div> <div id=”ch2Panel”>Chapter 2 Stuff</div> <div id=”quizPanel”>Quiz Stuff</div></div>
  • 36.
  • 37.
  • 38.
    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
  • 39.
    Using ARIA<!-- Now*these* are Tabs! --><ol role=”tablist”> <li id=”ch1Tab” role=”tab”> <a href="#ch1Panel">Chapter 1</a> </li> <li id=”ch2Tab” role=”tab”> <a href="#ch2Panel">Chapter 2</a> </li> <li id=”quizTab” role=”tab”> <a href="#quizPanel">Quiz</a> </li></ol><div> <div id="ch1Panel" role=”tabpanel” aria-labelledby=”ch1Tab”>Chapter 1 Stuff</div> <div id=”ch2Panel” role=”tabpanel” aria-labelledby=”ch2Tab”>Chapter 2 Stuff</div> <div id=”quizPanel” role=”tabpanel” aria-labelledby=”quizTab”>Quiz Stuff</div></div>
  • 40.
    Adding ARIA incode// Identify the container as a list of tabs.tabContainer.attr("role", "tablist");// Give each tab the "tab" role.tabs.attr("role", "tab");// Give each panel the appropriate role, panels.attr("role","tabpanel");panels.each(function (idx, panel) { var tabForPanel = that.tabs.eq(idx); // Relate the panel to the tab that labels it. $(panel).attr("aria-labelledby", tabForPanel[0].id);});
  • 41.
    Keyboard Navigation• Everythingthat works with the mouse should work with the keyboard• ... but not always in the same way• Support familiar conventions http://dev.aol.com/dhtml_style_guide
  • 42.
    Keyboard Conventions• Tabkey 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. A lot of code.
  • 43.
  • 44.
    Tabindex examples<!-- Tabcontainer should be focusable --><ol id=”animalTabs” tabindex=”0”> <!-- Individual Tabs shouldn’t be focusable --> <!-- We’ll focus them with JavaScript instead --> <li id=”tab1”> <a href=”#cats” tabindex=”-1”>Cats</a> </li> <li id=”tab2”> <a href=”#cats” tabindex=”-1”>Dogs</a> </li> <li id=”tab3”> <a href=”#cats” tabindex=”-1”>Alligators</a> </li></ol>
  • 45.
    Making Things Tabbable • Tabindex varies subtly across browsers • jquery.attr() normalizes it as of 1.3 • For all the gory details: http://fluidproject.org/blog/2008/01/09/ getting-setting-and-removing-tabindex-values-with- javascript/// Make the tablist accessible with the Tab key.tabContainer.attr("tabindex", "0");// And take the anchors out of the Tab order.$(“a”, tabs).attr("tabindex", "-1");
  • 46.
    Adding the ArrowKeys// Make each tab accessible with the left and right arrow keys.tabContainer.fluid("selectable", { selectableSelector: that.options.selectors.tabs, direction: fluid.a11y.orientation.HORIZONTAL, onSelect: function (tab) { $(tab).addClass(that.options.styles.highlighted); }, onUnselect: function (tab) { $(tab).removeClass(that.options.styles.highlighted); }});
  • 47.
    Making Them Activatable//Make each tab activatable with Spacebar and Enter.tabs.fluid("activatable", function (evt) { // Your handler code here. Maybe the same as .click()?});
  • 48.
    Documentation• Tutorial: http://wiki.fluidproject.org/display/fluid/Keyboard+Accessibility+Tutorial• API Reference: http://wiki.fluidproject.org/display/fluid/Keyboard+Accessibility +Plugin+API
  • 49.
  • 50.
    “you have touse flash for that” “the web can’t do that!” “you need an app for that!”
  • 52.
  • 53.
  • 54.
  • 55.
  • 56.
    Beyond the buzzword...•Media, drawing, animation, and interactivity <audio>, <video>, <canvas>• New widgets—you don’t have to roll your own <progress>, <menu>• Richer semantics for forms and documents <article>, <nav>, <input type=”date”>
  • 57.
    Other cool stuff...•CSS3 transition, transform, gradient• Working with files File API, FormData, XHR Level 2• Coming soon Device, Text to Speech!
  • 58.
  • 59.
    Making use ofsemantics
  • 60.
    What’s coming• Headings Based on nesting within sections• Continued enhancements from semantics e.g. improved AT awareness for navigation <nav>• Native widgets
  • 61.
  • 62.
  • 63.
    Canvas Accessibility1. ShadowDOM2. Focus indicators ... not quite yet. In the meantime... 1. Build alternatives 2. Degrade gracefully
  • 64.
    The Bottom Line•HTML5 is coming—experiment with it now• Lots of great potential for improving access• Assistive technologies are slow on the uptake• Some features are going to be a challenge (Canvas)
  • 65.
  • 66.
  • 67.
    Features • Degrades gracefully • Uploads multiple files at once • Keyboard navigable • Uses hot new HTML5 features:FormData XMLHttpRequest Level 2 <progress> (almost!)
  • 68.
    Dive right in:markup<input type="file" multiple="" id="d-uploader-filesControl" class="d-uploader-filesControl fl-progEnhance-basic" />
  • 69.
    Getting the filesfilesControl.change(function() { that.events.onAdd.fire(filesControl[0].files);});
  • 70.
    demo.uploader.sendRequest = function(file, url, events) { var formData = new FormData(); formData.append("file", file); // Create a new XHR. var xhr = new XMLHttpRequest(); xhr.open("POST", url, true); // Register success and error listeners. xhr.onreadystatechange = function () { if (status === 200) { events.onSuccess.fire(file); } else { events.onError.fire(file); } }; // Listen for progress events as the file is uploading. xhr.upload.onprogress = function (progressEvent) { events.onProgress.fire(file, progressEvent.loaded, progressEvent.total); }; // Send off the request to the server. xhr.send(formData);};
  • 72.
    HTML5 Inputs<input type=”tel”> <!-- phone number --><input type=”email”> <!-- e-mail address --><input type=”date”> <!-- date --><input type=”search”> <!-- search field --><!-- number field --><input type=”number” min=”0” max=”10” step=”1” value=”1”><!-- Like an autocomplete widget --><input list=”dlist”><datalist id=”dlist”><option value=”HTML5”></datalist>
  • 73.
    HTML5 Inputs: attributes/properies<label for=”name”>Name</label><input type=”text” id=”name” placeholder=”My name is ...” required autofocus />
  • 74.
    Geolocation// test ifgeolocation api is supportedif (!!navigator.geolocation) { // success callback is passed a location object // coords property holds coordinate information // Firefox also has an address property navigator.geolocation.getCurrentPosition(success, error);}
  • 75.
    Geolocation: Location Object// test if geolocation api is supportedif (!!navigator.geolocation) { // success callback is passed a location object navigator.geolocation.getCurrentPosition(success, error);}
  • 77.
    What’s Infusion?• Applicationframework built on top of jQuery• UI components you can reuse and adapt• Lightweight CSS framework for styling• Accessibility tools and plugins for jQuery• Open architecture: everything is configurable
  • 78.
    Great UX ishard work• Your code gets unruly as it grows• UIs are hard to reuse or repurpose• Design change requires big code change• Accessibility is confusing• Combining different code/libraries doesn’t always work
  • 79.
    Open Architecture: Unlock your markup Let developers and users in A widget isn’t just one thing Question the rulesNo Black Boxes
  • 80.
    TransparentApps• M is where it’s at• Events inside and out• Assistive technology inside the Web, not bolted on
  • 81.
  • 82.
  • 83.
    CSS Frameworks“If you’regoing to use a framework, itshould be yours; one that you’ve created.You can look at existing frameworks forideas and hack at it. But the professionalsin this room are not well served by pickingup a framework and using it as-is.” - Eric Meyer
  • 84.
    Fluid Skinning System•FSS is built to be hacked on• Provides a core set of building blocks• Reset, text, layouts, themes• Namespaced: no conflicts with your stuff• Themes for better legibility & readability http://wiki.fluidproject.org/x/96M7
  • 85.
  • 86.
    Questions?Justin Obarae: jobara@ocad.caColinClarke: cclark@ocad.cat: @colinbdclarkfluidproject.orggithub.com/fluid-project
  • 87.
    Photo CreditsCurb cut,Great PA-NJ, http://www.flickr.com/photos/50393252@N02/4822063888/Stethoscope, Han-Oh Chung, http://www.flickr.com/photos/chickenlump/2038512161/Texting while walking, Mobile Monday Amsterdam, http://www.flickr.com/photos/momoams/2926622070/MOMA WiFi, http://www.flickr.com/photos/89554035@N00/2445178036Plasticine iPhone, Paula Ortiz López, http://www.flickr.com/photos/paulaortizlopez/5342740603/Skateboarder, Amin Samsudin, http://www.flickr.com/photos/aminchoc/4108543387/Plasticine Animal, panshipanshi, http://www.flickr.com/photos/panshipanshi/2123208719/

Editor's Notes


[8]ページ先頭

©2009-2025 Movatter.jp