SlideShare une entreprise Scribd logo
1  sur  36
Making Your jQuery More Accessible



Colin Clark, Fluid Project Technical Lead,
Adaptive Technology Resource Centre
Topics We’ll Cover
• A quick introduction
• What is accessibility?
• Challenges of DHTML accessibility
• Quick ARIA refresher
• Implementing keyboard navigation
• An update on jQuery UI accessibility
• Meet Infusion
Who am I?

• I’m the technical lead for the Fluid
   community
• IResource the Adaptive Technology
    work at
            Centre
             http://fluidproject.org/


• I love JavaScript and jQuery
What’s the Fluid Project?

• We’re an open source community of:
 • Interaction designers
 • Front-end developers
 • Accessibility people
• We help other communities
• We love the Open Web
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
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
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
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
Where’s the Code?



http://bit.ly/
13ckp
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.
that.tabContainer.attr("role", "tablist");

// Give each tab the "tab" role.
that.tabs.attr("role", "tab");

// Give each panel the appropriate role,          that.panels.attr("role",
"tabpanel");
that.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
Tabbing and Tabindex
• Each focusable item can be reached in
    sequence by pressing the Tab key
• Shift-Tab moves backwards
• The tabindex attribute allows you to
    customize the tab order
•   tabindex=”-1” removes element from the
    tab order: useful for custom handlers
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.
that.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.
that.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
Accessibility Resources
http://codetalks.org

http://wiki.fluidproject.org/display/fluid/DHTML+Developer+Checklist

http://wiki.fluidproject.org/display/fluid/UX+Accessibility+Walkthrough
+Protocols

http://developer.mozilla.org/en/docs/Accessible_DHTML

http://developer.mozilla.org/en/docs/Key-
navigable_custom_DHTML_widgets

http://developer.mozilla.org/en/docs/AJAX:WAI_ARIA_Live_Regions
jQuery UI Accesssibility
• A truly community-driven effort
• A step-by-step approach
• Features include:
 • Several accessible widgets, more to come
 • Comprehensive ARIA in ui.core.js
 • Tabindex in jquery.js and ui.core.js
jQuery UI Accessibility

• Accordion
• Dialog
• Progress Bar
• Slider (fresh patch landed on Friday!)
jQuery UI Accessibility

• You can help!
• We’ll help get you started
     jquery-a11y@googlegroups.com
Accessibility in Infusion

• 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 & FSS
UI Options & FSS
Wrapping up...

• Join me at the Ajax Experience
 • Monday at 10 am
 •   Building Accessible UIs with jQuery & Infusion



• Questions?

Contenu connexe

Similaire à Making your jQuery Plugins More Accessible

Accessible UIs with jQuery and Infusion
Accessible UIs with jQuery and InfusionAccessible UIs with jQuery and Infusion
Accessible UIs with jQuery and Infusioncolinbdclark
 
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
 
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
 
WAI-ARIA An introduction to Accessible Rich Internet Applications / JavaScrip...
WAI-ARIA An introduction to Accessible Rich Internet Applications / JavaScrip...WAI-ARIA An introduction to Accessible Rich Internet Applications / JavaScrip...
WAI-ARIA An introduction to Accessible Rich Internet Applications / JavaScrip...Patrick Lauke
 
WAI-ARIA An introduction to Accessible Rich Internet Applications / CSS Minsk...
WAI-ARIA An introduction to Accessible Rich Internet Applications / CSS Minsk...WAI-ARIA An introduction to Accessible Rich Internet Applications / CSS Minsk...
WAI-ARIA An introduction to Accessible Rich Internet Applications / CSS Minsk...Patrick Lauke
 
Accessibility - A feature you can build
Accessibility - A feature you can buildAccessibility - A feature you can build
Accessibility - A feature you can buildMonika Piotrowicz
 
Developing an Accessible Web
Developing an Accessible WebDeveloping an Accessible Web
Developing an Accessible Webgreenideas
 
WAI-ARIA - an introduction to accessible rich internet applications (1 day wo...
WAI-ARIA - an introduction to accessible rich internet applications (1 day wo...WAI-ARIA - an introduction to accessible rich internet applications (1 day wo...
WAI-ARIA - an introduction to accessible rich internet applications (1 day wo...Patrick Lauke
 
The Recipe for Making Accessible Widgets!
The Recipe for Making Accessible Widgets!The Recipe for Making Accessible Widgets!
The Recipe for Making Accessible Widgets!Rabab Gomaa
 
aria_with_kissy
aria_with_kissyaria_with_kissy
aria_with_kissyyiming he
 
Web accessibility workshop 4
Web accessibility workshop 4Web accessibility workshop 4
Web accessibility workshop 4Vladimir Tomberg
 
Selfish Accessibility — Harbour Front HK
Selfish Accessibility — Harbour Front HKSelfish Accessibility — Harbour Front HK
Selfish Accessibility — Harbour Front HKAdrian Roselli
 
Google web toolkit web conference presenation
Google web toolkit web conference presenationGoogle web toolkit web conference presenation
Google web toolkit web conference presenationStephen Erdman
 
Selfish Accessibility — CodeDaze
Selfish Accessibility — CodeDazeSelfish Accessibility — CodeDaze
Selfish Accessibility — CodeDazeAdrian Roselli
 
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
 
a11yTO - Web Accessibility for Developers
a11yTO - Web Accessibility for Developersa11yTO - Web Accessibility for Developers
a11yTO - Web Accessibility for DevelopersMonika Piotrowicz
 
fuser interface-development-using-jquery
fuser interface-development-using-jqueryfuser interface-development-using-jquery
fuser interface-development-using-jqueryKostas Mavridis
 
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
 

Similaire à Making your jQuery Plugins More Accessible (20)

Accessible UIs with jQuery and Infusion
Accessible UIs with jQuery and InfusionAccessible UIs with jQuery and Infusion
Accessible UIs with jQuery and Infusion
 
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
 
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
 
WAI-ARIA An introduction to Accessible Rich Internet Applications / JavaScrip...
WAI-ARIA An introduction to Accessible Rich Internet Applications / JavaScrip...WAI-ARIA An introduction to Accessible Rich Internet Applications / JavaScrip...
WAI-ARIA An introduction to Accessible Rich Internet Applications / JavaScrip...
 
WAI-ARIA An introduction to Accessible Rich Internet Applications / CSS Minsk...
WAI-ARIA An introduction to Accessible Rich Internet Applications / CSS Minsk...WAI-ARIA An introduction to Accessible Rich Internet Applications / CSS Minsk...
WAI-ARIA An introduction to Accessible Rich Internet Applications / CSS Minsk...
 
Accessibility - A feature you can build
Accessibility - A feature you can buildAccessibility - A feature you can build
Accessibility - A feature you can build
 
Developing an Accessible Web
Developing an Accessible WebDeveloping an Accessible Web
Developing an Accessible Web
 
WAI-ARIA - an introduction to accessible rich internet applications (1 day wo...
WAI-ARIA - an introduction to accessible rich internet applications (1 day wo...WAI-ARIA - an introduction to accessible rich internet applications (1 day wo...
WAI-ARIA - an introduction to accessible rich internet applications (1 day wo...
 
The Recipe for Making Accessible Widgets!
The Recipe for Making Accessible Widgets!The Recipe for Making Accessible Widgets!
The Recipe for Making Accessible Widgets!
 
aria_with_kissy
aria_with_kissyaria_with_kissy
aria_with_kissy
 
Web accessibility workshop 4
Web accessibility workshop 4Web accessibility workshop 4
Web accessibility workshop 4
 
Selfish Accessibility — Harbour Front HK
Selfish Accessibility — Harbour Front HKSelfish Accessibility — Harbour Front HK
Selfish Accessibility — Harbour Front HK
 
Google web toolkit web conference presenation
Google web toolkit web conference presenationGoogle web toolkit web conference presenation
Google web toolkit web conference presenation
 
Twig
TwigTwig
Twig
 
Selfish Accessibility — CodeDaze
Selfish Accessibility — CodeDazeSelfish Accessibility — CodeDaze
Selfish Accessibility — CodeDaze
 
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
 
Are you accessible
Are you accessibleAre you accessible
Are you accessible
 
a11yTO - Web Accessibility for Developers
a11yTO - Web Accessibility for Developersa11yTO - Web Accessibility for Developers
a11yTO - Web Accessibility for Developers
 
fuser interface-development-using-jquery
fuser interface-development-using-jqueryfuser interface-development-using-jquery
fuser interface-development-using-jquery
 
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
 

Plus de colinbdclark

Flocking at the SuperCollider Symposium 2013
Flocking at the SuperCollider Symposium 2013Flocking at the SuperCollider Symposium 2013
Flocking at the SuperCollider Symposium 2013colinbdclark
 
Open Inclusive Design
Open Inclusive DesignOpen Inclusive Design
Open Inclusive Designcolinbdclark
 
Nothing Hard Baked: Designing the Inclusive Web
Nothing Hard Baked: Designing the Inclusive WebNothing Hard Baked: Designing the Inclusive Web
Nothing Hard Baked: Designing the Inclusive Webcolinbdclark
 
Mobile Development with uPortal and Infusion
Mobile Development with uPortal and InfusionMobile Development with uPortal and Infusion
Mobile Development with uPortal and Infusioncolinbdclark
 
Web Accessibility and Design
Web Accessibility and DesignWeb Accessibility and Design
Web Accessibility and Designcolinbdclark
 
User Interface Development with jQuery
User Interface Development with jQueryUser Interface Development with jQuery
User Interface Development with jQuerycolinbdclark
 
Architectures for Inclusive Design
Architectures for Inclusive DesignArchitectures for Inclusive Design
Architectures for Inclusive Designcolinbdclark
 
Infusion for the birds
Infusion for the birdsInfusion for the birds
Infusion for the birdscolinbdclark
 
Thoughts on Open Accessibility
Thoughts on Open AccessibilityThoughts on Open Accessibility
Thoughts on Open Accessibilitycolinbdclark
 

Plus de colinbdclark (9)

Flocking at the SuperCollider Symposium 2013
Flocking at the SuperCollider Symposium 2013Flocking at the SuperCollider Symposium 2013
Flocking at the SuperCollider Symposium 2013
 
Open Inclusive Design
Open Inclusive DesignOpen Inclusive Design
Open Inclusive Design
 
Nothing Hard Baked: Designing the Inclusive Web
Nothing Hard Baked: Designing the Inclusive WebNothing Hard Baked: Designing the Inclusive Web
Nothing Hard Baked: Designing the Inclusive Web
 
Mobile Development with uPortal and Infusion
Mobile Development with uPortal and InfusionMobile Development with uPortal and Infusion
Mobile Development with uPortal and Infusion
 
Web Accessibility and Design
Web Accessibility and DesignWeb Accessibility and Design
Web Accessibility and Design
 
User Interface Development with jQuery
User Interface Development with jQueryUser Interface Development with jQuery
User Interface Development with jQuery
 
Architectures for Inclusive Design
Architectures for Inclusive DesignArchitectures for Inclusive Design
Architectures for Inclusive Design
 
Infusion for the birds
Infusion for the birdsInfusion for the birds
Infusion for the birds
 
Thoughts on Open Accessibility
Thoughts on Open AccessibilityThoughts on Open Accessibility
Thoughts on Open Accessibility
 

Dernier

Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
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
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
[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
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
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
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
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
 
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
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
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
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
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
 

Dernier (20)

Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
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
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
[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
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
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
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
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...
 
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
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
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
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
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...
 

Making your jQuery Plugins More Accessible

  • 1. Making Your jQuery More Accessible Colin Clark, Fluid Project Technical Lead, Adaptive Technology Resource Centre
  • 2. Topics We’ll Cover • A quick introduction • What is accessibility? • Challenges of DHTML accessibility • Quick ARIA refresher • Implementing keyboard navigation • An update on jQuery UI accessibility • Meet Infusion
  • 3. Who am I? • I’m the technical lead for the Fluid community • IResource the Adaptive Technology work at Centre http://fluidproject.org/ • I love JavaScript and jQuery
  • 4. What’s the Fluid Project? • We’re an open source community of: • Interaction designers • Front-end developers • Accessibility people • We help other communities • We love the Open Web
  • 6. 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
  • 7. 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
  • 8. 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
  • 9. 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
  • 10. The Solution • Describe user interfaces with ARIA • Add consistent keyboard controls • Provide flexible styling and presentation
  • 13. 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>
  • 15. ARIA • Accessible Rich Internet Applications • W3C specification in the works • Fills the semantic gaps in HTML • Roles, states, and properties • Live regions
  • 16. 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
  • 17. 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>
  • 18. Adding ARIA in Code // Identify the container as a list of tabs. that.tabContainer.attr("role", "tablist"); // Give each tab the "tab" role. that.tabs.attr("role", "tab"); // Give each panel the appropriate role, that.panels.attr("role", "tabpanel"); that.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); });
  • 20. 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
  • 21. 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.
  • 23. Tabbing and Tabindex • Each focusable item can be reached in sequence by pressing the Tab key • Shift-Tab moves backwards • The tabindex attribute allows you to customize the tab order • tabindex=”-1” removes element from the tab order: useful for custom handlers
  • 24. 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>
  • 25. 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");
  • 26. Adding the Arrow Keys // Make each tab accessible with the left and right arrow keys. that.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); } });
  • 27. Making Them Activatable // Make each tab activatable with Spacebar and Enter. that.tabs.fluid("activatable", function (evt) { // Your handler code here. Maybe the same as .click()? });
  • 28. Documentation • Tutorial: http://wiki.fluidproject.org/display/fluid/Keyboard+Accessibility +Tutorial • API Reference: http://wiki.fluidproject.org/display/fluid/Keyboard+Accessibility +Plugin+API
  • 30. jQuery UI Accesssibility • A truly community-driven effort • A step-by-step approach • Features include: • Several accessible widgets, more to come • Comprehensive ARIA in ui.core.js • Tabindex in jquery.js and ui.core.js
  • 31. jQuery UI Accessibility • Accordion • Dialog • Progress Bar • Slider (fresh patch landed on Friday!)
  • 32. jQuery UI Accessibility • You can help! • We’ll help get you started jquery-a11y@googlegroups.com
  • 33. Accessibility in Infusion • jQuery Keyboard Navigation Plugin • ARIA everywhere • Everything is highly adaptable and flexible • UI Options and the Fluid Skinning System: • Users can customize their environment
  • 36. Wrapping up... • Join me at the Ajax Experience • Monday at 10 am • Building Accessible UIs with jQuery & Infusion • Questions?