Introduction to
Web Accessibility
and
Inclusive Design
Agenda
6:10 - What Is Accessibility & Inclusive Design?
6:40 - Assistive Technology Demo (Interactive)
7:00 - How Do I Build and Evaluate Inclusive Websites?
7:40 - BREAK
7:45 - How Do I Improve My Code for Accessibility?
8:45 - What Can I Do With My New Knowledge?
Define
Web Accessibility
“Web accessibility means that people with disabilities can perceive, understand, navigate and interact with the Web,
and that they can contribute to the Web.”
“Inclusive Design is design that considers the full range of human diversity with respect to ability, language, culture,
gender, age and other forms of human difference.”
“The power of the Web is in its universality. Access by everyone regardless of disability is an essential
aspect”
Tim Berners-Lee, W3C Director and inventor of the World Wide Web
Using An
Inclusive Strategy When Building Products
“...By thinking inclusively from planning, through prototyping, to production, you can cast a much wider net.
That means more, and happier, users at very little if any more effort ... Inclusive design is the means and accessibility
is the end — and you get a lot more than accessibility along the way.”
Heydon Pickering, author, 'Inclusive Design Patterns'
Accessibility In The Workplace
It's The Law
Accessibility In The Workplace
The
Americans With Disabilities Act (ADA) requires that individuals with disabilities must have access to online
tools.
Section 508 requires that all federal government online resources be accessible (includes organizations
that receive federal funding)
The
Web Content Accessibility Guidelines (WCAG) 2.0 covers a wide range of recommendations for making Web content
more accessible.
Once installed a "W" icon will appear in the browser toolbar. Press the icon to run an audit of the page.
Browser Plugins for Accessibility Testing
aXe is an open-source rules library for accessibility testing that allows you to evaluate the current state of a page without reloading its contents. (Chrome, FireFox)
tota11y is an open source accessibility visualization toolkit from Khan Academy which can be added to your codebase and run locally during development.
Run the audit on the website you already manually tested.
Review the results to find additional issues.
What new issues did the accessibility checkers catch?
Accessibility
Quick Wins
Set the language attribute
Have a descriptive title
Appropriate alt text for images
Validate your code
Check color contrast
HTML language attribute
Specifying the language of the page tells the screen reader how to pronounce the words.
If you don't specify, the screen reader will use the user's default language, meaning potential mispronunciations.
<html lang="en">
HTML language tags (video)
Include a descriptive title
It's surprisingly easy to forget to include a title tag in the head of your webpage.
<head>
<title>The Funion - Front Page</title>
</head>
Make sure it accurately and concisely describes the content of the page. This way it's easier for users to find your website when multiple tabs or windows are open.
Other places for descriptive text
While you're at it, check the following elements to make sure their text or labels accurately describe their function out of context.
links
headers
buttons
Alt Tags Best Practices
The alt attribute specifies alternative text for an image that convey the same thing as the image.
Alt tags are also important for Search Engine Optimization (SEO) and when your images don't load.
If an image is purely decorative, set an empty alt tag and screen readers will ignore that element.
Logos are not just decorative, so include the name represented by the logo.
Avoid redundant phrases like "image of".
Alt Tag Examples
<img src="pup.jpg"/> <-- No alt-tag; Inaccessible -->
<img src="pup.jpg" alt=""/> <-- Decorative, ignored by screen readers -->
<img src="pup.jpg" alt="puppy"/> <-- Better -->
<img src="pup.jpg" alt="Dalmation puppy playing fetch"/> <-- Best -->
Valid code is accessible code!
Accessibility checkers can catch invalid HTML like:
id attributes must be unique.
If you're using tables, include table headers <th>
Wrap list items in ordered or unordered list tags. <ul><li></li></ul>
Color
Contrast
Your pages need sufficient contrast between
foreground (text or graphics) and the
background.
4.5:1 contrast ratio for for normal text
3:1 constrast ratio for large text (greater than 18pt)
What are some quick fixes we can make to this website to resolve some of the issues found by the accessibility checker?
Set the language attribute
Have a descriptive title
Appropriate alt text for images
Validate your code
Check color contrast
Semantic HTML
Semantic HTML Elements communicate meaning, content and structure to the browser and the developer.
<body>
<h1>Page Header</h1>
<h2>I am a subhead.</h2>
<button>Click me!</button>
</body>
Non-Semantic HTML
Non-semantic HTML Elements communicate less meaning to the browser, screen reader or other assistive device.
<div>
<div class = "header">Page Header</div>
<span class = "subheading">I am a subhead.</span>
<span class = "my-button">Click me!</span>
</div>
Accessibility API
Assistive devices have an
accessibility API as part of their operating system. The API translates a web page into something that can
be interpreted by screen readers.
Screen readers can easily read and interpret semantic HTML elements.
Non-semantic HTML elements convey
no information to the accessibility API.
Semantic Landmarks
Semantic HTML can help you logically order your page.
Using landmarks will also help your screen reader users navigate your page more quickly.
HTML5 includes semantic elements such as: nav, main, aside, footer.
For older broswers that do not support HTML you can assign roles to your divs: <div role="nav" class="navbar">
How can you refactor the code to include more semantic HTML elements?
Replace non-semantic divs with native HTML elements.
Use HTML5 landmarks or roles.
Order headings appropriately.
Label form elements.
Going Deeper:
Advanced Accessibility Concepts
Accessible Rich Internet Applications (ARIA)
If you are using non-semantic HTML to structure your webpage, ARIA can modify existing element semantics, or add
semantics where no native semantics exist. (
Source)
In other words, ARIA helps screen readers decipher Web content.