Accessibility testing is an all too often forgotten part of test automation, typically left for the manual test team. Well now we can go back to our managers with some really great initiatives on how to save them time/money by automating these tests as well.
Focusing on it will not only help those with disabilities who use the application you're testing, but optimizing for accessibility will also make automated testing so much easier to accomplish and maintain for your app.
Test Automation and Selenium expert Manoj Kumar takes this in-depth look at accessibility testing, covering the essentials, including:
• What is Accessibility testing
• The Accessibility standards
• Different tools available to automate Accessibility testing
• How to automate Accessibility testing, and what resources are needed
• How to implement an effective Accessibility strategy within your organization
2. ABOUT ME
▸ Open source enthusiast
▸ Steering committee member - Selenium project.
▸ Organizer seleniumconf.com
▸ Author assertselenium.com
▸ Tweets: @manoj9788 | LinkedIn: manojkumar9788
▸ Accessibility enthusiast
2
3. LIST OF TOPICS TO BE COVERED
▸ What & Why of Accessibility testing
▸ Overview accessibility standards
▸ How & When’s of Testing for Accessibility
▸ Implementation strategy
▸ A11yTaaS (Accessibility Testing As A Service)
▸ a11y in Action
Accessibility Primer
3
4. STATS
About 20% of the world's population lives with some form of disability
4
5. ACCESSIBILITY
▸ Accessibility is about enabling people
▸ Disability only exists if we don’t provide ways to include people
▸ People have impairments NOT disabilities
WHAT?
TESTING APPLICATION WHETHER IT IS USABLE BY PEOPLE WITH DISABILITIES (EVERYONE)
5
15. WHY?
Accessible website yield a good SEO(Search Engine Optimization)
▸ No text in images
▸ Use <H> heading tags
▸ Meaningful contextual links
ACCESSIBILITY
information-technology-directory.co.uk
15
17. OVERVIEW - ACCESSIBILITY STANDARDS
WCAG 2.0 & GSA SECTION 508
▸ Web Content Accessibility Guidelines
▸ WCAG 1.0: May 1999. Superseded by WCAG 2.0
▸ WCAG 2.0: Dec 2008 - testable, technology agnostic.
▸ WCAG 2.1: (Working draft) accessible mobile devices, low vision, graphics
▸ General Services Administration Section 508 Standards
▸ United States Federal Act. Published in Dec 2000.
17
18. ▸ Level A - basic web accessibility features
▸ Level AA - deals with the biggest and most common barriers for
disabled users
▸ Level AAA – the highest level of web accessibility
SUCCESS CRITERIA
Refer: https://www.w3.org/TR/WCAG20/
18
21. DEVELOP FOR THE FUTURE
Microsoft Inclusive Design Toolkit
21
22. ARIA ATTRIBUTES
ARIA is a set of attributes that you can add to HTML elements.
These attributes communicate role, state and property semantics to assistive
technologies via the accessibility APIs implemented in browsers.
22
24. There is no substitute for real user feedback.
You need to include people with disabilities to Test.
MANUAL - ACCESSIBILITY TESTING 24
25. WHAT YOU CAN DO?
‣ Tab through a page with keyboard
DEMO: Try only to tab through
https://www.ssa.gov/
https://www.delta.com/
MANUAL - ACCESSIBILITY TESTING 25
26. ‣ Use screen reader for testing
▸ Screen readers use Heading structures to get an overall understanding of the page.
JAWS, NVDA
VoiceOver
OS X
ChromeVox Speak Screen Talk BackFang’s
WHAT YOU CAN DO?
MANUAL - ACCESSIBILITY TESTING 26
27. WHAT YOU CAN DO?
▸ Headings and Semantics
▸ Firefox web developer plugin
MANUAL - ACCESSIBILITY TESTING 27
31. WHAT YOU CAN DO?
▸ Browser Plugins
▸ Chrome Accessibility Inspection
▸ Computed Text
▸ Aria labels
▸ Roles
▸ Form criteria
MANUAL - ACCESSIBILITY TESTING 31
32. WHAT YOU CAN DO?
▸ Visual Testing is important for Accessibility to check if the
appear correctly on different browsers and OS
▸ Web driver css, Applitools(recommended)
▸ Simulate colour blind and check your apps
▸ Nice to have - hoping to see in Applitools, more native
with test automation.
MANUAL - ACCESSIBILITY TESTING 32
34. HOW FAR IS IT HELPFUL ?
Tests can roughly catch upto 30% of a11y issues,
depending on the audit rules.
AUTOMATING ACCESSIBILITY CHECKS
*Something is better than Nothing*
34
37. ACCESSIBILITY - WEBDRIVER
WebDriver is a human-centric user-friendly bot.
WebDriver won't interact on elements that are hidden on the DOM
and can work only with elements that are visible to the human eye
Which means you are already testing for accessibility.
37
38. USE CASES
▸ Drive tests with Accessibility in mind
▸ WebDriver tests with images, animations turned off
▸ Tab through only tests flow
▸ Start to scope functional tests that navigate using only the keyboard
Report this message sent from Matt Brandt
Delete this message sent from Matt Brandt
ACCESSIBILITY - WEBDRIVER 38
52. import {expect} from 'chai';
import App from '../app/components/App';
import a11yHelper from "./a11yHelper";
describe('Accessibility', function () {
this.timeout(10000);
it('Has no errors', function () {
let config = {};
a11yHelper.testEnzymeComponent(
<App/>, config, function (results) {
expect(results.violations.length).to.equal(0);
});
});
});
ACCESSIBILITY - DEVELOPER-ENZYME-TESTS 52
53. ‣ Pa11y dashboard => pronounce as ‘pally’
‣ Helps you run Accessibility testing as a service
GNU GPL License
Allowed to share, modify the software.
ACCESSIBILITY TESTING AS A SERVICE 53
54. Using Pa11y dashboard and Mongodb on a Docker
container
ACCESSIBILITY TESTING AS A SERVICE 54
58. HOW CAN I IMPLEMENT A11Y STRATEGY IN MY
ORGANISATION?
Thumb Rules
➤ No single person can ensure an app is accessible on their own.
➤ Adopting Accessibility mindset takes time organisation wide.
➤ Develop Accessibility as a Culture
58
59. Involve people with disabilities early and understand
problem space and design per digital world resolving
those problems and thus meet business goals(those
20%)
STRATEGY
59
60. STRATEGY
➤ Establish an Org commitment with key stakeholders responsible for Accessibility.
➤ A checklist/questionnaire to include Accessibility for both new and existing apps
➤ Establish a benchmark (Say Level A, AA )
➤ Establish a standards for UX designers, (UI)Developers & Testers
➤ Start As early as possible from UX GEL(Global Experience Language)
➤ Color contrast
➤ Inclusive design ethos
➤ Conduct usability, User testing session outside org.
60