SlideShare a Scribd company logo
Making Polymer
Elements
Accessible
+Alice Boxhall
@sundress
<link rel="import" href="my-widget.html" />
<my-widget></my-widget>
Can your element be
used with the
keyboard alone?
image CC-BY from baldiri on flickr
Design keyboard
interactions
Carrie had a motorcycle
accident and no longer has
use of her right arm; she
can use a mouse with her
left hand but finds it fiddly
and awkward.
image CC-BY-SA from patdavid on flickr
Personas
Combo BoxCombo Box
← / → move the caret within the edit field
Alt+↑/↓ opens / closes the list
↑/↓
moves focus up and down the list. As
focus moves inside the dropdown list,
the edit field is updated.
PgUp /
PgDown
selects the next/previous pages item
depending on the lists size.
w3.org/TR/wai-aria-practices/#combobox
Design keyboard interactions
Manage focus
Manage focus
tabIndex="0" element will be in the “natural” tab
order (defined by the DOM order)
tabIndex="-1" element will be programmatically
focusable, but not in the tab order.
* tabIndex > 0 element in a manual tab order
* Do not use in web components* Do not use in web components
Manage focus: tabIndex
Subtitle
Implementing keyboard
interactions
<polymer-element name="my-element" on-keydown="{{keydownAction}}"
tabIndex="0" >
<template>
...
</template>
<script>
Polymer({
keydownAction: function(keyboardEvent) {
...
},
});
</script>
</polymer-element>
my-element.html
use on-keydown to listen for
keyboard events from the page
implement your keyboard
event handling here
Can your element be used
with assistive technology?
Assistive technology
Do your custom elements provide semantic
information?
Role
State
Value
Name
Do all elements and images have meaningful
text alternatives?
Semantics
<gmail-window>
<gmail-sidebar>...</gmail-sidebar>
<gmail-actionbar>
<gmail-buttongroup>
<button is="gmail-button" icon="return" action="goBack
tip="Back to Search Results">
</gmail-buttongroup>
<gmail-buttongroup>
<button is="gmail-button" icon="archive" action="archive" tip="Archive">
<button is="gmail-button" icon="stop" action="markAsSpam" tip="Report spam">
<button is="gmail-button" icon="trash" action="delete" tip="Delete">
</gmail-buttongroup>
<gmail-buttongroup>...</gmail-buttongroup>
</gmail-actionbar>
<gmail-inbox>...</gmail-inbox>
</gmail-window>
Semantics
WAI-ARIA
<div role="button">Click me</div>
<div role="checkbox" aria-selected="true" ></div>
<div aria-label="settings" aria-role="menu" class="menu">
</div>
Adding semantics: ARIA
<x-slider min="1" max="5" value="2.5">
</x-slider>
<!-- x-slider element template adds ARIA role and attributes which are visible in
light DOM -->
<x-slider role="slider" aria-valuemin="1" aria-valuemax="5" aria-valuenow="2.5">
</x-slider>
Text alternatives
•Ensure any information
communicated visually is also
available textually
•Provide alt text for all images
· alt="" will cause the image to be
skipped by the screen reader
Can users understand
everything without
relying on color?
Communicating via color
Is there sufficient contrast?
Using Accessibility Developer Tools
Testing color contrast
Contrast ratio
With color suggestions
Is the moving or flashing
content in your elements
stoppable and safe?
Six characteristics of
complete Web Components
1. available via keyboard
2. works with assistive technology
3. works without color
4. has sufficient contrast
5. works without sound
6. safe or stoppable moving/flashing content
Learn more
Accessible Web Components article
polymer-project.org/articles/
accessible-web-components.html
+Alice Boxhall
@sundress
Thank you!
#marklar

More Related Content

Similar to Making Polymer Elements Accessible

BEM - CSS, Seriously
BEM - CSS, SeriouslyBEM - CSS, Seriously
BEM - CSS, Seriously
Roland Lösslein
 
Polymer
PolymerPolymer
Polymer
Cyril Balit
 
jQuery Mobile Introduction ( demo on EZoapp )
jQuery Mobile Introduction ( demo on EZoapp )jQuery Mobile Introduction ( demo on EZoapp )
jQuery Mobile Introduction ( demo on EZoapp )
EZoApp
 
Jarv.us Showcase — SenchaCon 2011
Jarv.us Showcase — SenchaCon 2011Jarv.us Showcase — SenchaCon 2011
Jarv.us Showcase — SenchaCon 2011Chris Alfano
 
Bootstrap Components Quick Overview
Bootstrap Components Quick OverviewBootstrap Components Quick Overview
Bootstrap Components Quick Overview
Perumal N K
 
jQuery in the [Aol.] Enterprise
jQuery in the [Aol.] EnterprisejQuery in the [Aol.] Enterprise
jQuery in the [Aol.] Enterprise
Dave Artz
 
Web accessibility - WAI-ARIA a small introduction
Web accessibility - WAI-ARIA a small introductionWeb accessibility - WAI-ARIA a small introduction
Web accessibility - WAI-ARIA a small introduction
Geoffroy Baylaender
 
jQuery UI and Plugins
jQuery UI and PluginsjQuery UI and Plugins
jQuery UI and Plugins
Marc Grabanski
 
jQuery Mobile
jQuery MobilejQuery Mobile
jQuery Mobilemowd8574
 
JQuery Mobile UI
JQuery Mobile UIJQuery Mobile UI
JQuery Mobile UI
My own sweet home!
 
Try Web Components
Try Web ComponentsTry Web Components
Try Web Components
拓樹 谷
 
Start IoT with jQueryMobile - 기초2
Start IoT with jQueryMobile - 기초2Start IoT with jQueryMobile - 기초2
Start IoT with jQueryMobile - 기초2
Park Jonggun
 
The Real Story Behind JavaScript Performance on Mobile... Because Science!
The Real Story Behind JavaScript Performance on Mobile... Because Science!The Real Story Behind JavaScript Performance on Mobile... Because Science!
The Real Story Behind JavaScript Performance on Mobile... Because Science!
Ryan J. Salva
 
Aria a11ycamp-bay-2015
Aria a11ycamp-bay-2015Aria a11ycamp-bay-2015
Aria a11ycamp-bay-2015
Dylan Barrell
 
Componentization css angular
Componentization css angularComponentization css angular
Componentization css angular
David Amend
 
Native look and feel bbui & alicejs
Native look and feel bbui & alicejsNative look and feel bbui & alicejs
Native look and feel bbui & alicejs.toster
 
Java script frame history
Java script frame historyJava script frame history
Java script frame historyH K
 
Clickable DIVs and other icebergs
Clickable DIVs and other icebergsClickable DIVs and other icebergs
Clickable DIVs and other icebergs
Ben Buchanan
 

Similar to Making Polymer Elements Accessible (20)

Jquery 3
Jquery 3Jquery 3
Jquery 3
 
iWebkit
iWebkitiWebkit
iWebkit
 
BEM - CSS, Seriously
BEM - CSS, SeriouslyBEM - CSS, Seriously
BEM - CSS, Seriously
 
Polymer
PolymerPolymer
Polymer
 
jQuery Mobile Introduction ( demo on EZoapp )
jQuery Mobile Introduction ( demo on EZoapp )jQuery Mobile Introduction ( demo on EZoapp )
jQuery Mobile Introduction ( demo on EZoapp )
 
Jarv.us Showcase — SenchaCon 2011
Jarv.us Showcase — SenchaCon 2011Jarv.us Showcase — SenchaCon 2011
Jarv.us Showcase — SenchaCon 2011
 
Bootstrap Components Quick Overview
Bootstrap Components Quick OverviewBootstrap Components Quick Overview
Bootstrap Components Quick Overview
 
jQuery in the [Aol.] Enterprise
jQuery in the [Aol.] EnterprisejQuery in the [Aol.] Enterprise
jQuery in the [Aol.] Enterprise
 
Web accessibility - WAI-ARIA a small introduction
Web accessibility - WAI-ARIA a small introductionWeb accessibility - WAI-ARIA a small introduction
Web accessibility - WAI-ARIA a small introduction
 
jQuery UI and Plugins
jQuery UI and PluginsjQuery UI and Plugins
jQuery UI and Plugins
 
jQuery Mobile
jQuery MobilejQuery Mobile
jQuery Mobile
 
JQuery Mobile UI
JQuery Mobile UIJQuery Mobile UI
JQuery Mobile UI
 
Try Web Components
Try Web ComponentsTry Web Components
Try Web Components
 
Start IoT with jQueryMobile - 기초2
Start IoT with jQueryMobile - 기초2Start IoT with jQueryMobile - 기초2
Start IoT with jQueryMobile - 기초2
 
The Real Story Behind JavaScript Performance on Mobile... Because Science!
The Real Story Behind JavaScript Performance on Mobile... Because Science!The Real Story Behind JavaScript Performance on Mobile... Because Science!
The Real Story Behind JavaScript Performance on Mobile... Because Science!
 
Aria a11ycamp-bay-2015
Aria a11ycamp-bay-2015Aria a11ycamp-bay-2015
Aria a11ycamp-bay-2015
 
Componentization css angular
Componentization css angularComponentization css angular
Componentization css angular
 
Native look and feel bbui & alicejs
Native look and feel bbui & alicejsNative look and feel bbui & alicejs
Native look and feel bbui & alicejs
 
Java script frame history
Java script frame historyJava script frame history
Java script frame history
 
Clickable DIVs and other icebergs
Clickable DIVs and other icebergsClickable DIVs and other icebergs
Clickable DIVs and other icebergs
 

Recently uploaded

Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Globus
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
Shane Coughlan
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
NYGGS Automation Suite
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Crescat
 
Enterprise Software Development with No Code Solutions.pptx
Enterprise Software Development with No Code Solutions.pptxEnterprise Software Development with No Code Solutions.pptx
Enterprise Software Development with No Code Solutions.pptx
QuickwayInfoSystems3
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
timtebeek1
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
Neo4j
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Globus
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
Globus
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
Aftab Hussain
 
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
Alina Yurenko
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
rickgrimesss22
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
Boni García
 
E-commerce Application Development Company.pdf
E-commerce Application Development Company.pdfE-commerce Application Development Company.pdf
E-commerce Application Development Company.pdf
Hornet Dynamics
 
AI Genie Review: World’s First Open AI WordPress Website Creator
AI Genie Review: World’s First Open AI WordPress Website CreatorAI Genie Review: World’s First Open AI WordPress Website Creator
AI Genie Review: World’s First Open AI WordPress Website Creator
Google
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
Fermin Galan
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
Globus
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Globus
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
Łukasz Chruściel
 

Recently uploaded (20)

Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
 
Enterprise Software Development with No Code Solutions.pptx
Enterprise Software Development with No Code Solutions.pptxEnterprise Software Development with No Code Solutions.pptx
Enterprise Software Development with No Code Solutions.pptx
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
 
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
 
E-commerce Application Development Company.pdf
E-commerce Application Development Company.pdfE-commerce Application Development Company.pdf
E-commerce Application Development Company.pdf
 
AI Genie Review: World’s First Open AI WordPress Website Creator
AI Genie Review: World’s First Open AI WordPress Website CreatorAI Genie Review: World’s First Open AI WordPress Website Creator
AI Genie Review: World’s First Open AI WordPress Website Creator
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
 

Making Polymer Elements Accessible