SlideShare a Scribd company logo
HTML5'S ARIA AND A WEB-
ACCESSIBLE DROPDOWN WIDGET
by Dennis E. Lembrée
HTML5 Developer Conference
Palace Hotel, San Francisco
October 15-16, 2012
Confidential and Proprietary 2
AGENDA
• About @DennisL
• About accessibility
• ARIA & HTML5
• Simple example
• Complex example
• Tips
• Questions
• Contact info
HTML5's ARIA and a Web-Accessible Dropdown Widget
Confidential and Proprietary 4
ABOUT ACCESSIBILITY
Support a variety of users and a variety of environments
• Visual, audio, motor, cognitive disability
• Situational disability
• Main language of website is non-native for user
• Broken equipment (mouse or speakers don’t work)
• Temporary disability (hand in cast, forgot glasses)
• Environment (sunlight on screen; in library with no headphones)
• Low-band connection (may have images off)
• Large fingers (need large hit area)
HTML5's ARIA and a Web-Accessible Dropdown Widget
HTML5's ARIA and a Web-Accessible Dropdown Widget
Confidential and Proprietary 7
ABOUT ACCESSIBILITY
Methods for implementation include multiple disciplines:
• Code
• Interaction design
• Visual design
• Content, writing
• Testing
• During development
• QA testing (manual and automated)
• User testing (including users with disabilities)
HTML5's ARIA and a Web-Accessible Dropdown Widget
HTML5's ARIA and a Web-Accessible Dropdown Widget
Confidential and Proprietary 10
ARIA & HTML5
• W3C WAI-ARIA
• Accessible Rich Internet Applications (WAI-ARIA) 1.0
• W3C Candidate Recommendation, January 2011
• “attributes that define user interface elements to improve the
accessibility and interoperability of web content and applications”
• Basically, ARIA helps users of screen readers and other AT with
modern web technologies.
• Types of attributes:
• Roles
• States and Properties
Confidential and Proprietary 11
ARIA & HTML5
Roles
• Widget roles: button, dialogue, menu, radio, tab
• Document structure: list, presentation, row, separator
• Landmark roles
States and Properties
• Widget attributes: aria-checked, aria-expanded, aria-haspopup,
aria-label, aria-readonly, aria-required
• Live regions: aria-atomic, aria-busy, aria-live
• Relationship attributes: aria-controls, aria-describedby,
aria-labelledby, aria-owns
HTML5's ARIA and a Web-Accessible Dropdown Widget
Confidential and Proprietary 13
SIMPLE EXAMPLE
Landmark Roles
• banner (page header)
• navigation (nav)
• main (div, for now, or possibly section)
• complementary (aside)
• search (div, form)
• contentinfo (page footer)
• form, application (use with caution)
HTML5's ARIA and a Web-Accessible Dropdown Widget
Confidential and Proprietary 15
COMPLEX EXAMPLE
Goals
• Make dropdown button
• Use progressive enhancement (PE)
• Follow keyboard conventions
• Accessible; specifically, with keyboard and screen reader
Steps
• HTML
• CSS
• JavaScript
• ARIA
Demo URL: http://bit.ly/Xbmiwt
Confidential and Proprietary 16
COMPLEX EXAMPLE – HTML
<div>
<a>Share Options</a>
<div>
<div>
<ul>
<li><a href="http://www.facebook.com">Facebook</a></li>
<li><a href="http://www.twitter.com">Twitter</a></li>
<li><a href="http://www.linkedin.com">LinkedIn</a></li>
<li><a href="mailto:dlembree@paypal.com">Email</a></li>
</ul>
</div>
</div>
</div>
Confidential and Proprietary 17
COMPLEX EXAMPLE – HTML
<div class="dropdownMenu">
<a href="#ddMenuList1" id="ddMenu1" class="menuButton">Share Options</a>
<div aria-labelledby="ddMenu1">
<div id="ddMenuList1">
<ul>
<li><a href="http://www.facebook.com">Facebook</a></li>
<li><a href="http://www.twitter.com">Twitter</a></li>
<li><a href="http://www.linkedin.com">LinkedIn</a></li>
<li><a href="mailto:dlembree@paypal.com">Email</a></li>
</ul>
</div>
</div>
</div>
Confidential and Proprietary 18
COMPLEX EXAMPLE – CSS (PARTIAL)
.js .dropdownMenu {
position: relative;
display: inline-block;
}
.js .dropdownMenu a.menuButton {
overflow: hidden;
display: inline-block;
width: 15px;
height: 15px;
margin-left: 4px;
z-index: 5;
top: 2px;
text-indent:-999px;
-moz-border-radius:3px;
-webkit-border-radius:3px;
border-radius:3px;
}
...
Confidential and Proprietary 19
COMPLEX EXAMPLE – JAVASCRIPT
(PARTIAL)
(function() {
"use strict";
$.widget("widget.dropdownMenu", {
options: {
showOn: "click"
},
_create: function() {
this._getElements();
this._updateElements();
this._addListeners();
},
_getElements: function() {
this.elements = {};
// the menu container (div role=menu)
this.elements.container = this.element.find("div:first");
},
_addListeners: function() {
...
HTML5's ARIA and a Web-Accessible Dropdown Widget
HTML5's ARIA and a Web-Accessible Dropdown Widget
Confidential and Proprietary 22
COMPLEX EXAMPLE – DEMO
screen reader demo
HTML5's ARIA and a Web-Accessible Dropdown Widget
HTML5's ARIA and a Web-Accessible Dropdown Widget
Confidential and Proprietary 25
QUESTIONS
Confidential and Proprietary 26
CONTACT INFO
• Email: dlembree@paypal.com
• Web: DennisLembree.com
• Twitter Accounts
• @DennisL
• @WebAxe
• @EasyChirp
• @PayPalInclusive
• Demo URL: http://bit.ly/Xbmiwt

More Related Content

PPT
How To Build An Accessible Web Application - a11yBos
PDF
Strategic Approach to IT Accessibility
PDF
Open Web Camp 2014: On Fireproof, Future-Proof, Failure-Proof Things.
PPT
Making JavaScript Accessible
PPTX
Getting Things Done for Technical Communicators at TCUK14
PPTX
Accessible Video in The Enterprise
PPTX
Anatomy of an accessible carousel: everyone's responsible!
PDF
[Access U 2010] HTML5 & Accessibility
How To Build An Accessible Web Application - a11yBos
Strategic Approach to IT Accessibility
Open Web Camp 2014: On Fireproof, Future-Proof, Failure-Proof Things.
Making JavaScript Accessible
Getting Things Done for Technical Communicators at TCUK14
Accessible Video in The Enterprise
Anatomy of an accessible carousel: everyone's responsible!
[Access U 2010] HTML5 & Accessibility

Viewers also liked (20)

PDF
Getting Things Done for Technical Communicators
PPTX
Usability meets accessibility
PPTX
HTML5 Accessibility - Is it ready yet?
PPT
How To Build An Accessible Web Application
PDF
Designing with Empathy [Reasons to be Creative 2013]
PDF
Responsible Design: Accountable Accessibility
PDF
Teach your Browser new tricks
ODP
AccessU 2011 Keynote
PDF
Create Accessible Infographics
PPTX
A Web for Everyone: Accessibility as a design challenge
PPTX
Introduction To Web Accessibility
ZIP
The 5 Layers of Web Accessibility
PPTX
Accessibility in Responsive web design
PPTX
Gaining Support through Empathy & Awareness Exercises #CSUN15
PPTX
Introduction to WAI-ARIA
PPTX
Introduction to Accessibility Testing - CSUN14
PPTX
uKinect: the Signed Internet - Gesture Control
PPTX
Accessibility as Innovation - giving your potential users the chance to inspi...
PPTX
Policy Driven Adoption of Accessibility - CSUN 2013
PPTX
Stop Trying to Avoid Losing and Start Winning: How BS 8878 reframes the Acces...
Getting Things Done for Technical Communicators
Usability meets accessibility
HTML5 Accessibility - Is it ready yet?
How To Build An Accessible Web Application
Designing with Empathy [Reasons to be Creative 2013]
Responsible Design: Accountable Accessibility
Teach your Browser new tricks
AccessU 2011 Keynote
Create Accessible Infographics
A Web for Everyone: Accessibility as a design challenge
Introduction To Web Accessibility
The 5 Layers of Web Accessibility
Accessibility in Responsive web design
Gaining Support through Empathy & Awareness Exercises #CSUN15
Introduction to WAI-ARIA
Introduction to Accessibility Testing - CSUN14
uKinect: the Signed Internet - Gesture Control
Accessibility as Innovation - giving your potential users the chance to inspi...
Policy Driven Adoption of Accessibility - CSUN 2013
Stop Trying to Avoid Losing and Start Winning: How BS 8878 reframes the Acces...
Ad

Similar to HTML5's ARIA and a Web-Accessible Dropdown Widget (20)

PPTX
CSUN The ARIA Technology Stack Browsers and Screen Readers
PPT
Intro to drupal
PDF
Modern web development and accessibility (Christina Papadimitriou, Nadia Mark...
KEY
Build Accessibly - Community Day 2012
PPT
Designing for Everybody Workshop
PDF
Drupal In 1 Hour
PPTX
Building SharePoint Single Page Applications Using AngularJS
PPTX
AccessU 2018 - Surviving Dev Frameworks: Lessons Learned with WordPress, Drup...
PPTX
Chandu.pptxhuuuuuuyyygfddssdfyuijhgghujjhhhhg
PDF
Atlassian User Group NYC 20170830 PreSummit Event Slides
PDF
One drupal to rule them all - Drupalcamp Caceres
PDF
Web accessibility 101: Intersectional Inclusion in the Digital World
PPTX
Developer Experience Overview
PDF
Developing an Accessible Web
PPTX
Accessibility Testing 101
PPTX
Accessibility (WCAG) Draft 1
PPT
Wordpress & accessibility
PPTX
Sustaining ArchivesSpace
PDF
Introduction to mobile accessibility, 2015
PDF
ARIA Techniques for Accessible Web Forms
CSUN The ARIA Technology Stack Browsers and Screen Readers
Intro to drupal
Modern web development and accessibility (Christina Papadimitriou, Nadia Mark...
Build Accessibly - Community Day 2012
Designing for Everybody Workshop
Drupal In 1 Hour
Building SharePoint Single Page Applications Using AngularJS
AccessU 2018 - Surviving Dev Frameworks: Lessons Learned with WordPress, Drup...
Chandu.pptxhuuuuuuyyygfddssdfyuijhgghujjhhhhg
Atlassian User Group NYC 20170830 PreSummit Event Slides
One drupal to rule them all - Drupalcamp Caceres
Web accessibility 101: Intersectional Inclusion in the Digital World
Developer Experience Overview
Developing an Accessible Web
Accessibility Testing 101
Accessibility (WCAG) Draft 1
Wordpress & accessibility
Sustaining ArchivesSpace
Introduction to mobile accessibility, 2015
ARIA Techniques for Accessible Web Forms
Ad

More from Dennis Lembree (11)

PPTX
SVG Icons and Screen Reader Accessibility
PPT
Networking with Twitter, Part 2
PPT
Networking with Twitter, Part 1
PPT
Twitter and Web Accessibility (EASI Webinar)
PPT
Accessible Twitter Update at CSUN11 Tweetup
PPT
"Twitter and Web Accessibility" INDATA Conference 2010
PPT
Accessible Twitter CSUN Tweetup 2010
PPT
EASI Webinar: Twitter And Web Accessibility
PPT
Twitter and Web Accessibility AHG 2009 Nov12
PPT
Accessible Twitter at Open Web Camp
PPT
Accessible Twitter : ACCESS-IT@Web 2.0
SVG Icons and Screen Reader Accessibility
Networking with Twitter, Part 2
Networking with Twitter, Part 1
Twitter and Web Accessibility (EASI Webinar)
Accessible Twitter Update at CSUN11 Tweetup
"Twitter and Web Accessibility" INDATA Conference 2010
Accessible Twitter CSUN Tweetup 2010
EASI Webinar: Twitter And Web Accessibility
Twitter and Web Accessibility AHG 2009 Nov12
Accessible Twitter at Open Web Camp
Accessible Twitter : ACCESS-IT@Web 2.0

Recently uploaded (20)

PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
A Presentation on Artificial Intelligence
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
Spectroscopy.pptx food analysis technology
PDF
Encapsulation theory and applications.pdf
PDF
Approach and Philosophy of On baking technology
PPTX
Cloud computing and distributed systems.
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
Big Data Technologies - Introduction.pptx
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Unlocking AI with Model Context Protocol (MCP)
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
A Presentation on Artificial Intelligence
Advanced methodologies resolving dimensionality complications for autism neur...
Digital-Transformation-Roadmap-for-Companies.pptx
Spectroscopy.pptx food analysis technology
Encapsulation theory and applications.pdf
Approach and Philosophy of On baking technology
Cloud computing and distributed systems.
Assigned Numbers - 2025 - Bluetooth® Document
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Big Data Technologies - Introduction.pptx
Building Integrated photovoltaic BIPV_UPV.pdf
Agricultural_Statistics_at_a_Glance_2022_0.pdf
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Diabetes mellitus diagnosis method based random forest with bat algorithm
Chapter 3 Spatial Domain Image Processing.pdf
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Network Security Unit 5.pdf for BCA BBA.
Unlocking AI with Model Context Protocol (MCP)

HTML5's ARIA and a Web-Accessible Dropdown Widget

  • 1. HTML5'S ARIA AND A WEB- ACCESSIBLE DROPDOWN WIDGET by Dennis E. Lembrée HTML5 Developer Conference Palace Hotel, San Francisco October 15-16, 2012
  • 2. Confidential and Proprietary 2 AGENDA • About @DennisL • About accessibility • ARIA & HTML5 • Simple example • Complex example • Tips • Questions • Contact info
  • 4. Confidential and Proprietary 4 ABOUT ACCESSIBILITY Support a variety of users and a variety of environments • Visual, audio, motor, cognitive disability • Situational disability • Main language of website is non-native for user • Broken equipment (mouse or speakers don’t work) • Temporary disability (hand in cast, forgot glasses) • Environment (sunlight on screen; in library with no headphones) • Low-band connection (may have images off) • Large fingers (need large hit area)
  • 7. Confidential and Proprietary 7 ABOUT ACCESSIBILITY Methods for implementation include multiple disciplines: • Code • Interaction design • Visual design • Content, writing • Testing • During development • QA testing (manual and automated) • User testing (including users with disabilities)
  • 10. Confidential and Proprietary 10 ARIA & HTML5 • W3C WAI-ARIA • Accessible Rich Internet Applications (WAI-ARIA) 1.0 • W3C Candidate Recommendation, January 2011 • “attributes that define user interface elements to improve the accessibility and interoperability of web content and applications” • Basically, ARIA helps users of screen readers and other AT with modern web technologies. • Types of attributes: • Roles • States and Properties
  • 11. Confidential and Proprietary 11 ARIA & HTML5 Roles • Widget roles: button, dialogue, menu, radio, tab • Document structure: list, presentation, row, separator • Landmark roles States and Properties • Widget attributes: aria-checked, aria-expanded, aria-haspopup, aria-label, aria-readonly, aria-required • Live regions: aria-atomic, aria-busy, aria-live • Relationship attributes: aria-controls, aria-describedby, aria-labelledby, aria-owns
  • 13. Confidential and Proprietary 13 SIMPLE EXAMPLE Landmark Roles • banner (page header) • navigation (nav) • main (div, for now, or possibly section) • complementary (aside) • search (div, form) • contentinfo (page footer) • form, application (use with caution)
  • 15. Confidential and Proprietary 15 COMPLEX EXAMPLE Goals • Make dropdown button • Use progressive enhancement (PE) • Follow keyboard conventions • Accessible; specifically, with keyboard and screen reader Steps • HTML • CSS • JavaScript • ARIA Demo URL: http://bit.ly/Xbmiwt
  • 16. Confidential and Proprietary 16 COMPLEX EXAMPLE – HTML <div> <a>Share Options</a> <div> <div> <ul> <li><a href="http://www.facebook.com">Facebook</a></li> <li><a href="http://www.twitter.com">Twitter</a></li> <li><a href="http://www.linkedin.com">LinkedIn</a></li> <li><a href="mailto:dlembree@paypal.com">Email</a></li> </ul> </div> </div> </div>
  • 17. Confidential and Proprietary 17 COMPLEX EXAMPLE – HTML <div class="dropdownMenu"> <a href="#ddMenuList1" id="ddMenu1" class="menuButton">Share Options</a> <div aria-labelledby="ddMenu1"> <div id="ddMenuList1"> <ul> <li><a href="http://www.facebook.com">Facebook</a></li> <li><a href="http://www.twitter.com">Twitter</a></li> <li><a href="http://www.linkedin.com">LinkedIn</a></li> <li><a href="mailto:dlembree@paypal.com">Email</a></li> </ul> </div> </div> </div>
  • 18. Confidential and Proprietary 18 COMPLEX EXAMPLE – CSS (PARTIAL) .js .dropdownMenu { position: relative; display: inline-block; } .js .dropdownMenu a.menuButton { overflow: hidden; display: inline-block; width: 15px; height: 15px; margin-left: 4px; z-index: 5; top: 2px; text-indent:-999px; -moz-border-radius:3px; -webkit-border-radius:3px; border-radius:3px; } ...
  • 19. Confidential and Proprietary 19 COMPLEX EXAMPLE – JAVASCRIPT (PARTIAL) (function() { "use strict"; $.widget("widget.dropdownMenu", { options: { showOn: "click" }, _create: function() { this._getElements(); this._updateElements(); this._addListeners(); }, _getElements: function() { this.elements = {}; // the menu container (div role=menu) this.elements.container = this.element.find("div:first"); }, _addListeners: function() { ...
  • 22. Confidential and Proprietary 22 COMPLEX EXAMPLE – DEMO screen reader demo
  • 26. Confidential and Proprietary 26 CONTACT INFO • Email: dlembree@paypal.com • Web: DennisLembree.com • Twitter Accounts • @DennisL • @WebAxe • @EasyChirp • @PayPalInclusive • Demo URL: http://bit.ly/Xbmiwt

Editor's Notes

  • #2: http://html5devconf.com/
  • #4: http://www.dennislembree.com
  • #9: http://www.html5accessibility.com/https://docs.google.com/presentation/d/1VCOM0TDZ3IxtDAc3GzR4Z58MhKIA9nAk4fA8f-7D058/present
  • #10: http://www.w3.org/TR/html5/wai-aria.html#wai-ariahttp://dev.w3.org/html5/spec/wai-aria.html
  • #11: http://www.w3.org/TR/wai-aria/
  • #12: http://www.w3.org/TR/wai-aria/
  • #13: Menu element is not supported yet in browsers not AT.Required supported inconsistently in AT.Landmark roles have good support.
  • #15: http://www.flickr.com/photos/odmag/8034463748/
  • #16: http://weboverhauls.com/sandbox/HTML5_DevConf_ARIA_Example/
  • #24: http://www.paciellogroup.com/blog/2012/06/html5-accessibility-chops-using-aria-notes/