A call to action
“UI accessibility is not an accessory, a 'nice to have'. If a UI is not accessible it's incomplete, substandard, half baked - a neckbeard UI”
Steve Faulkner - Larrikin*
* playfully rebellious against and contemptuous of authority and convention.
Opera accessibility MIA
a web components
world
Steve Faulkner
A call to action
I think of (UI) demons
for you
Can’t focus
Can’t See
Can’t Understand
Can’t Operate
I think of demons - Roky Erickson
You may think
this guy is a negative creep
you are probably right
How do I (we) get from here to...
Accessible, usable UI brings joy to all
I want to assure you all - There is nothing to fear with web components
custom elements
This specification describes the method for enabling the author to define and use new types of DOM elements in a document.
examples of custom elements
or
<button is="w3c-disclosure">Expand</button>
<html5-h>Ramones: Hey! Ho! Let's Go</html5-h>
Recognised as legitimate elements in browsers that have implemented custom elements or use a polyfill *
*elements must be registered
shadow DOM
This specification describes a method of combining multiple DOM trees into one hierarchy and how these trees interact with each other within a document, thus enabling better composition of the DOM.
shadow DOM has always been here before
user agent shadow DOM
#shadow root (user agent)
<div pseudo="-webkit-datetime-edit" id="date-time-edit" datetimeformat="'Week 'ww, yyyy">
<div pseudo="-webkit-datetime-edit-fields-wrapper"><div pseudo="-webkit-datetime-edit-text">Week </div>
<span role="spinbutton" aria-valuetext="blank" aria-valuemin="1" aria-valuemax="53" aria-help="Week" pseudo="-webkit-datetime-edit-week-field">--</span>
<div pseudo="-webkit-datetime-edit-text">, </div>
<span role="spinbutton" aria-valuetext="blank" aria-valuemin="1" aria-valuemax="275760" aria-help="Year" pseudo="-webkit-datetime-edit-year-field">----</span></div></div>
</input>
<input type="week">
author shadow DOM
DOM source
<button is="w3c-disclosure" controlfor="details2" type="button" aria-controls="details2" aria-expanded="false">Expand section 2
#shadow root
<style type="text/css">
:host #icon:before {
content:"►"; font-size: 1em;
}
:host #icon.expanded:before {
content:"▼"; font-size: 1em;
}
</style>
</button>
HTML source
<button is="w3c-disclosure" controlfor="details1" expanded>
Expand section 2</button>
HTML IMPORTS
HTML Imports are a way to include and reuse HTML documents in other HTML documents.
HTML IMPORTS example
Import a html page containing a web component definition
template
Is a method for declaring inert DOM subtrees in HTML and manipulating them to instantiate document fragments with identical contents.
template code example
<template>
<style>
h1 :host {
font-size:80%;
color:#039;
font-style:italic;
}
:host {
display: block;
font-size:1.2em;
}
</style>
<div><span>sub heading:</span><content></content></div>
</template>
browser support for web components
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
✘
✘
✘
✘
✘
✘
✘
✘
POLYFILL
for web components
are polymer crew shape shifting aliens?
Polyfill�Nothing particularly scary about the polymer crew
The man behind web components and polymer speaks and sings
Where are the frights?
What patrick lauke may have said if he wasn’t busy doing pixel font re-creations
There is nothing inherent within web components as a technology that makes it harder to build usable and accessible UI’s
The challenges with web components are pretty much the same as what we have dealt with for years with HTML/JavaScript custom controls
A complex web UI- Google Drive
Is an example of doing it right!
Accessible, usable UI brings joy to all
climbing wall with many multi colored and shaped hand and foot holds.
sucker punch wall video - people fall off into mud as they attempt to traverse.
Something Karl Groves said
“I'm writing a new talk titled "Demystifying Web Components Accessibility". It has one slide. It says "Same as regular ole web accessibility. Seriously. Stop overthinking it"
design consideration | description |
focusable | Can you get to the control via the keyboard? |
operable | Can you use the control with the keyboard? |
expected operation | Can you use the standard keys for the control type to operate it? |
clear indication of focus | Can you easily see it when the control has focus? |
label | Does the control have a text label that is exposed as an accessible name in accessibility APIs |
Web Components Punch list - continued
design consideration | description |
role | The control has an appropriate role exposed in accessibility APIs |
states and properties | The control has any UI states and properties that it has exposed in accessibility APIs |
color contrast | The control label/description/icon is perceivable/usable for low vision users (Use a color contrast checker.) |
high contrast mode | The control is perceivable/usable when High Contrast Mode is enabled (e.g. Windows HC mode) |
Spotlight on polymer paper elements
Polymer
Paper elements
Selected further reading and watching
Selected further reading and watching
Léonie Watson, "Design like you give a damn: Practical accessibility for web pros" at W3Conf 2013
Selected further reading and watching
Modern Web Toolsets & The Next Generation of Accessibility Testing Tools - Karl groves
Selected further reading and watching
Getting touchy - an introduction to touch and pointer events - Patrick H. Lauke