SlideShare uma empresa Scribd logo
1 de 69
Building Accessible User Interfaces
      with jQuery and Fluid Infusion



Colin Clark, Fluid Project Technical Lead,
Adaptive Technology Resource Centre
Topics We’ll Cover

• The Fluid community
• Introducing Infusion
• Developing accessible JavaScript
• Infusion’s Architecture
• Techniques for portals, mashups, CMS’s
• Where we’re headed
Fluid...
          http://fluidproject.org

• Is an open source community of
 • Designers
 • Developers
 • Accessibility experts
• Helps other open communities
• Consists of universities, museums and
  individuals
What We Do
• Offer design advice and resources
• Contribute to other communities:
 • jQuery UI
 • Dojo
 • W3C Accessibility
• Build Infusion, our JavaScript
  application framework
Introducing




http://fluidproject.org/products/infusion/
World, Meet Infusion

• Application framework built on top of jQuery
• The culmination of our work helping others
• Designed for usability and accessibility
• Open architecture: everything is configurable
What’s in Infusion?


• A development framework for building apps
• UI components you can reuse and adapt
• Lightweight CSS framework for styling
• Accessibility tools and plugins for jQuery
Building Great UIs Is Hard

  • 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
Flexible User Interfaces


Infusion is an application framework designed to
provide unprecedented flexibility while
preserving interoperability.
Types of JavaScript Tools

• Foundational Toolkits
• Application Frameworks
     ... compare and contrast
Foundational toolkits

•   Totally presentation focused
•   DOM manipulation
•   Event binding                     jQuery
•   Ajax                           Prototype
                                   Dojo core
Application frameworks

• Model notifications “something changed here”
• Views to help keep your presentational code clean
• Data binding to sync the display with your model
                                             SproutCore
                                              Dojo/Dijit/
                                                  Dojox
                                             Cappuccino
Infusion is Different

• Accessibility baked right in
• Carefully designed interactions
• Markup is in your control
• Not the same old MVC
• Supports portals, mashups and CMS’s
Deeply Accessible
What is Accessibility?
A New Definition

• Accessibility is the ability of the system to
  accommodate the needs of the user
• Disability is the mismatch between the user
  and the interface provided
• We all experience disability
• Accessible software = better software
Assistive Technologies
• Present and control the user interface in
  different ways
• Not just screen readers!
• Use built-in operating system APIs to
  understand the user interface

                                   Screen readers
                                 Screen magnifiers
                              On-screen keyboards
DHTML: A New Can of Worms


• Shift from documents to applications
• Familiar a11y techniques aren’t enough
• Most DHTML is completely inaccessible
• New techniques are still being figured out
The Problem

• Custom widgets often look, but don’t act,
  like their counterparts on the desktop
• HTML provides only simple semantics
• Not enough information for ATs
• Dynamic updates require new design
  strategies to be accessible
The Solution


• Describe user interfaces with ARIA
• Add consistent keyboard controls
• Provide flexible styling and presentation
Supporting Assistive Technology
Opaque Markup
// These are tabs. How would you know?
<ol>
 <li><a href=”#cats”>Cats</a></li>
 <li><a href=”#dogs”>Dogs</a></li>
 <li><a href=”#gators”>Gators</a></li>
</ol>
<div>
 <div id=”cats”>Cats meow.</div>
 <div id=”dogs”>Dogs bark.</div>
 <div id=”gators”>Gators bite.</div>
</div>
Opaque Markup: Tabs
ARIA

• Accessible Rich Internet Applications
• W3C specification in the works
• Fills the semantic gaps in HTML
• Roles, states, and properties
• Live regions
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 id=”animalTabs” role=”tablist” tabindex=”0”>
 <!-- Individual Tabs shouldn’t be focusable -->
 <!-- We’ll focus them with JavaScript instead -->
 <li role=”tab”><a href=”#” tabindex=”-1”>Cats</a></li>
 <li role=”tab”><a href=”#” tabindex=”-1”>Dogs</a></li>
 <li role=”tab”><a href=”#” tabindex=”-1”>Gators</a></li>
</ol>
<div id=”panels”>
 <div role=”tabpanel” aria-labelledby=”cats”>Cats meow.</div>
 <div role=”tabpanel” aria-labelledby=”dogs”>Dogs bark.</div>
 <div role=”tabpanel” aria-labelledby=”gators”>Gators bite.</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 Accessibility
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 a11y: 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
Infusion Goes Deeper

• jQuery Keyboard Navigation Plugin
• ARIA everywhere
• Everything is highly adaptable and flexible
• UI Options and the Fluid Skinning System:
 • Users can customize their environment
UI Options
• One size doesn’t fit all
• Allows users to customize your app:
 • layout
 • styling
 • navigation
• Uses FSS by default; can be configured to
  work with your own classes
UI Options & FSS
UI Options & FSS
CSS Frameworks
“If you’re going to use a framework, it
should be yours; one that you’ve created.
You can look at existing frameworks for
ideas and hack at it. But the professionals
in this room are not well served by picking
up 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
Open Architecture
Markup Agnosticism
• HTML is so fundamental to Web UIs
• Others lock away markup in a black box
• Markup should be totally free to edit, adapt,
  or replace
• Libraries shouldn’t bake in assumptions
  about your markup
• Unobtrusiveness everywhere
Handling Markup: Dojo
<div class="dijitDialog" tabindex="-1" waiRole="dialog" waiState="labelledby-
${id}_title">

    <div dojoAttachPoint="titleBar" class="dijitDialogTitleBar">

    <span dojoAttachPoint="titleNode" class="dijitDialogTitle" id="$
{id}_title"></span>

    <span dojoAttachPoint="closeButtonNode" class="dijitDialogCloseIcon"
dojoAttachEvent="onclick: onCancel, onmouseenter: _onCloseEnter,
onmouseleave: _onCloseLeave" title="${buttonCancel}">

    
    <span dojoAttachPoint="closeText" class="closeText" title="$
{buttonCancel}">x</span>

    </span>

    </div>

    
    <div dojoAttachPoint="containerNode"
class="dijitDialogPaneContent"></div>
</div>
Handling Markup: jQuery UI
Handling Markup: Infusion
fluid.defaults("fluid.fileQueueView", {
  selectors: {
   fileRows: ".flc-uploader-file",
   fileName: ".flc-uploader-file-name",
   fileSize: ".flc-uploader-file-size",
   fileIconBtn: ".flc-uploader-file-action",
   errorText: ".flc-uploader-file-error"
},
Components
“Components suck. Apps built with components look like it”

      • Infusion components aren’t black boxes
      • Fundamentally adaptable:
       • Change the markup
       • Restyle with CSS
       • Add/replace actual behaviour
      • Everything is super-loosely coupled
Component Families: Reorderer




lists                   images             layouts



        Infusion components come in families
More Components




Uploader           Inline Edit




           Pager
Model, View... but not Controller


 • MVC is a given in most framework
 • JavaScript’s functional idioms offer
   alternatives (hint: events)
 • Infusion has no controller layer at all
 • ... and none of the classical inheritance cruft
   that usually goes with it
Traditional MVC

                 Model


                          n
                      atio
                 oti c
State Query                               State Change
               ge N
                  n
              Cha




                       View Selection


   View                                 Controller
                      User Gestures
The Problem with Controllers

• Controllers are the least defined
• What’s “glue?”
• Always referred to as the non-reusable part
• MVC has been warped over the decades
• The framework should take care of the glue
Infusion Models & Views
                                                   Model
• Controller is replaced by events               Change Noti cation




• Reads to the model are transparent
• State changes and notification are
  just events                             State Query         State Change



• Transparent architecture: you can use             View
  the same events we use
                                              Framework
Plain Old Models

• M is the most important thing in your app
• Data needs to travel seamlessly between
  client and server
• Most toolkits force a model to extend
  some base class or particular structure

  In Infusion, models are just plain old JSON
Playing Nice With Others
Portals, Mashups, and CMS’s


• These days, diverse code and markup coexists
• Most JavaScript is written as if it owns the
  whole browser
• As you combine stuff, things can break
• Namespacing and privacy is essential
Writing Collision-Free JavaScript

• Put code in a unique namespace
• Use closures for privacy
• Support more than one on the page
 •   Scope all variables to an instance

 •   Avoid hard-baking ID selectors

• Constrain selectors within a specific element
Keeping it to Ourselves

• Infusion takes namespacing seriously
• We won’t steal your names
• Components are carefully scoped
• We won’t accidently grab the wrong stuff
• Infusion doesn’t expect control of the page
Tying it All Together

• Infusion helps you with accessibility
• Components you can really work with
• Simple structure so your code can grow
• Totally transparent, event-driven design
• Markup and models are under your control
• No inheritance or controller cruft
Where We’re Going
Infusion Next Steps

• Infusion 1.2 coming in October:
 • New lightweight Inversion of Control
 • Data Grid and reworked Pager components
 • Lots of bug fixes
 • New demos portal with example code
 • Screencasts
Fluid Engage

• Open source collaboration with museums
• Visitor engagement: learn and contribute
• Use phones visitors bring into the museum
• Mobile apps and in-gallery kiosks
• All built with open source Web technology
Our Mobile Approach


• No hard intrusions on your content
• Don’t subvert good Web idioms
• Your choice: native-like or webbish
Infusion Mobile


• mFSS: themes for iPhone, Android, more
• ScreenNavigator: unobtrusive mobile navigation
• Components designed for the mobile Web
Kettle: Server-side JS
• Built on top of the JSGI server spec
• Don’t need lots of new APIs on server
• Envjs provides a full browser
• Infusion as application framework
• Choose where markup gets rendered
• Natural, familiardesigners for Web
  developers and
                    environment
Wrapping Up
• Tools for everyone:
 • ARIA
 • Dojo
 • jQuery
 • Infusion
• Give Infusion a try and let us know
• We’re a friendly community!
Wrapping Up



Please fill out an evaluation.
Questions?
http://fluidproject.org

Mais conteúdo relacionado

Mais procurados

Web Accessibility Gone Wild (Now Even MORE Wilder!)
Web Accessibility Gone Wild (Now Even MORE Wilder!)Web Accessibility Gone Wild (Now Even MORE Wilder!)
Web Accessibility Gone Wild (Now Even MORE Wilder!)Jared Smith
 
aria_with_kissy
aria_with_kissyaria_with_kissy
aria_with_kissyyiming he
 
Accessibility of HTML5 and Rich Internet Applications - CSUN 2012
Accessibility of HTML5 and Rich Internet Applications - CSUN 2012Accessibility of HTML5 and Rich Internet Applications - CSUN 2012
Accessibility of HTML5 and Rich Internet Applications - CSUN 2012Steven Faulkner
 
Accessibility - A feature you can build
Accessibility - A feature you can buildAccessibility - A feature you can build
Accessibility - A feature you can buildMonika Piotrowicz
 
5 Common Mistakes You are Making on your Website
 5 Common Mistakes You are Making on your Website 5 Common Mistakes You are Making on your Website
5 Common Mistakes You are Making on your WebsiteAcquia
 
How Accessibility Made Me a Better Developer
How Accessibility Made Me a Better DeveloperHow Accessibility Made Me a Better Developer
How Accessibility Made Me a Better DeveloperBilly Gregory
 

Mais procurados (8)

ARIA Gone Wild
ARIA Gone WildARIA Gone Wild
ARIA Gone Wild
 
Web Accessibility Gone Wild (Now Even MORE Wilder!)
Web Accessibility Gone Wild (Now Even MORE Wilder!)Web Accessibility Gone Wild (Now Even MORE Wilder!)
Web Accessibility Gone Wild (Now Even MORE Wilder!)
 
aria_with_kissy
aria_with_kissyaria_with_kissy
aria_with_kissy
 
Accessibility of HTML5 and Rich Internet Applications - CSUN 2012
Accessibility of HTML5 and Rich Internet Applications - CSUN 2012Accessibility of HTML5 and Rich Internet Applications - CSUN 2012
Accessibility of HTML5 and Rich Internet Applications - CSUN 2012
 
Accessibility - A feature you can build
Accessibility - A feature you can buildAccessibility - A feature you can build
Accessibility - A feature you can build
 
5 Common Mistakes You are Making on your Website
 5 Common Mistakes You are Making on your Website 5 Common Mistakes You are Making on your Website
5 Common Mistakes You are Making on your Website
 
How Accessibility Made Me a Better Developer
How Accessibility Made Me a Better DeveloperHow Accessibility Made Me a Better Developer
How Accessibility Made Me a Better Developer
 
Html5 public
Html5 publicHtml5 public
Html5 public
 

Destaque

The Inclusive Web: hands-on with HTML5 and jQuery
The Inclusive Web: hands-on with HTML5 and jQueryThe Inclusive Web: hands-on with HTML5 and jQuery
The Inclusive Web: hands-on with HTML5 and jQuerycolinbdclark
 
Iit_teaching_aids
Iit_teaching_aidsIit_teaching_aids
Iit_teaching_aidss1047178
 
Flocking at the SuperCollider Symposium 2013
Flocking at the SuperCollider Symposium 2013Flocking at the SuperCollider Symposium 2013
Flocking at the SuperCollider Symposium 2013colinbdclark
 
Benweir Book August2012 Lowres
Benweir Book August2012 LowresBenweir Book August2012 Lowres
Benweir Book August2012 Lowresben_weir_74
 
Thoughts on Open Accessibility
Thoughts on Open AccessibilityThoughts on Open Accessibility
Thoughts on Open Accessibilitycolinbdclark
 
Palm Beach Learn Green Conference 10.15.10
Palm Beach Learn Green Conference 10.15.10Palm Beach Learn Green Conference 10.15.10
Palm Beach Learn Green Conference 10.15.10valerie11
 
Dwilsonlis557
Dwilsonlis557Dwilsonlis557
Dwilsonlis557nobleire
 
Mobile Development with uPortal and Infusion
Mobile Development with uPortal and InfusionMobile Development with uPortal and Infusion
Mobile Development with uPortal and Infusioncolinbdclark
 

Destaque (9)

The Inclusive Web: hands-on with HTML5 and jQuery
The Inclusive Web: hands-on with HTML5 and jQueryThe Inclusive Web: hands-on with HTML5 and jQuery
The Inclusive Web: hands-on with HTML5 and jQuery
 
Iit_teaching_aids
Iit_teaching_aidsIit_teaching_aids
Iit_teaching_aids
 
Flocking at the SuperCollider Symposium 2013
Flocking at the SuperCollider Symposium 2013Flocking at the SuperCollider Symposium 2013
Flocking at the SuperCollider Symposium 2013
 
Benweir Book August2012 Lowres
Benweir Book August2012 LowresBenweir Book August2012 Lowres
Benweir Book August2012 Lowres
 
Thoughts on Open Accessibility
Thoughts on Open AccessibilityThoughts on Open Accessibility
Thoughts on Open Accessibility
 
Palm Beach Learn Green Conference 10.15.10
Palm Beach Learn Green Conference 10.15.10Palm Beach Learn Green Conference 10.15.10
Palm Beach Learn Green Conference 10.15.10
 
Dwilsonlis557
Dwilsonlis557Dwilsonlis557
Dwilsonlis557
 
Mobile Development with uPortal and Infusion
Mobile Development with uPortal and InfusionMobile Development with uPortal and Infusion
Mobile Development with uPortal and Infusion
 
unifi ap datasheet
unifi ap datasheetunifi ap datasheet
unifi ap datasheet
 

Semelhante a Accessible UIs with jQuery and Infusion

Making your jQuery Plugins More Accessible
Making your jQuery Plugins More AccessibleMaking your jQuery Plugins More Accessible
Making your jQuery Plugins More Accessiblecolinbdclark
 
Angular mobile angular_u
Angular mobile angular_uAngular mobile angular_u
Angular mobile angular_uDoris Chen
 
Staying Sane with Drupal (A Develper's Survival Guide)
Staying Sane with Drupal (A Develper's Survival Guide)Staying Sane with Drupal (A Develper's Survival Guide)
Staying Sane with Drupal (A Develper's Survival Guide)Oscar Merida
 
Atlassian User Group NYC 20170830 PreSummit Event Slides
Atlassian User Group NYC 20170830 PreSummit Event SlidesAtlassian User Group NYC 20170830 PreSummit Event Slides
Atlassian User Group NYC 20170830 PreSummit Event SlidesMarlon Palha
 
Customizing ERModernLook Applications
Customizing ERModernLook ApplicationsCustomizing ERModernLook Applications
Customizing ERModernLook ApplicationsWO Community
 
Add-On Development: EE Expects that Every Developer will do his Duty
Add-On Development: EE Expects that Every Developer will do his DutyAdd-On Development: EE Expects that Every Developer will do his Duty
Add-On Development: EE Expects that Every Developer will do his Dutyreedmaniac
 
Add-On Development: EE Expects that Every Developer will do his Duty
Add-On Development: EE Expects that Every Developer will do his DutyAdd-On Development: EE Expects that Every Developer will do his Duty
Add-On Development: EE Expects that Every Developer will do his DutyLeslie Doherty
 
Leveraging the Chaos tool suite for module development
Leveraging the Chaos tool suite  for module developmentLeveraging the Chaos tool suite  for module development
Leveraging the Chaos tool suite for module developmentzroger
 
Developing an Accessible Web
Developing an Accessible WebDeveloping an Accessible Web
Developing an Accessible Webgreenideas
 
TulsaTechFest - Maximize SharePoint UX with free jQuery libraries
TulsaTechFest - Maximize SharePoint UX with free jQuery librariesTulsaTechFest - Maximize SharePoint UX with free jQuery libraries
TulsaTechFest - Maximize SharePoint UX with free jQuery librariesMark Rackley
 
Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...
Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...
Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...Anupam Ranku
 
Awesome html with ujs, jQuery and coffeescript
Awesome html with ujs, jQuery and coffeescriptAwesome html with ujs, jQuery and coffeescript
Awesome html with ujs, jQuery and coffeescriptAmir Barylko
 
jQuery: The World's Most Popular JavaScript Library Comes to XPages
jQuery: The World's Most Popular JavaScript Library Comes to XPagesjQuery: The World's Most Popular JavaScript Library Comes to XPages
jQuery: The World's Most Popular JavaScript Library Comes to XPagesTeamstudio
 
Staying Sane with Drupal NEPHP
Staying Sane with Drupal NEPHPStaying Sane with Drupal NEPHP
Staying Sane with Drupal NEPHPOscar Merida
 
User Interface Development with jQuery
User Interface Development with jQueryUser Interface Development with jQuery
User Interface Development with jQuerycolinbdclark
 
Browser Developer Tools for APEX Developers
Browser Developer Tools for APEX DevelopersBrowser Developer Tools for APEX Developers
Browser Developer Tools for APEX DevelopersChristian Rokitta
 

Semelhante a Accessible UIs with jQuery and Infusion (20)

Making your jQuery Plugins More Accessible
Making your jQuery Plugins More AccessibleMaking your jQuery Plugins More Accessible
Making your jQuery Plugins More Accessible
 
Angular mobile angular_u
Angular mobile angular_uAngular mobile angular_u
Angular mobile angular_u
 
Staying Sane with Drupal (A Develper's Survival Guide)
Staying Sane with Drupal (A Develper's Survival Guide)Staying Sane with Drupal (A Develper's Survival Guide)
Staying Sane with Drupal (A Develper's Survival Guide)
 
Atlassian User Group NYC 20170830 PreSummit Event Slides
Atlassian User Group NYC 20170830 PreSummit Event SlidesAtlassian User Group NYC 20170830 PreSummit Event Slides
Atlassian User Group NYC 20170830 PreSummit Event Slides
 
Customizing ERModernLook Applications
Customizing ERModernLook ApplicationsCustomizing ERModernLook Applications
Customizing ERModernLook Applications
 
Add-On Development: EE Expects that Every Developer will do his Duty
Add-On Development: EE Expects that Every Developer will do his DutyAdd-On Development: EE Expects that Every Developer will do his Duty
Add-On Development: EE Expects that Every Developer will do his Duty
 
presentation
presentationpresentation
presentation
 
presentation
presentationpresentation
presentation
 
Add-On Development: EE Expects that Every Developer will do his Duty
Add-On Development: EE Expects that Every Developer will do his DutyAdd-On Development: EE Expects that Every Developer will do his Duty
Add-On Development: EE Expects that Every Developer will do his Duty
 
Leveraging the Chaos tool suite for module development
Leveraging the Chaos tool suite  for module developmentLeveraging the Chaos tool suite  for module development
Leveraging the Chaos tool suite for module development
 
The Developers World
The Developers WorldThe Developers World
The Developers World
 
Developing an Accessible Web
Developing an Accessible WebDeveloping an Accessible Web
Developing an Accessible Web
 
TulsaTechFest - Maximize SharePoint UX with free jQuery libraries
TulsaTechFest - Maximize SharePoint UX with free jQuery librariesTulsaTechFest - Maximize SharePoint UX with free jQuery libraries
TulsaTechFest - Maximize SharePoint UX with free jQuery libraries
 
Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...
Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...
Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...
 
Awesome html with ujs, jQuery and coffeescript
Awesome html with ujs, jQuery and coffeescriptAwesome html with ujs, jQuery and coffeescript
Awesome html with ujs, jQuery and coffeescript
 
jQuery: The World's Most Popular JavaScript Library Comes to XPages
jQuery: The World's Most Popular JavaScript Library Comes to XPagesjQuery: The World's Most Popular JavaScript Library Comes to XPages
jQuery: The World's Most Popular JavaScript Library Comes to XPages
 
Staying Sane with Drupal NEPHP
Staying Sane with Drupal NEPHPStaying Sane with Drupal NEPHP
Staying Sane with Drupal NEPHP
 
User Interface Development with jQuery
User Interface Development with jQueryUser Interface Development with jQuery
User Interface Development with jQuery
 
Jquery fundamentals
Jquery fundamentalsJquery fundamentals
Jquery fundamentals
 
Browser Developer Tools for APEX Developers
Browser Developer Tools for APEX DevelopersBrowser Developer Tools for APEX Developers
Browser Developer Tools for APEX Developers
 

Último

[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 

Último (20)

[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 

Accessible UIs with jQuery and Infusion

  • 1. Building Accessible User Interfaces with jQuery and Fluid Infusion Colin Clark, Fluid Project Technical Lead, Adaptive Technology Resource Centre
  • 2. Topics We’ll Cover • The Fluid community • Introducing Infusion • Developing accessible JavaScript • Infusion’s Architecture • Techniques for portals, mashups, CMS’s • Where we’re headed
  • 3. Fluid... http://fluidproject.org • Is an open source community of • Designers • Developers • Accessibility experts • Helps other open communities • Consists of universities, museums and individuals
  • 4. What We Do • Offer design advice and resources • Contribute to other communities: • jQuery UI • Dojo • W3C Accessibility • Build Infusion, our JavaScript application framework
  • 6. World, Meet Infusion • Application framework built on top of jQuery • The culmination of our work helping others • Designed for usability and accessibility • Open architecture: everything is configurable
  • 7. What’s in Infusion? • A development framework for building apps • UI components you can reuse and adapt • Lightweight CSS framework for styling • Accessibility tools and plugins for jQuery
  • 8. Building Great UIs Is Hard • 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
  • 9. Flexible User Interfaces Infusion is an application framework designed to provide unprecedented flexibility while preserving interoperability.
  • 10. Types of JavaScript Tools • Foundational Toolkits • Application Frameworks ... compare and contrast
  • 11. Foundational toolkits • Totally presentation focused • DOM manipulation • Event binding jQuery • Ajax Prototype Dojo core
  • 12. Application frameworks • Model notifications “something changed here” • Views to help keep your presentational code clean • Data binding to sync the display with your model SproutCore Dojo/Dijit/ Dojox Cappuccino
  • 13. Infusion is Different • Accessibility baked right in • Carefully designed interactions • Markup is in your control • Not the same old MVC • Supports portals, mashups and CMS’s
  • 16. A New Definition • Accessibility is the ability of the system to accommodate the needs of the user • Disability is the mismatch between the user and the interface provided • We all experience disability • Accessible software = better software
  • 17. Assistive Technologies • Present and control the user interface in different ways • Not just screen readers! • Use built-in operating system APIs to understand the user interface Screen readers Screen magnifiers On-screen keyboards
  • 18. DHTML: A New Can of Worms • Shift from documents to applications • Familiar a11y techniques aren’t enough • Most DHTML is completely inaccessible • New techniques are still being figured out
  • 19. The Problem • Custom widgets often look, but don’t act, like their counterparts on the desktop • HTML provides only simple semantics • Not enough information for ATs • Dynamic updates require new design strategies to be accessible
  • 20. The Solution • Describe user interfaces with ARIA • Add consistent keyboard controls • Provide flexible styling and presentation
  • 22. Opaque Markup // These are tabs. How would you know? <ol> <li><a href=”#cats”>Cats</a></li> <li><a href=”#dogs”>Dogs</a></li> <li><a href=”#gators”>Gators</a></li> </ol> <div> <div id=”cats”>Cats meow.</div> <div id=”dogs”>Dogs bark.</div> <div id=”gators”>Gators bite.</div> </div>
  • 24. ARIA • Accessible Rich Internet Applications • W3C specification in the works • Fills the semantic gaps in HTML • Roles, states, and properties • Live regions
  • 25. 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
  • 26. Using ARIA // Now *these* are Tabs! <ol id=”animalTabs” role=”tablist” tabindex=”0”> <!-- Individual Tabs shouldn’t be focusable --> <!-- We’ll focus them with JavaScript instead --> <li role=”tab”><a href=”#” tabindex=”-1”>Cats</a></li> <li role=”tab”><a href=”#” tabindex=”-1”>Dogs</a></li> <li role=”tab”><a href=”#” tabindex=”-1”>Gators</a></li> </ol> <div id=”panels”> <div role=”tabpanel” aria-labelledby=”cats”>Cats meow.</div> <div role=”tabpanel” aria-labelledby=”dogs”>Dogs bark.</div> <div role=”tabpanel” aria-labelledby=”gators”>Gators bite.</div> </div>
  • 27. 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); });
  • 29. 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
  • 30. 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.
  • 32. 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>
  • 33. 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");
  • 34. 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); } });
  • 35. 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()? });
  • 36. Documentation • Tutorial: http://wiki.fluidproject.org/display/fluid/Keyboard+Accessibility +Tutorial • API Reference: http://wiki.fluidproject.org/display/fluid/Keyboard+Accessibility +Plugin+API
  • 37. Infusion Goes Deeper • jQuery Keyboard Navigation Plugin • ARIA everywhere • Everything is highly adaptable and flexible • UI Options and the Fluid Skinning System: • Users can customize their environment
  • 38. UI Options • One size doesn’t fit all • Allows users to customize your app: • layout • styling • navigation • Uses FSS by default; can be configured to work with your own classes
  • 41. CSS Frameworks “If you’re going to use a framework, it should be yours; one that you’ve created. You can look at existing frameworks for ideas and hack at it. But the professionals in this room are not well served by picking up a framework and using it as-is.” - Eric Meyer
  • 42. 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
  • 44. Markup Agnosticism • HTML is so fundamental to Web UIs • Others lock away markup in a black box • Markup should be totally free to edit, adapt, or replace • Libraries shouldn’t bake in assumptions about your markup • Unobtrusiveness everywhere
  • 45. Handling Markup: Dojo <div class="dijitDialog" tabindex="-1" waiRole="dialog" waiState="labelledby- ${id}_title"> <div dojoAttachPoint="titleBar" class="dijitDialogTitleBar"> <span dojoAttachPoint="titleNode" class="dijitDialogTitle" id="$ {id}_title"></span> <span dojoAttachPoint="closeButtonNode" class="dijitDialogCloseIcon" dojoAttachEvent="onclick: onCancel, onmouseenter: _onCloseEnter, onmouseleave: _onCloseLeave" title="${buttonCancel}"> <span dojoAttachPoint="closeText" class="closeText" title="$ {buttonCancel}">x</span> </span> </div> <div dojoAttachPoint="containerNode" class="dijitDialogPaneContent"></div> </div>
  • 47. Handling Markup: Infusion fluid.defaults("fluid.fileQueueView", { selectors: { fileRows: ".flc-uploader-file", fileName: ".flc-uploader-file-name", fileSize: ".flc-uploader-file-size", fileIconBtn: ".flc-uploader-file-action", errorText: ".flc-uploader-file-error" },
  • 48. Components “Components suck. Apps built with components look like it” • Infusion components aren’t black boxes • Fundamentally adaptable: • Change the markup • Restyle with CSS • Add/replace actual behaviour • Everything is super-loosely coupled
  • 49. Component Families: Reorderer lists images layouts Infusion components come in families
  • 50. More Components Uploader Inline Edit Pager
  • 51. Model, View... but not Controller • MVC is a given in most framework • JavaScript’s functional idioms offer alternatives (hint: events) • Infusion has no controller layer at all • ... and none of the classical inheritance cruft that usually goes with it
  • 52. Traditional MVC Model n atio oti c State Query State Change ge N n Cha View Selection View Controller User Gestures
  • 53. The Problem with Controllers • Controllers are the least defined • What’s “glue?” • Always referred to as the non-reusable part • MVC has been warped over the decades • The framework should take care of the glue
  • 54. Infusion Models & Views Model • Controller is replaced by events Change Noti cation • Reads to the model are transparent • State changes and notification are just events State Query State Change • Transparent architecture: you can use View the same events we use Framework
  • 55. Plain Old Models • M is the most important thing in your app • Data needs to travel seamlessly between client and server • Most toolkits force a model to extend some base class or particular structure In Infusion, models are just plain old JSON
  • 57. Portals, Mashups, and CMS’s • These days, diverse code and markup coexists • Most JavaScript is written as if it owns the whole browser • As you combine stuff, things can break • Namespacing and privacy is essential
  • 58. Writing Collision-Free JavaScript • Put code in a unique namespace • Use closures for privacy • Support more than one on the page • Scope all variables to an instance • Avoid hard-baking ID selectors • Constrain selectors within a specific element
  • 59. Keeping it to Ourselves • Infusion takes namespacing seriously • We won’t steal your names • Components are carefully scoped • We won’t accidently grab the wrong stuff • Infusion doesn’t expect control of the page
  • 60. Tying it All Together • Infusion helps you with accessibility • Components you can really work with • Simple structure so your code can grow • Totally transparent, event-driven design • Markup and models are under your control • No inheritance or controller cruft
  • 62. Infusion Next Steps • Infusion 1.2 coming in October: • New lightweight Inversion of Control • Data Grid and reworked Pager components • Lots of bug fixes • New demos portal with example code • Screencasts
  • 63. Fluid Engage • Open source collaboration with museums • Visitor engagement: learn and contribute • Use phones visitors bring into the museum • Mobile apps and in-gallery kiosks • All built with open source Web technology
  • 64. Our Mobile Approach • No hard intrusions on your content • Don’t subvert good Web idioms • Your choice: native-like or webbish
  • 65. Infusion Mobile • mFSS: themes for iPhone, Android, more • ScreenNavigator: unobtrusive mobile navigation • Components designed for the mobile Web
  • 66. Kettle: Server-side JS • Built on top of the JSGI server spec • Don’t need lots of new APIs on server • Envjs provides a full browser • Infusion as application framework • Choose where markup gets rendered • Natural, familiardesigners for Web developers and environment
  • 67. Wrapping Up • Tools for everyone: • ARIA • Dojo • jQuery • Infusion • Give Infusion a try and let us know • We’re a friendly community!
  • 68. Wrapping Up Please fill out an evaluation.