SlideShare a Scribd company logo
1 of 76
A Journey to Accessible
Rich UI Components
with Jason Jang
“Journey” sounds inappropriately epic and kind of cornered me into a theme, for this, my first talk.
What to Expect
▹My story
▹Important Considerations for our
organization
▹Code Examples of making a Rich UI
Component accessible
Sometimes the hardest part of learning a
language, is learning the language around
the language.
Disclaimer
Whoa, deep.
Some Terminology
▹a11y > accessibility
▹component > a part of an interface
▹Rich UI > interactive components
Whoa, deep.
My Story
Whoa, deep.
In the beginning...
▹“Making websites” was a hobby
▹… that became a side gig
▹… that became a part-time gig
▹… that became a full-time gig at an agency
▹… that became a stint as a freelancer
▹… that became a full-time gig at Achievers
There. There’s your journey.
First Encounter with a11y
▹Everyone uses the Internet
▹People use screen readers? Never got use one.
▹A11y considered a checkmark
▹All text and images
First Encounter with a11y
Semantic HTML and good markup
▹ Headings, Lists, Links
▹ <b> <i> vs <strong> <em>
Landmark Roles:
▹<div role=”banner”>
▹<div role=”form”>
▹<div role=”main”>
▹<div role=”navigation”>
▹<div role=”search”>
a11y Tools
▹WAVE Accessibility Tool
▹aChecker
▹Quail (JS Accessibility Tool)
▹Google Accessibility Tool
Fast-forward 5 or so years
I lost count
Platform Demo
Jason, can we make this accessible?
ARIA SAVES THE DAY!
WHY ARIA?
...and not Arya?
WAI-ARIA!
Web Accessibility Initiative – Accessible Rich Internet Applications
Henceforth referred to as accessibility API or ARIA
listitem
log
main
marquee
math
menu
menubar
menuitem
menuitemcheckbox
menuitemradio
navigation
note
option
presentation
dialog
directory
document
form
grid
table
gridcell
group
heading
img
input (abstract role)
landmark
linklist
listbox
alert
alertdialog
application
article
banner
button
checkbox
columnheader
combobox
command
complementary
composite
contentinfo
definition
progressbar
radio
radiogroup
range (abstract role)
region
roletype (abstract role)
row
rowgroup
rowheader
scrollbar
search
section (abstract role)
LOOK AT ALL THESE ROLES!
alert
alertdialog
application
article
banner
button
checkbox
columnheader
combobox
command
complementary
composite
contentinfo
definition
dialog
directory
document
form
grid
table
gridcell
group
heading
img
input (abstract role)
landmark
listitem
log
main
marquee
math
menu
menubar
menuitem
menuitemcheckbox
menuitemradio
navigation
note
option
presentation
dialog
directory
document
form
grid
table
gridcell
group
heading
img
input (abstract role)
landmark
linklist
listbox
progressbar
radio
radiogroup
range (abstract role)
region
roletype (abstract role)
row
rowgroup
rowheader
scrollbar
search
section (abstract role)
LOOK AT ALL THESE ROLES!
a11y: You’ve Changed
This is not the Aria you were looking for, and that’s a reference to something else entirely.
a11y: You’ve Changed
▹ Support for Rich Interfaces
▹new roles <div role=”button”>
▹presentation changes <div role=”button” aria-pressed=”true”>
▹asynchronous content <div role=”button” aria-pressed=”true”>
▹ a11y evaluation tools still useful elsewhere
We’re all equipped and ready to go!
Right?
WaitBefore we could dig into it...
Important Considerations
For your Organization
There were several
Important Considerations
1. Define Users
a. Assistive Technologies
2. Take Stock of Codebase and UI
3. Determine rollout plan
4. How will you influence a Paradigm Shift?
1. Define Users
1. Define Users
▹Vision-impaired
▹Dexterity-impaired
▹Hearing impaired
1a. Assistive Technologies
Learn about the Tools
▹JAWS, NVDA, VoiceOver
▹Windows Eyes, ZoomText
▹Specialized Input Devices
2. Take Stock of Your
Codebase and UI
2. Take Stock of Codebase and UI
▹How is your markup?
▹Identify and address Anti-Patterns
▹Breakdown features into components so
you can tackle them individually (Agile)
3. Take Stock of Codebase
and UI
3. Determine Rollout Plan
▹ Prioritize core features
▹ Break down into components
▹ Tackle global elements
▹ Don’t omit features or content
4. Influence a Paradigm Shift
▹a11y is NOT a checkmark
▹Affects everyone in the development lifecycle
4. Influence a Paradigm Shift
Education
▹Devs and Testers need software training
▹Designers need to understand a11y needs for both
users and developers
▹Project Managers need to know how to break the
work down
4. Influence a Paradigm Shift
4. Influence a Paradigm Shift
Process Improvement
▹Design mocks need to be vetted for a11y at design
stage before development begins
▹Pattern/Component Library even more valuable
4. Influence a Paradigm Shift
Testing
▹a11y testing can be expensive
▹Some automation possible
▹Manual testing required
▹Testing with real users is the only real test
Okay, with all things considered...
Accessible Rich UI Components
The Code Demo
a11y Rich UI Components...
1. ...use WAI-ARIA for communicating:
▹Roles
▹Presentation changes like state and visibility
▹Asynchronous content changes
2. …are fully keyboard accessible
Time for a quick
SCREEN READER DEMO
and now for some
CODE EXAMPLES
Code Examples
1. Form Basics
2. Live Regions
3. Slider Example
4. Tabs and Tab Panels
Code Example 1: Form Basics (1 of 3)
Code Example 1: Form Basics (2 of 3)
<label>Your email</label>
<input type="email" />
<label>Reason for contacting</label>
<select>
<option value="Option 1">Questions</option>
<option value="Option 2">Admiration</option>
<option value="Option 3">Can I get your number?</option>
</select>
<label>Message</label>
<textarea></textarea>
Code Example 1: Form Basics (3 of 3)
<label for="email">Your email</label>
<input id="email" type="email" />
<label for="reason">Reason for contacting</label>
<select id="reason">
<option value="Option 1">Questions</option>
<option value="Option 2">Admiration</option>
<option value="Option 3">Can I get your number?</option>
</select>
<label for="message">Message</label>
<textarea id="message"></textarea>
Code Example 2: Live Region (1 of 3)
<!-- FORM-->
<label for="message">Message</label>
<textarea id="message"></textarea>
<input class="button-primary" type="submit" value="Submit">
<!-- THROBBER TO INDICATE AJAX CALL -->
<img src="img/ajax-loader.gif" js-throbber class="hidden">
<!-- FEEDBACK FOR AJAX CALL -->
<div class="alert error hidden" js-ajax-alert="error" ><a href="#message">There
was an error with your message</a></div>
<!-- LIVE REGION -->
<div role="alert" aria-live="assertive" aria-relevant="additions"
class="a11yHiddenText" js-globalLiveRegion></div>
Code Example 2: Live Region (2 of 3)
<script>
function formSubmit() {
$("form").submit(function() {
showThrobber();
$.ajax( "formSubmit.php" )
.done(function() {
hideThrobber();
alert( "success" );
})
.fail(function() {
hideThrobber();
alert( "error" );
});
});
}
</script>
Code Example 2: Live Region (2 of 3)
Code Example 2: Live Region (3 of 3)
<script>
function formSubmit() {
$("form").submit(function() {
showThrobber();
$.ajax( "formSubmit.php" )
.done(function() {
hideThrobber();
updateLiveRegion("Form submitted successfully");
})
.fail(function() {
hideThrobber();
updateLiveRegion("Form submit unsuccessful");
});
});
}
function updateLiveRegion(text) {
$("[js-globalLiveRegion]").html(text);
}
</script>
Code Example 2: Live Region (3 of 3)
<script>
function formSubmit() {
$("form").submit(function() {
submitPending(true);
$.ajax( "formSubmit.php" )
.done(function() {
submitPending(false);
updateLiveRegion("Form submitted successfully");
})
.fail(function() {
submitPending(false);
updateLiveRegion("Form submit unsuccessful");
});
});
}
function updateLiveRegion(text) {
$("[js-globalLiveRegion]").html(text);
}
function submitPending(true) {
showThrobber(true);
disableSubmit(true);
}
function disableSubmit(state) {
$("#submit")
.attr("aria-disabled", state)
.attr("disabled", "disabled")
.addClass('.disabled');
}
</script>
<div js-slider>
<span class="ui-slider-handle" tabindex="0"></span>
</div>
Code Example 3: Slider
<div js-slider>
<span class="ui-slider-handle" tabindex="0"
role="slider" aria-valuemin="0" aria-valuemax="500" aria-valuenow="0" aria-
valuetext="0"></span>
</div>
$slider.slider({
value: 0,
min: 0,
max: 500,
step: 50,
slide: function(event, ui) {
$display.html(ui.value);
var $handle = $slider.find(".ui-slider-handle");
$handle
.attr("aria-valuemin", 0)
.attr("aria-valuemax", 500)
.attr("aria-valuenow", 0)
.attr("aria-valuetext", 0);
}
});
Code Example 4: Tabs
Code Example 4: Tabs
<div id="tabs-container" js-tabContainer class="clearfix">
<ul class="tabs-menu">
<li class="current"><a href="#tab-1" js-tab>Tab 1</a></li>
<li><a href="#tab-2" js-tab>Tab 2</a></li>
<li><a href="#tab-3" js-tab>Tab 3</a></li>
<li><a href="#tab-4" js-tab>Tab 4</a></li>
</ul>
<div class="tab">
<div id="tab-1" class="tab-content">
<p>...</p>
</div>
<div id="tab-2" class="tab-content">
<p>...</p>
</div>
<div id="tab-3" class="tab-content">
<p>...</p>
</div>
<div id="tab-4" class="tab-content">
<p>...</p>
</div>
</div>
</div>
Code Example 4: Tabs
<div id="tabs-container" js-tabContainer class="clearfix">
<ul class="tabs-menu" role="tablist">
<li role="tab" aria-selected="true" class="current"><a href="#tab-1" js-tab>Tab 1</a></li>
<li role="tab" aria-selected="false"><a href="#tab-2" js-tab>Tab 2</a></li>
<li role="tab" aria-selected="false"><a href="#tab-3" js-tab>Tab 3</a></li>
<li role="tab" aria-selected="false"><a href="#tab-4" js-tab>Tab 4</a></li>
</ul>
<div class="tab">
<div id="tab-1" class="tab-content" role="tabpanel" aria-hidden="false">
<p>...</p>
</div>
<div id="tab-2" class="tab-content" role="tabpanel" aria-hidden="true">
<p>...</p>
</div>
<div id="tab-3" class="tab-content" role="tabpanel" aria-hidden="true">
<p>...</p>
</div>
<div id="tab-4" class="tab-content" role="tabpanel" aria-hidden="true">
<p>...</p>
</div>
</div>
</div>
Code Example 4: Tabs
function initTabsKeyboardA11y($tabsContainer) {
$("[js-tabContainer]").keydown(function(e) {
e.preventDefault();
var $currentTab = $(this).find("[role=tab].current [js-tab]");
var keyPressed = getKeyName(e.keyCode);
if (keyPressed === "right") {
var $next = $currentTab.parent().next().find("[js-tab]")
if ($next) {
$next.trigger("click").focus();
}
} else if (keyPressed === "left") {
var $prev = $currentTab.parent().prev().find("[js-tab]")
if ($prev) {
$prev.trigger("click").focus();
}
}
});
}
Knowledge Nugget!
If you can’t find an ARIA ROLE that
addresses your design pattern, there’s a
good chance you have an ANTI-PATTERN
(or they just call it by a different name :)
Time for another quick
SCREEN READER DEMO
This time on an accessible page
Keyboard Accessibility
Keyboard Accessibility
▹ Screen Readers Provide shortcuts to traverse page
▹ TAB is also commonly used
▹ Certain ROLEs expect the use of arrow keys
▹ You can often refer to OS or other online examples
for keyboard flow
Keyboard Accessibility
● Get to know tabindex
● Both ENTER and SPACEBAR should trigger
a click
● In Forms, SPACEBAR activates, ENTER
submits the form
Biggest Hurdles
▹Learning to use screen readers (ongoing!)
▹Deciding where to start
▹Testing
Added Benefits from A11y
Improved UI
▹Forces you to scrutinize UI decisions
▹Opportunity to fix design decisions
Food for Thought
▹ Decouple your a11y JS from regular JS
▹ Create helpers for JS and SCSS
▹ Here’s a clever way to enforce a11y
Before we finish...
Let’s Remember
Influence a Paradigm Shift
▹A11y affects everyone
▹Consider users, testers, designers, developers….
Let’s Also Remember
Rich Components...
▹Leverage WAI-ARIA to comm. with screen readers
▹Provide Keyboard a11y
Special Thanks
Chris Gurney (PM) &
Avinder Walia (Dev)

More Related Content

What's hot

2012.sandiego.wordcamp
2012.sandiego.wordcamp2012.sandiego.wordcamp
2012.sandiego.wordcamp
Brandon Dove
 

What's hot (8)

2012.sandiego.wordcamp
2012.sandiego.wordcamp2012.sandiego.wordcamp
2012.sandiego.wordcamp
 
The new features of PHP 7
The new features of PHP 7The new features of PHP 7
The new features of PHP 7
 
Dependency Injection, Zend Framework and Symfony Container
Dependency Injection, Zend Framework and Symfony ContainerDependency Injection, Zend Framework and Symfony Container
Dependency Injection, Zend Framework and Symfony Container
 
Create Your Own Framework by Fabien Potencier
Create Your Own Framework by Fabien PotencierCreate Your Own Framework by Fabien Potencier
Create Your Own Framework by Fabien Potencier
 
Kicking off with Zend Expressive and Doctrine ORM (ConFoo YVR 2017)
Kicking off with Zend Expressive and Doctrine ORM (ConFoo YVR 2017)Kicking off with Zend Expressive and Doctrine ORM (ConFoo YVR 2017)
Kicking off with Zend Expressive and Doctrine ORM (ConFoo YVR 2017)
 
Developing in android
Developing in androidDeveloping in android
Developing in android
 
Escape from the automation hell
Escape from the automation hellEscape from the automation hell
Escape from the automation hell
 
Javascript coding-and-design-patterns
Javascript coding-and-design-patternsJavascript coding-and-design-patterns
Javascript coding-and-design-patterns
 

Viewers also liked

Are we with-it? - Lucia Schoombee
Are we with-it? - Lucia SchoombeeAre we with-it? - Lucia Schoombee
Are we with-it? - Lucia Schoombee
HELIGLIASA
 
윈도 Xp 종료, 오픈소스 소프트웨어에 기회가 될 것인가
윈도 Xp 종료, 오픈소스 소프트웨어에 기회가 될 것인가윈도 Xp 종료, 오픈소스 소프트웨어에 기회가 될 것인가
윈도 Xp 종료, 오픈소스 소프트웨어에 기회가 될 것인가
atelier t*h
 
Semantic web-and-public-data
Semantic web-and-public-dataSemantic web-and-public-data
Semantic web-and-public-data
Tenforce
 
Radioactivity (1)
Radioactivity (1)Radioactivity (1)
Radioactivity (1)
palzz
 

Viewers also liked (15)

Optimizing MySQL Queries
Optimizing MySQL QueriesOptimizing MySQL Queries
Optimizing MySQL Queries
 
Social Media Strategies for Powerful Communications
Social Media Strategies for Powerful CommunicationsSocial Media Strategies for Powerful Communications
Social Media Strategies for Powerful Communications
 
15 Things to Give Up to be Happy
15 Things to Give Up to be Happy 15 Things to Give Up to be Happy
15 Things to Give Up to be Happy
 
Are we with-it? - Lucia Schoombee
Are we with-it? - Lucia SchoombeeAre we with-it? - Lucia Schoombee
Are we with-it? - Lucia Schoombee
 
윈도 Xp 종료, 오픈소스 소프트웨어에 기회가 될 것인가
윈도 Xp 종료, 오픈소스 소프트웨어에 기회가 될 것인가윈도 Xp 종료, 오픈소스 소프트웨어에 기회가 될 것인가
윈도 Xp 종료, 오픈소스 소프트웨어에 기회가 될 것인가
 
Semantic web-and-public-data
Semantic web-and-public-dataSemantic web-and-public-data
Semantic web-and-public-data
 
NCC achieves transparency via IBX Spend Analytics enabling a complete procure...
NCC achieves transparency via IBX Spend Analytics enabling a complete procure...NCC achieves transparency via IBX Spend Analytics enabling a complete procure...
NCC achieves transparency via IBX Spend Analytics enabling a complete procure...
 
Personalising Customer Experience in the Hospitality Industry June 2016
Personalising Customer Experience in the Hospitality Industry June 2016Personalising Customer Experience in the Hospitality Industry June 2016
Personalising Customer Experience in the Hospitality Industry June 2016
 
Trabalho 1
Trabalho 1Trabalho 1
Trabalho 1
 
和菓子復興大作戦〜萌えキャラで和菓子ブームを〜
和菓子復興大作戦〜萌えキャラで和菓子ブームを〜和菓子復興大作戦〜萌えキャラで和菓子ブームを〜
和菓子復興大作戦〜萌えキャラで和菓子ブームを〜
 
14 de Dezembro 2009
14 de Dezembro 200914 de Dezembro 2009
14 de Dezembro 2009
 
Cancer in dogs
Cancer in dogsCancer in dogs
Cancer in dogs
 
Radioactivity (1)
Radioactivity (1)Radioactivity (1)
Radioactivity (1)
 
Semantic web-and-public-data - en
Semantic web-and-public-data - enSemantic web-and-public-data - en
Semantic web-and-public-data - en
 
Skolkovo
SkolkovoSkolkovo
Skolkovo
 

Similar to Accessibility: A Journey to Accessible Rich Components

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
Steven Faulkner
 
Alexandre.iline rit 2010 java_fxui_extra
Alexandre.iline rit 2010 java_fxui_extraAlexandre.iline rit 2010 java_fxui_extra
Alexandre.iline rit 2010 java_fxui_extra
rit2010
 
jQuery Mobile
jQuery MobilejQuery Mobile
jQuery Mobile
mowd8574
 
Android | Busy Java Developers Guide to Android: UI | Ted Neward
Android | Busy Java Developers Guide to Android: UI | Ted NewardAndroid | Busy Java Developers Guide to Android: UI | Ted Neward
Android | Busy Java Developers Guide to Android: UI | Ted Neward
JAX London
 
#SPSEMEA SharePoint & jQuery - What I wish I would have known a year ago..
#SPSEMEA SharePoint & jQuery - What I wish I would have known a year ago..#SPSEMEA SharePoint & jQuery - What I wish I would have known a year ago..
#SPSEMEA SharePoint & jQuery - What I wish I would have known a year ago..
Mark Rackley
 
Alexandre Iline Rit 2010 Java Fxui
Alexandre Iline Rit 2010 Java FxuiAlexandre Iline Rit 2010 Java Fxui
Alexandre Iline Rit 2010 Java Fxui
rit2010
 

Similar to Accessibility: A Journey to Accessible Rich Components (20)

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 / AccessU 2018
WAI-ARIA An introduction to Accessible Rich Internet Applications / AccessU 2018WAI-ARIA An introduction to Accessible Rich Internet Applications / AccessU 2018
WAI-ARIA An introduction to Accessible Rich Internet Applications / AccessU 2018
 
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
 
Drupal 7 ci and testing
Drupal 7 ci and testingDrupal 7 ci and testing
Drupal 7 ci and testing
 
Alexandre.iline rit 2010 java_fxui_extra
Alexandre.iline rit 2010 java_fxui_extraAlexandre.iline rit 2010 java_fxui_extra
Alexandre.iline rit 2010 java_fxui_extra
 
Accessible web applications
Accessible web applications Accessible web applications
Accessible web applications
 
Android Deep Dive
Android Deep DiveAndroid Deep Dive
Android Deep Dive
 
An Introduction to WAI-ARIA
An Introduction to WAI-ARIAAn Introduction to WAI-ARIA
An Introduction to WAI-ARIA
 
Introduction to Shiny for building web apps in R
Introduction to Shiny for building web apps in RIntroduction to Shiny for building web apps in R
Introduction to Shiny for building web apps in R
 
Plug yourself in and your app will never be the same (1 hr edition)
Plug yourself in and your app will never be the same (1 hr edition)Plug yourself in and your app will never be the same (1 hr edition)
Plug yourself in and your app will never be the same (1 hr edition)
 
software-tools-part-1.ppt
software-tools-part-1.pptsoftware-tools-part-1.ppt
software-tools-part-1.ppt
 
Windows Presentation Foundation
Windows Presentation FoundationWindows Presentation Foundation
Windows Presentation Foundation
 
JAX 08 - Agile RCP
JAX 08 - Agile RCPJAX 08 - Agile RCP
JAX 08 - Agile RCP
 
jQuery Mobile
jQuery MobilejQuery Mobile
jQuery Mobile
 
Android | Busy Java Developers Guide to Android: UI | Ted Neward
Android | Busy Java Developers Guide to Android: UI | Ted NewardAndroid | Busy Java Developers Guide to Android: UI | Ted Neward
Android | Busy Java Developers Guide to Android: UI | Ted Neward
 
Xam expertday
Xam expertdayXam expertday
Xam expertday
 
The Joy Of Ruby
The Joy Of RubyThe Joy Of Ruby
The Joy Of Ruby
 
Building Multi-Tenant and SaaS products in PHP - CloudConf 2015
Building Multi-Tenant and SaaS products in PHP - CloudConf 2015Building Multi-Tenant and SaaS products in PHP - CloudConf 2015
Building Multi-Tenant and SaaS products in PHP - CloudConf 2015
 
#SPSEMEA SharePoint & jQuery - What I wish I would have known a year ago..
#SPSEMEA SharePoint & jQuery - What I wish I would have known a year ago..#SPSEMEA SharePoint & jQuery - What I wish I would have known a year ago..
#SPSEMEA SharePoint & jQuery - What I wish I would have known a year ago..
 
Alexandre Iline Rit 2010 Java Fxui
Alexandre Iline Rit 2010 Java FxuiAlexandre Iline Rit 2010 Java Fxui
Alexandre Iline Rit 2010 Java Fxui
 

More from Achievers Tech

My sql explain cheat sheet
My sql explain cheat sheetMy sql explain cheat sheet
My sql explain cheat sheet
Achievers Tech
 

More from Achievers Tech (6)

My sql explain cheat sheet
My sql explain cheat sheetMy sql explain cheat sheet
My sql explain cheat sheet
 
Agile - The Xtreme Labs Way
Agile - The Xtreme Labs WayAgile - The Xtreme Labs Way
Agile - The Xtreme Labs Way
 
Your Web Application Is Most Likely Insecure
Your Web Application Is Most Likely InsecureYour Web Application Is Most Likely Insecure
Your Web Application Is Most Likely Insecure
 
PHP Framework Battle
PHP Framework BattlePHP Framework Battle
PHP Framework Battle
 
Profiling and Tuning a Web Application - The Dirty Details
Profiling and Tuning a Web Application - The Dirty DetailsProfiling and Tuning a Web Application - The Dirty Details
Profiling and Tuning a Web Application - The Dirty Details
 
Scaling High Traffic Web Applications
Scaling High Traffic Web ApplicationsScaling High Traffic Web Applications
Scaling High Traffic Web Applications
 

Recently uploaded

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
vu2urc
 

Recently uploaded (20)

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...
 
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
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
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...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
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
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
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
 
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)
 
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
 
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
 
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 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
 
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?
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
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
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 

Accessibility: A Journey to Accessible Rich Components

  • 1. A Journey to Accessible Rich UI Components with Jason Jang “Journey” sounds inappropriately epic and kind of cornered me into a theme, for this, my first talk.
  • 2. What to Expect ▹My story ▹Important Considerations for our organization ▹Code Examples of making a Rich UI Component accessible
  • 3. Sometimes the hardest part of learning a language, is learning the language around the language. Disclaimer Whoa, deep.
  • 4. Some Terminology ▹a11y > accessibility ▹component > a part of an interface ▹Rich UI > interactive components Whoa, deep.
  • 6. In the beginning... ▹“Making websites” was a hobby ▹… that became a side gig ▹… that became a part-time gig ▹… that became a full-time gig at an agency ▹… that became a stint as a freelancer ▹… that became a full-time gig at Achievers There. There’s your journey.
  • 7. First Encounter with a11y ▹Everyone uses the Internet ▹People use screen readers? Never got use one. ▹A11y considered a checkmark ▹All text and images
  • 8. First Encounter with a11y Semantic HTML and good markup ▹ Headings, Lists, Links ▹ <b> <i> vs <strong> <em> Landmark Roles: ▹<div role=”banner”> ▹<div role=”form”> ▹<div role=”main”> ▹<div role=”navigation”> ▹<div role=”search”>
  • 9.
  • 10.
  • 11. a11y Tools ▹WAVE Accessibility Tool ▹aChecker ▹Quail (JS Accessibility Tool) ▹Google Accessibility Tool
  • 12. Fast-forward 5 or so years I lost count
  • 14. Jason, can we make this accessible?
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 24. WAI-ARIA! Web Accessibility Initiative – Accessible Rich Internet Applications Henceforth referred to as accessibility API or ARIA
  • 27. a11y: You’ve Changed This is not the Aria you were looking for, and that’s a reference to something else entirely.
  • 28. a11y: You’ve Changed ▹ Support for Rich Interfaces ▹new roles <div role=”button”> ▹presentation changes <div role=”button” aria-pressed=”true”> ▹asynchronous content <div role=”button” aria-pressed=”true”> ▹ a11y evaluation tools still useful elsewhere
  • 29. We’re all equipped and ready to go! Right?
  • 30.
  • 31. WaitBefore we could dig into it...
  • 32. Important Considerations For your Organization There were several
  • 33. Important Considerations 1. Define Users a. Assistive Technologies 2. Take Stock of Codebase and UI 3. Determine rollout plan 4. How will you influence a Paradigm Shift?
  • 36. 1a. Assistive Technologies Learn about the Tools ▹JAWS, NVDA, VoiceOver ▹Windows Eyes, ZoomText ▹Specialized Input Devices
  • 37. 2. Take Stock of Your Codebase and UI
  • 38. 2. Take Stock of Codebase and UI ▹How is your markup? ▹Identify and address Anti-Patterns ▹Breakdown features into components so you can tackle them individually (Agile)
  • 39. 3. Take Stock of Codebase and UI
  • 40. 3. Determine Rollout Plan ▹ Prioritize core features ▹ Break down into components ▹ Tackle global elements ▹ Don’t omit features or content
  • 41. 4. Influence a Paradigm Shift
  • 42. ▹a11y is NOT a checkmark ▹Affects everyone in the development lifecycle 4. Influence a Paradigm Shift
  • 43. Education ▹Devs and Testers need software training ▹Designers need to understand a11y needs for both users and developers ▹Project Managers need to know how to break the work down 4. Influence a Paradigm Shift
  • 44. 4. Influence a Paradigm Shift Process Improvement ▹Design mocks need to be vetted for a11y at design stage before development begins ▹Pattern/Component Library even more valuable
  • 45. 4. Influence a Paradigm Shift Testing ▹a11y testing can be expensive ▹Some automation possible ▹Manual testing required ▹Testing with real users is the only real test
  • 46. Okay, with all things considered...
  • 47. Accessible Rich UI Components The Code Demo
  • 48. a11y Rich UI Components... 1. ...use WAI-ARIA for communicating: ▹Roles ▹Presentation changes like state and visibility ▹Asynchronous content changes 2. …are fully keyboard accessible
  • 49. Time for a quick SCREEN READER DEMO
  • 50. and now for some CODE EXAMPLES
  • 51. Code Examples 1. Form Basics 2. Live Regions 3. Slider Example 4. Tabs and Tab Panels
  • 52. Code Example 1: Form Basics (1 of 3)
  • 53. Code Example 1: Form Basics (2 of 3) <label>Your email</label> <input type="email" /> <label>Reason for contacting</label> <select> <option value="Option 1">Questions</option> <option value="Option 2">Admiration</option> <option value="Option 3">Can I get your number?</option> </select> <label>Message</label> <textarea></textarea>
  • 54. Code Example 1: Form Basics (3 of 3) <label for="email">Your email</label> <input id="email" type="email" /> <label for="reason">Reason for contacting</label> <select id="reason"> <option value="Option 1">Questions</option> <option value="Option 2">Admiration</option> <option value="Option 3">Can I get your number?</option> </select> <label for="message">Message</label> <textarea id="message"></textarea>
  • 55. Code Example 2: Live Region (1 of 3)
  • 56. <!-- FORM--> <label for="message">Message</label> <textarea id="message"></textarea> <input class="button-primary" type="submit" value="Submit"> <!-- THROBBER TO INDICATE AJAX CALL --> <img src="img/ajax-loader.gif" js-throbber class="hidden"> <!-- FEEDBACK FOR AJAX CALL --> <div class="alert error hidden" js-ajax-alert="error" ><a href="#message">There was an error with your message</a></div> <!-- LIVE REGION --> <div role="alert" aria-live="assertive" aria-relevant="additions" class="a11yHiddenText" js-globalLiveRegion></div> Code Example 2: Live Region (2 of 3)
  • 57. <script> function formSubmit() { $("form").submit(function() { showThrobber(); $.ajax( "formSubmit.php" ) .done(function() { hideThrobber(); alert( "success" ); }) .fail(function() { hideThrobber(); alert( "error" ); }); }); } </script> Code Example 2: Live Region (2 of 3)
  • 58. Code Example 2: Live Region (3 of 3) <script> function formSubmit() { $("form").submit(function() { showThrobber(); $.ajax( "formSubmit.php" ) .done(function() { hideThrobber(); updateLiveRegion("Form submitted successfully"); }) .fail(function() { hideThrobber(); updateLiveRegion("Form submit unsuccessful"); }); }); } function updateLiveRegion(text) { $("[js-globalLiveRegion]").html(text); } </script>
  • 59. Code Example 2: Live Region (3 of 3) <script> function formSubmit() { $("form").submit(function() { submitPending(true); $.ajax( "formSubmit.php" ) .done(function() { submitPending(false); updateLiveRegion("Form submitted successfully"); }) .fail(function() { submitPending(false); updateLiveRegion("Form submit unsuccessful"); }); }); } function updateLiveRegion(text) { $("[js-globalLiveRegion]").html(text); } function submitPending(true) { showThrobber(true); disableSubmit(true); } function disableSubmit(state) { $("#submit") .attr("aria-disabled", state) .attr("disabled", "disabled") .addClass('.disabled'); } </script>
  • 60. <div js-slider> <span class="ui-slider-handle" tabindex="0"></span> </div> Code Example 3: Slider <div js-slider> <span class="ui-slider-handle" tabindex="0" role="slider" aria-valuemin="0" aria-valuemax="500" aria-valuenow="0" aria- valuetext="0"></span> </div> $slider.slider({ value: 0, min: 0, max: 500, step: 50, slide: function(event, ui) { $display.html(ui.value); var $handle = $slider.find(".ui-slider-handle"); $handle .attr("aria-valuemin", 0) .attr("aria-valuemax", 500) .attr("aria-valuenow", 0) .attr("aria-valuetext", 0); } });
  • 62. Code Example 4: Tabs <div id="tabs-container" js-tabContainer class="clearfix"> <ul class="tabs-menu"> <li class="current"><a href="#tab-1" js-tab>Tab 1</a></li> <li><a href="#tab-2" js-tab>Tab 2</a></li> <li><a href="#tab-3" js-tab>Tab 3</a></li> <li><a href="#tab-4" js-tab>Tab 4</a></li> </ul> <div class="tab"> <div id="tab-1" class="tab-content"> <p>...</p> </div> <div id="tab-2" class="tab-content"> <p>...</p> </div> <div id="tab-3" class="tab-content"> <p>...</p> </div> <div id="tab-4" class="tab-content"> <p>...</p> </div> </div> </div>
  • 63. Code Example 4: Tabs <div id="tabs-container" js-tabContainer class="clearfix"> <ul class="tabs-menu" role="tablist"> <li role="tab" aria-selected="true" class="current"><a href="#tab-1" js-tab>Tab 1</a></li> <li role="tab" aria-selected="false"><a href="#tab-2" js-tab>Tab 2</a></li> <li role="tab" aria-selected="false"><a href="#tab-3" js-tab>Tab 3</a></li> <li role="tab" aria-selected="false"><a href="#tab-4" js-tab>Tab 4</a></li> </ul> <div class="tab"> <div id="tab-1" class="tab-content" role="tabpanel" aria-hidden="false"> <p>...</p> </div> <div id="tab-2" class="tab-content" role="tabpanel" aria-hidden="true"> <p>...</p> </div> <div id="tab-3" class="tab-content" role="tabpanel" aria-hidden="true"> <p>...</p> </div> <div id="tab-4" class="tab-content" role="tabpanel" aria-hidden="true"> <p>...</p> </div> </div> </div>
  • 64. Code Example 4: Tabs function initTabsKeyboardA11y($tabsContainer) { $("[js-tabContainer]").keydown(function(e) { e.preventDefault(); var $currentTab = $(this).find("[role=tab].current [js-tab]"); var keyPressed = getKeyName(e.keyCode); if (keyPressed === "right") { var $next = $currentTab.parent().next().find("[js-tab]") if ($next) { $next.trigger("click").focus(); } } else if (keyPressed === "left") { var $prev = $currentTab.parent().prev().find("[js-tab]") if ($prev) { $prev.trigger("click").focus(); } } }); }
  • 65. Knowledge Nugget! If you can’t find an ARIA ROLE that addresses your design pattern, there’s a good chance you have an ANTI-PATTERN (or they just call it by a different name :)
  • 66. Time for another quick SCREEN READER DEMO This time on an accessible page
  • 68. Keyboard Accessibility ▹ Screen Readers Provide shortcuts to traverse page ▹ TAB is also commonly used ▹ Certain ROLEs expect the use of arrow keys ▹ You can often refer to OS or other online examples for keyboard flow
  • 69. Keyboard Accessibility ● Get to know tabindex ● Both ENTER and SPACEBAR should trigger a click ● In Forms, SPACEBAR activates, ENTER submits the form
  • 70. Biggest Hurdles ▹Learning to use screen readers (ongoing!) ▹Deciding where to start ▹Testing
  • 71. Added Benefits from A11y Improved UI ▹Forces you to scrutinize UI decisions ▹Opportunity to fix design decisions
  • 72. Food for Thought ▹ Decouple your a11y JS from regular JS ▹ Create helpers for JS and SCSS ▹ Here’s a clever way to enforce a11y
  • 74. Let’s Remember Influence a Paradigm Shift ▹A11y affects everyone ▹Consider users, testers, designers, developers….
  • 75. Let’s Also Remember Rich Components... ▹Leverage WAI-ARIA to comm. with screen readers ▹Provide Keyboard a11y
  • 76. Special Thanks Chris Gurney (PM) & Avinder Walia (Dev)

Editor's Notes

  1. In my experience, the velocity at which you can learn a new language is often correlated with how quickly you get good at googling your issues. a11y btw = accessiblity
  2. In my experience, the velocity at which you can learn a new language is often correlated with how quickly you get good at googling your issues. a11y btw = accessiblity
  3. In my experience, the velocity at which you can learn a new language is often correlated with how quickly you get good at googling your issues. a11y btw = accessiblity
  4. started as a hobby was really into design and the interface side of things agency work was static websites. Glorified brochures Freelancer where i worked on getting in debt
  5. The INTERNET is one of the greatest inventions in recent human history, everyone should have access to it. This was the first time I had even heard of the concept of a screen reader. DEFINE SCREEN READER The agency I worked for considered a11y as a checkmark for the deliverable. Something you do once. The websites we worked on were mostly text and images
  6. Sensible document structure ROLE is an often overlooked attribute. a11y relies on these landmark roles to determine context as they browse the page
  7. At the time, we used tools like this to determine if our site was accessible. Still a very useful tool today, but not so much in the context of our platform.
  8. Very Practical tools for assessing markup quality for static sites.
  9. At the time, we used tools like this to determine if our site was accessible. Still a very useful tool today, but not so much in the context of our platform.
  10. At the time, we used tools like this to determine if our site was accessible. Still a very useful tool today, but not so much in the context of our platform.
  11. At the time, we used tools like this to determine if our site was accessible. Still a very useful tool today, but not so much in the context of our platform.
  12. At the time, we used tools like this to determine if our site was accessible. Still a very useful tool today, but not so much in the context of our platform.
  13. Most improtant tool for Accessibility has a name that is nearly innaccessible to an english speaker
  14. In recent years the Web Accessibility Initiative introduced a new accessibility API.
  15. In recent years the Web Accessibility Initiative introduced a new accessibility API.
  16. Define Users - like with any software, it’s important to define who your users are
  17. Vision Impaired - can’t see the cursor Dexterity Impaired - can’t use a mouse and sometimes require a special input devices Hearing Impaired - can’t hear auditory cues
  18. JAWS is especially well known. Each piece of software comes with it’s own set of tools and shortcut keys. Keyboard based UI for traversing webpages, and with JAWS and VOICE OVER your whole OS
  19. How is your markup? Use a11y tools to assess where your shortcomings are Define ANTI-PATTERNS Is a design that may conflict with perceived design conventions. If it doesn’t have a role, or doesn’t fit into one of the roles identified in the ARIA guidelines, there’s a good chance it is an Anti-Pattern Hurdles like that can often be solved with a redesign Sometimes we design things for a specific need while ignoring design conventions and not recognizing that we have existing form elements for that type of thing, or there are conventions out there that poeple have embraced, including the people behind WAI-ARIA.
  20. live in a reality with stakeholders
  21. a11y is not a checkmark you achieve once and forget about If you want to do it properly, effectively, scalably, it is a paradigm shift for your development organization
  22. a11y is not a checkmark you achieve once and forget about If you want to do it properly, effectively, scalably, it is a paradigm shift for your development organization
  23. a11y is not a checkmark you achieve once and forget about If you want to do it properly, effectively, scalably, it is a paradigm shift for your development organization
  24. a11y is not a checkmark you achieve once and forget about If you want to do it properly, effectively, scalably, it is a paradigm shift for your development organization
  25. 2 Most imporant parts of Rich UI components
  26. There are several important considerations when tackling a11y, it affects everyone theres a lot of people affected