Slide 1
WEB ACCESSIBILITY:
MAKING WEBSITES
BETTER FOR EVERYONE
Slide 2
WHAT IS WEB
ACCESSIBILITY?
Slide 3
SCREEN READER
Page has fifty-eight headings and two
hundred seventy-one links BBC dash
Homepage Link Graphic BBC Heading level
two Heading level two BBC navigation List
of nine items bullet Link News bullet Link
Sport bullet Link Weather bullet Link
Capital bullet Link Future bullet Link Shop
bullet Link TV bullet Link Radio bullet Link
More… List end
Slide 4
Slide 5
Slide 6
Slide 7
Slide 8
Slide 9
Slide 10
Slide 11
TRY IT YOURSELF
Jaws / ChromeVox
Windows High Contrast Theme
Tu r n o f f y o u r m o u s e
Use your elbows (not fingers)
Slide 12
YOU SHOULD CARE
ABOUT ACCESSIBILITY
Slide 13
1: UX
Content
Information Architecture
Interface Design
Slide 14
Slide 15
Slide 16
2: HTML
Semantic HTML:
When the HTML markup reinforces
the meaning
(aka semantics)
of the
information on the page.
Slide 17
2: HTML
WCAG 2.0
(Web Content Accessibility Guidelines)
wave.webaim.org
Slide 18
Section 508
Rehabilitation Act
Americans with Disabilities Act
Nat’l Federation of the Deaf vs. Netflix Inc
ADA
Department of Justice
Advance Notice Of Proposed Rulemaking
Charter of Rights and Freedoms
Canadian Human Rights Act
Ontarians with Disabilities Act
Schedules I, I.I and II of the Financial Administration Act
Title III
Slide 19
3: CSS
Don’t screw up your HTML
Make small improvements
Slide 20
4: JAVASCRIPT
Don’t screw up your HTML
Slide 21
4: JAVASCRIPT
Don’t screw up your HTML
ARIA Roles and Attributes
(Accessible Rich Internet Applications)
Slide 22
Slide 23
Slide 24
<div class="server">Blueberry
<span class="server_button">
DETAILS ▸</span>
</div>
<div class="server_details">
<div>Hostname: web02.onr.example.com</div>
<div>Service Tag: JCQFZK1</div>
<div>Datacentre: ONR</div>
<div>Rack Location: 104.6, Unit #24</div>
</div>
Slide 25
<div class="server">Blueberry
<span class="server_button">
DETAILS ▸</span>
</div>
<div class="server_details">
<div>
Hostname: web02.onr.example.com
</div>
<div>
Service Tag: JCQFZK1
</div>
<div>
Datacentre: ONR
</div>
</div>
Slide 26
<div class="server">Blueberry
<span class="server_button">
DETAILS ▸</span>
</div>
<dl class="server_details">
<dt>
Hostname:
</dt><dd>
web02.onr.example.com
</dd>
<dt>
Service Tag:
</dt><dd>
JCQFZK1
</dd>
<dt>
Datacentre:
</dt><dd>
ONR
</dd>
</dl>
Slide 27
<div class="server">Blueberry
<span class="server_button">
DETAILS ▸</span>
</div>
<dl class="server_details">
<dt>Hostname:</dt><dd> web02.onr.example.com</dd>
<dt>Service Tag:</dt><dd> JCQFZK1</dd>
<dt>Datacentre:</dt><dd> ONR</dd>
</dl>
Slide 28
<h3 class="server">Blueberry
<span class="server_button">
DETAILS ▸</span>
</h3>
<dl class="server_details">
<dt>Hostname:</dt><dd> web02.onr.example.com</dd>
<dt>Service Tag:</dt><dd> JCQFZK1</dd>
<dt>Datacentre:</dt><dd> ONR</dd>
</dl>
Slide 29
<h3 class="server">Blueberry
<span class="server_button">
DETAILS ▸
</span>
</h3>
<dl class="server_details">
<dt>Hostname:</dt><dd> web02.onr.example.com<
<dt>Service Tag:</dt><dd> JCQFZK1</dd>
<dt>Datacentre:</dt><dd> ONR</dd>
</dl>
Slide 30
$('.server_button').on(
'click'
,
function() {
$(this)
.parent().next()
.toggleClass('hide');
});
Slide 31
.server_button
:hover
{
background-color: #000;
color: #fff;
}
Slide 32
<h3 class="server">Blueberry
<span class="server_button">
DETAILS ▸
</span>
</h3>
<dl class="server_details">
<dt>Hostname:</dt><dd> web02.onr.example.com<
<dt>Service Tag:</dt><dd> JCQFZK1</dd>
<dt>Datacentre:</dt><dd> ONR</dd>
</dl>
Slide 33
<h3 class="server">Blueberry
<button class="server_button">
DETAILS ▸
</button>
</h3>
<dl class="server_details">
<dt>Hostname:</dt><dd> web02.onr.example.com</dd>
<dt>Service Tag:</dt><dd> JCQFZK1</dd>
<dt>Datacentre:</dt><dd> ONR</dd>
</dl>
Slide 34
<h3 class="server">Blueberry
<button class="server_button"
type="button">
DETAILS ▸
</button>
</h3>
<dl class="server_details">
<dt>Hostname:</dt><dd> web02.onr.example.com</dd>
<dt>Service Tag:</dt><dd> JCQFZK1</dd>
<dt>Datacentre:</dt><dd> ONR</dd>
</dl>
Slide 35
$('.server_button').on(
'click'
,
function() {
$(this)
.parent()
.next()
.toggle();
});
Slide 36
.server_button
:hover
{
background-color: #000;
color: #fff;
}
Slide 37
.server_button
:hover,
.server_button:focus
{
background-color: #000;
color: #fff;
}
Slide 38
.server_button:hover,
.server_button:focus {
background-color: #000;
color: #fff;
text-decoration: underline;
}
Slide 39
<h3 class="server">Blueberry
<button class="server_button"
type="button">
DETAILS ▸
</button>
</h3>
<dl class="server_details">
<dt>Hostname:</dt><dd> web02.onr.example.com</dd>
<dt>Service Tag:</dt><dd> JCQFZK1</dd>
<dt>Datacentre:</dt><dd> ONR</dd>
</dl>
Slide 40
<h3 class="server">Blueberry
<button class="server_button"
type="button">
Details ▸
</button>
</h3>
<dl class="server_details">
<dt>Hostname:</dt><dd> web02.onr.example.com</dd>
<dt>Service Tag:</dt><dd> JCQFZK1</dd>
<dt>Datacentre:</dt><dd> ONR</dd>
</dl>
Slide 41
<h3 class="server">Blueberry
<button class="server_button"
type="button">
Details ▸
</button>
</h3>
<dl class="server_details">
<dt>Hostname:</dt><dd> web02.onr.example.com</dd>
<dt>Service Tag:</dt><dd> JCQFZK1</dd>
<dt>Datacentre:</dt><dd> ONR</dd>
</dl>
Slide 42
<h3 class="server">
<button class="server_button"
type="button">
Blueberry
</button>
</h3>
<dl class="server_details">
<dt>Hostname:</dt><dd> web02.onr.example.com</
<dt>Service Tag:</dt><dd> JCQFZK1</dd>
<dt>Datacentre:</dt><dd> ONR</dd>
</dl>
Slide 43
Slide 44
<h3 class="server">
<button class="server_button"
type="button">
Blueberry
</button>
</h3>
<dl class="server_details">
<dt>Hostname:</dt><dd> web02.onr.example.com</
<dt>Service Tag:</dt><dd> JCQFZK1</dd>
<dt>Datacentre:</dt><dd> ONR</dd>
</dl>
Slide 45
<h3>
<button class="server"
type="button">
Blueberry
</button>
</h3>
<dl class="server_details">
<dt>Hostname:</dt><dd> web02.onr.example.com</dd>
<dt>Service Tag:</dt><dd> JCQFZK1</dd>
<dt>Datacentre:</dt><dd> ONR</dd>
</dl>
Slide 46
Slide 47
.server_button
.server:after {
content: 'Details \25B8’;
text-transform: uppercase;
speak: none;
background-color: #fff;
border-radius: 4px;
border: 0px none;
box-shadow: 0px -2px
rgba(0,0,0, 0.5) inset;
color: #4D4E53;
Slide 48
.server_button:hover,
.server_button:focus
.server:hover:after,
.server:focus:after {
/* same styles as before */
}
Slide 49
Slide 50
Slide 51
“…the time required to rapidly
move to a target area is a
function of the ratio between
the distance to the target and
the width of the target”
FITTS’ LAW
Slide 52
Slide 53
<span aria-hidden="true"
class="icon_check"></span>
<span class="offscreen">
This server is up:
</span>
Slide 54
<span
aria-hidden="true"
class="icon_check"></span>
<span class="offscreen">
This server is up:
</span>
Slide 55
.icon_check:before {
content: '\π3';
speak: none; }
.icon_times:before {
content: '\π5';
speak: none; }
Slide 56
<span aria-hidden="true"
class="icon_check"></span>
<span class="offscreen">
This server is up:
</span>
Slide 57
Slide 58
<span aria-hidden="true"
class="icon_check"></span>
<span
class="offscreen"
This server is up:
</span>
Slide 59
.offscreen {
position: absolute;
height: 1px;
width: 1px;
overflow: hidden;
clip: rect(1px 1px 1px 1px);
clip: rect(1px, 1px, 1px, 1px);
}
Slide 60
Slide 61
Slide 62
Slide 63
Slide 64
WHAT JUST HAPPENED?
- choose the right element
- use descriptive calls to action
Slide 65
WHAT JUST HAPPENED?
- choose the right element
- use descriptive calls to action
- make hit areas bigger
Slide 66
WHAT JUST HAPPENED?
- choose the right element
- use descriptive calls to action
- make hit areas bigger
- add visual cues
Slide 67
WHAT JUST HAPPENED?
- choose the right element
- use descriptive calls to action
- make hit areas bigger
- add visual cues in the CSS
- don’t just add visual cues
Slide 68
Slide 69
<h3>
<button class="server" type="button">
<span aria-hidden="true" class="icon_check" ></span>
<span class="offscreen">This server is up: </span>
Blueberry
</button>
</h3>
<dl class="server_details">
<dt>Hostname:</dt><dd> web02.onr.example.com</dd>
<dt>Service Tag:</dt><dd> JCQFZK1</dd>
<dt>Datacentre:</dt><dd> ONR</dd>
</dl>
Slide 70
<h3>
<button class="server" type="button">
<span aria-hidden="true" class="icon_check" ></span>
<span class="offscreen">This server is up: </span>
Blueberry
</button>
</h3>
<dl class="server_details">
<dt>Hostname:</dt><dd> web02.onr.example.com</dd>
<dt>Service Tag:</dt><dd> JCQFZK1</dd>
<dt>Datacentre:</dt><dd> ONR</dd>
</dl>
Slide 71
<h3>
<button
class="server" type="button">
<span aria-hidden="true" class="icon_check" ></span>
<span class="offscreen">This server is up: </span>
Blueberry
</button>
</h3>
<dl
class="server_details">
<dt>Hostname:</dt><dd> web02.onr.example.com</dd>
<dt>Service Tag:</dt><dd> JCQFZK1</dd>
<dt>Datacentre:</dt><dd> ONR</dd>
</dl>
Slide 72
<h3>
<button aria-controls="raspberry"
class="server" type="button">
<span aria-hidden="true" class="icon_check" ></span>
<span class="offscreen">This server is up: </span>
Blueberry
</button>
</h3>
<dl id="raspberry"
class="server_details">
<dt>Hostname:</dt><dd> web02.onr.example.com</dd>
<dt>Service Tag:</dt><dd> JCQFZK1</dd>
<dt>Datacentre:</dt><dd> ONR</dd>
</dl>
Slide 73
<h3>
<button aria-controls="raspberry"
aria-expanded="false"
class="server" type="button">
<span aria-hidden="true" class="icon_check" ></span>
<span class="offscreen">This server is up: </span>
Blueberry
</button>
</h3>
<dl id="raspberry" aria-hidden="true"
class="server_details">
<dt>Hostname:</dt><dd> web02.onr.example.com</dd>
<dt>Service Tag:</dt><dd> JCQFZK1</dd>
<dt>Datacentre:</dt><dd> ONR</dd>
</dl>
Slide 74
$('[aria-expanded]').on('click',
function() {
var id = $(this)
.attr(aria-contols);
/*
toggle values of
aria-expanded & aria-hidden
*/
});
Slide 75
<h3>
<button aria-controls="raspberry"
aria-expanded="false"
class="server" type="button">
<span aria-hidden="true" class="icon_check" ></span>
<span class="offscreen">This server is up: </span>
Blueberry
</button>
</h3>
<dl id="raspberry" aria-hidden="true"
class="server_details">
<dt>Hostname:</dt><dd> web02.onr.example.com</dd>
<dt>Service Tag:</dt><dd> JCQFZK1</dd>
<dt>Datacentre:</dt><dd> ONR</dd>
</dl>
Slide 76
<h3>
<button aria-controls="raspberry"
aria-expanded="true"
class="server" type="button">
<span aria-hidden="true" class="icon_check" ></span>
<span class="offscreen">This server is up: </span>
Blueberry
</button>
</h3>
<dl id="raspberry" aria-hidden="false"
class="server_details">
<dt>Hostname:</dt><dd> web02.onr.example.com</dd>
<dt>Service Tag:</dt><dd> JCQFZK1</dd>
<dt>Datacentre:</dt><dd> ONR</dd>
</dl>
Slide 77
.server_details[aria-hidden=true]{
display: none;
}
Slide 78
.server[aria-expanded=false]:after{
content: 'Details \25B8';
}
.server[aria-expanded=true]:after{
content: 'Details \25BE';
}
Slide 79
Slide 80
Slide 81
Slide 82
Slide 83
I LIKE TO MAKE WEBSITES
EVERYONE CAN USE
@stephaniehobson
stephaniehobson.ca
Slide 84
RESOURCES
- webaim.org
- wave.webaim.org
- alistapart.com/article/the-accessibility-of-wai-aria
- 24ways.org/2009/dont-lose-your-focus/
- blog.paciellogroup.com/2010/01/high-contrast-proof-css-sprites
- filamentgroup.com/lab/bulletproof_icon_fonts.html
- snook.ca/archives/html_and_css/hiding-content-for-accessibility
- snook.ca/archives/html_and_css/floated-label-pattern-css