Professional Documents
Culture Documents
Basic Accessibility & Testing
Basic Accessibility & Testing
Judy Hueman
Accessibility Improves People's Lives
• Accessible designs make life easier for Accessible websites/apps let people
people with disabilities
• Do their jobs
• Or, in some cases, it's even more dramatic: • Conduct their personal banking
accessibility makes things possible that
would be otherwise literally impossible. In • Make restaurant reservations
this sense, accessibility isn't just nice to • Access government benefits
have, it's necessary
• Apply for college
• Shop online
• Read the news
• Play online games... and anything
else that is available on the web
Different types of disabilities
needs different types of
design and code
Perceptual/Motor
• Low-Vision
• Color-Blindness
• Deaf/Deaf-Blindness
• Blindness
• Physical or Motor Disabilities
Other
• Autism/ADD
• Anxiety
• Dyslexia/Reading Disabilities
• Seizure Disorders
Digital accessibility
What is Digital Accessibility?
• Development of systems and applications
flexible enough to accommodate the needs of
the broadest range of users... regardless of
age or disability ...so that everyone can have
the same user experience when they access
these types of digital components
• Supports
• Search engine optimization
• Internationalization
• Mobile-friendly content
• Estimated 10-20% of the World’s population
has a disability
• Hard-of-hearing
• Loss of hearing in the high
frequency range
• A person who stutters A person who is non- A person sick with A person in a quiet room
verbal laryngitis in a library
SIMON Low Vision
COMMON INTERACTIONS
- Financial software
- Social media
- Online shopping
- Uses both mouse and - Content is not lost when zoomed in highly
-
keyboard to navigate
Uses software that
- High contrast to make reading easier on the eyes
COMMON INTERACTIONS
- Coding software
- Forums
• Is • Pass
• Vital • Pass
publish all information
on web pages
! HTML
bury information
in downloads
!
• When • Fail use a combination
Start !
only use colour to
of colour, shapes convey meaning
and text
• Color • Fail
! !
follow a linear, spread content
logical layout all over a page
• Contrast • Fail
put buttons and separate actions Submit
notifications in from their context
You can use the contrast checker to check both text and graphical objects contrast. context Submit
https://webaim.org/resources/contrastchecker/
This work is licensed under the Creative Commons Attribution-
NonCommercial-ShareAlike 4.0 International License. To view a copy of
For more information, contact:
Digital, Data and Technology this license, visit http://creativecommons.org/licenses/by-nc-sa/4.0/. access@digital.homeoffice.gov.uk
Color Contrast
Text with almost exactly 4.5:1 contrast
Using Color
Do not use color only to convey meaning
Designing for users with
low vision !
Do… Don’t…
The green mushrooms are OK to eat.
The red mushrooms will kill you. use good colour
contrasts and a
readable font size
Aa use low colour
contrasts and small
font size
Aa
The mushrooms with checks are OK to eat. 200% magnification 200% magnification
! !
follow a linear, spread content
The mushrooms without checks will kill you. logical layout all over a page
This work is licensed under the Creative Commons Attribution- For more information, contact:
NonCommercial-ShareAlike 4.0 International License. To view a copy of
Digital, Data and Technology this license, visit http://creativecommons.org/licenses/by-nc-sa/4.0/. access@digital.homeoffice.gov.uk
Color Only Color + Icon
• People with low vision will start at top left of the page and orient
themselves and move through rest of the content of the page.
• STRAW test/Zoom 200-400%
publish all information
on web pages
! HTML
bury information
in downloads
!
use a combination only use colour to
of colour, shapes Start ! convey meaning
and text
! !
follow a linear, spread content
logical layout all over a page
This work is licensed under the Creative Commons Attribution- For more information, contact:
NonCommercial-ShareAlike 4.0 International License. To view a copy of
Digital, Data and Technology this license, visit http://creativecommons.org/licenses/by-nc-sa/4.0/. access@digital.homeoffice.gov.uk
ANGIE Deaf
COMMON INTERACTIONS
- Social media
- Online shopping
-
-
Medical Coder
- Audio or video with captions and transcription
Have work colleagues talk to Siri
on her smartphone to type out - Simple and concise language, short sentences
-
what they say so she can read it
Relies on sign language - Clear start/stop/pause UI
interpreter when attending
meetings or watching public
speaking
- Avoid jargon and idioms as English is a second language for deaf people
Designing for users who are
Make sure users know what's
on the page
D/deaf or
hard of hearing
!
Do… Don’t…
• Make the content and functionality available
through sight, sound, and touch write in
Do this.
use complicated
words or figures
!
plain language
of speech
COMMON INTERACTIONS
- Social media
- No time limits
Physicist Stephen Hawking
Degenerative Neuromuscular Disease ALS (Amyotrophic Lateral Sclerosis)
• Stephen Hawking used a computer to help him speak, write, and interact
with the world. He had a sensor hooked up to his glasses that detected
movements in his cheek.
All my life I have sought to understand the universe and find answers [...] I
have been very lucky that my disability has not been a serious handicap.
Indeed, it has probably given me more time than most people to pursue the
quest for knowledge."
Everything has to work
• The goal of operability is to ensure that web components work.
• All features—particularly navigation and dynamic or interactive components—must be
functional, no matter what input device a person is using
• An accessible web app must work with all of the input devices:
• Mouse or touchpad
• Keyboard
• Touchscreen
• `Voice recognition software
• Other specialized input devices (most of which emulate the keyboard or mouse)
Designing for users with
• When you make things accessible with a keyboard, make large Yes demand No
you make it work for everyone clickable actions precision
• Adjust
• The user is allowed to adjust the time limit before
encountering it over a wide range that is at least ten times
the length of the default setting
• Extend
• The user is warned before time expires and given at least
20 seconds to extend the time limit with a simple action
(for example, “press the space bar”), and the user is
allowed to extend the time limit at least ten times
MARY Legally Blind
COMMON INTERACTIONS
- Online shopping
- Uses keyboard short - Content that is scannable and understandable via screen reader
-
cuts
Likes navigating by
- To skip around repetitive lists (like menu)
headings, landmarks,
and links.
Screen Readers
Convert text on into spoken words
• Listening is reading
• Experience what is
it like to use a
screen reader:
https://
www.youtube.com/
watch?
v=qL4shFJHOvc
• Note: Experienced
screen readers
often turn up the
speed on their
screen readers
Designing for users of
Make Dynamic Content Perceivable screen readers ! !
• Blind users won't know when content or state changes Do… Don’t…
on the page unless the system lets them know
<alt>
only show
and provide information in an
Applications") to announce when a tab is transcripts
for video
image or video
"expanded" or "collapsed"
! spread content
all over a page
!
structure content
<h1> rely on text size 36pt, bold
<nav> and placement
<label>
for structure Header
message or a confirmation message—blind users need
to hear this new information
This work is licensed under the Creative Commons Attribution- For more information, contact:
NonCommercial-ShareAlike 4.0 International License. To view a copy of
Digital, Data and Technology this license, visit http://creativecommons.org/licenses/by-nc-sa/4.0/. access@digital.homeoffice.gov.uk
MAUREEN Cognitive Disabilities
COMMON INTERACTIONS
- Complex language
can sometimes be a
challenge in reading
Designing for users on the
Autism autistic spectrum
• Common Interactions
• A need to focus on most important thing
• Needs
• Distraction Free Layout
• Avoid animations and auto updating content
• Give the user control over what they can show or not
• Findability
• Consistent navigation
• Relevant Autosuggestion when searching help
• Clear Instructions and Error Handling
• To avoid time limitations
Designing for users with
Anxiety anxiety
Do… Don’t…
• Timing is everything. Make sure your timing
is long enough to allow users to complete an give users enough
time to complete
rush users or set
impractical time
1 2
leave users
!
use images use large
! !
put too much
the contrast be- information in
tween background one place
and text
• Parallax effect may cause headaches • Allow users the choice to turn
animations off
• Flashing content can trigger seizure
• Make sure your site or app doesn’t
• More than 3 times in any one-second period rely on animation
• We can determine:
• If inputs have associated labels
• If images have alt text defined
• If the color contrast is enough for the font-size
• If the code is well-formed
Most Accessibility issues are Subjective
• Do the labels for inputs accurately describe the inputs they are associated with?
• Do informational images have alt text that realistically describe the images?
• Do the link texts make sense? Will the user know where the links will lead them?
• Can a user navigate a page using only their keyboard in a consistent and
understandable manner?
• The discoveries testers make should provide developers and designers with
recommendations, so improvements can be made to the overall user experience
of the product, application, or web site.
• Usually, all of the pages on the website do not have to be tested as long as the pages selected
are representative of the entire site. However, how big the sample needs to be will vary from
just a few to several dozens or hundreds, depending on the size of the website and the budget.
Scope in order of priority
Weigh and prioritize based on frequency/criticality of use
• Manual Tests: Following the suggested methodologies in this section, go through a series of tests using different
tools to find issues in the page or application that is being tested. The recommended routine for manual testing is:
1. Input: Keyboard
2. Input: Touch
3. Visual Presentation
4. Alternative Text
7. Forms
8. Dynamic Content
9. Custom Widgets
Document, Remediate, and Regression Testing
3. Document All Findings in an Accessibility Report Format
Bring all the findings together into a comprehensive and usable format that
allows stakeholders to remediate the issues found based on
recommendations provided.
Descriptive Title Provide a descriptive title that identifies the accessibility issue
Detail the expected behavior, what a user expects to happen upon interaction with
Expected Results
content
Platform and AT Identify the platform and any assistive technology used in discovering the issue
Identify the level of impact (e.g., Critical, Serious, Moderate, Minor); Often used to
Impact/Severity
prioritize and triage fixes
Include specifics needed to reproduce the issue, including step-by-step instructions and
Steps to Reproduce
credentials that should be used to reproduce the issue
Provide a screenshot with visual indicators, video recording of the accessibility issue, or
Visual or Video
even a code snippet of where the issue occurs
Remediation Whenever possible, try to include recommendations for fixing the issue
Bad Bug Report
Descriptive Title Visual Focus Indicator
The visual focus indicator disappears
Issue Description
when tabbing through the web page.
The visual focus indicator should always
Expected Results
be visible.
Platform and AT
Impact/Severity
Steps to Go to MarsCommuter and tab through
Reproduce the web page.
Visual or Video
Make sure visual focus indicator can be
Remediation
seen as users tab through the web
page.
Good Bug Report
Descriptive Title Visual focus indicator disappears in the Booking widget
When a user tabs through the Booking widget on MarsCommuter home
Issue Description page, the visual focus indicator is lost after tabbing through the
Departure Dates form fields.
When a sighted keyboard user tabs through the widget, the user should
Expected Results
be able to see where the keyboard focus is within the widget at all times.
Platform and AT
Impact/Severity Critical (Prevents sighted keyboard users from interacting with web page)
1. Go to the MarsCommuter home page.
2. Place keyboard focus in the From field in the Booking widget.
Steps to Reproduce 3. Tab through the rest of the fields.
4. Visual focus disappears after the form field where users select the
time.
Screenshot of where the visual focus indicator is last seen in the Booking
Visual or Video
widget on MarsCommuter
Check that the CSS outline property is not disabled through outline:
none; or outline: 0; after users tab from the Departure Dates fields. Visual
Remediation
focus indicator must follow the keyboard focus throughout the widget
and the web page.
Testing Tips
• WAVE or Axe DevTools is a good first step but be aware it won’t catch everything.
• Look at your HTML without CSS styling. Does it still make sense?
• Can you identify relationships and importance of items without any other styling or markup?
• Test with your keyboard
• Pretend you lost your mouse and can only use your keyboard. (But you still have your eyes)
• Tab through your finished work, use the arrow and enter keys to make sure all your form
fields and buttons/links work.
• Can you get to everything you need to easily with just the keyboard (remember you can still
use your eyes.)
• How frustrating is it to have to move back and forth with the keyboard only?
Testing Tools
• Make multimedia accessible: Have a plan for the media creators to have plans
in place to include captions and transcripts for each video, audio, or animated
media.
• Include people with disabilities: Include them user research, testing, personas,
and scenarios.
Assistive Technology
Screen Readers
• MacOS VoiceOver • For others, see American Foundation for
the Blind: Screen Readers
• Apple > System Preferences >
Accessibility > Check Enable • 3 basic modes
VoiceOver (or in future use keyboard
Command + F5) • Say everything: top to bottom of page
• Windows • Traditional keyboard nav, tab and
arrow
• NVDA (Free) or JAWS
• Filtered movement: uses hotkeys
• Microsoft Narrator (press F to go from form to form) —
links list, forms list, buttons list
• Linux/Unix
• Screen reader short cuts: https://
• BRLTTY dequeuniversity.com/screenreaders/
Screen Magnifiers
• Perceivable
• All labels must be programmatically associated with the input field [WCAG 1.3.1
A]
• Labels must be closely and visually associated with the input field [Best Practice]
• Error Messages must be associated with the input field [WCAG 1.3.1 A]
• Do not use color alone to indicate differences between fields [WCAG 1.4.1 A]
• Required/Optional fields, Error fields
• Color contrast between controls, labels, instructions, errors, and the background
must be sufficient [WCAG 1.4.3 AA]
Commonly Violated WCAG 2.0 (A, AA) Success Criteria
• Operable
• Error Messages that apply to the whole form must be announced automatically [WCAG
2.4.3 A]
• If you take action that allows the sighted mouse user to quickly identify and deal with fields
that are in error, then an equivalent mechanism should be provided for keyboard users
[WCAG 2.1.1 A]
• Understandable
• On focus [ WCAG 3.2.1 A ]
• On input [ WCAG 3.2.2 A ]
• Error suggestion [ WCAG 3.3.3 AA ]
• Error prevention (Legal, Financial, Test Data) [ WCAG 3.3.4 AA ]
• Robust
• Name, Role, Value, and State [ WCAG 4.1.2 A ]
How to Code Labels for Inputs
• Simple Labels
• Use for-id association
<label for=“myinputID”>Label Text</label> <input id=“myinputID” type=“text” />
• Use aria-labelledby
<label id=“mylabelID”>Label Text</label> <input aria-labelledby=“mylabelID” type=“text” />
OR
</fieldset>
Common States and Properties 1
• aria-describedby – References the id of another • Do use with aria-required to set aria-invalid to
element that offers a description signal there is an error
• Do use when adding more information to a • Don’t use before the user has had a chance to
form input move through that area of the form.
• Don’t use to add the label already associated • Use with aria-errormessage
to the input
• aria-hidden - Hides the information from screen
• aria-disabled – Indicates the element is readers. Whatever is in the element and its
perceivable, but not editable or operable descendants are hidden from assistive
technology
• aria-errormessage – References another
element via its id that contains custom error • Do use when you are showing something
message text visually that isn’t useful to screen readers
(such as * for required)
• Must be used in conjunction with aria-invalid
• Don’t use to hide whole areas of a page. We
• aria-invalid – Indicates entered data does not don’t want separate and not equal.
conform to the format expected
Common States and Properties 2
• aria-label – A string values that labels the • Assertive – AT notifies immediately
element
• Note: aria-live can only be used on an element
• Do use when adding more information for that is in the DOM upon screen load. We can’t
assistive technologies load something conditionally after the page
has loaded and expect that aria-live will work
• Don’t use to reference the same information
already available on the screen. (use aria- • aria-modal – Indicates the presence of a modal
labelledby with the id instead) element
• aria-live – Indicates the element will be updated • aria-required – Alerts the screen reader that the
and describes the type of updates the user can information is required
expect from the live region
• aria-selected – Indicates the selected state
• Values are expressed in degrees of (single and multi select widgets)
importance.
• aria-readonly – Indicates an element is not
• Polite – AT will notify but doesn’t interrupt the editable. User can read but not set the value of a
current task widget.
ARIA Basics
• Don’t have the cursor stay on a button after it is clicked. A non-sighted user
has no idea anything has changed.
• When something happens on an event, move the cursor to the area where
that happens: move the focus.
In a Nutshell: Designing for Accessibility
• When communicating with colors for status or • Make sure your site or app doesn’t rely on
differentiation, do NOT rely on color only. Use animation
size, shape, patterns to show difference.
• Dissolve effect is better than sliding effect
• Always test for contrast esp. for text vs.
background colors. • Flashing content can trigger seizure
• https://webaim.org/resources/ • Group related items together to show the
contrastchecker/ relationship between them
• [ Not H1-H6 etc ] Headings are not read by screen readers in a form
• When displaying form information that isn’t editable but you wish for the screen reader to
view, use a definition list: <dl><dt>Label</dt><dd>Input Value</dd></dl>
• We can and should use <th scope=“row”> on tables if the first column provides identifiable information.
<tbody><tr><th scope=“row”> is acceptable HTML structure.
WAI-ARIA
• We typically use it to insert attributes into the HTML in order to give screen
readers more information
• <ul role=“menu">
<li><a role=“menuitem”>Item</a></li>
</ul>
The role here is a promise that the author has incorporated JavaScript that
provides the keyboard interactions expected for both a menu and
menuitem.
ARIA Roles
• We use roles to tell user agents what we are going to accomplish. It lets a user agent have specific
expectations.
• Add roles that duplicate structural HTML or override inherent existing structures
• Bad
• <form role=“form”>
• <td role=“cell”>
• <ul role=“button”>
Cloaking
• The information assistive technologies need about the meaning and purpose of user
interface elements is called accessibility semantics.
• From the perspective of assistive technologies, ARIA gives authors the ability to dress up
HTML and SVG elements with critical accessibility semantics that the assistive
technologies would not otherwise be able to reliably derive.
• Some of ARIA is like a cloak, it can override or cover up the original semantics or content.
<a role="menuitem">Assistive tech users perceive this element as an item in a menu and
not a link.</a>
<a aria-label="Assistive tech users can only perceive the contents of this aria-label, not the
link text">Link Text</a>
Danger of ARIA
• Use a combination of aria attributes and HTML, hiding items both visually or
aurally from both the visual rendition or from screen readers to achieve the best
accessibility we can.
• Use aria only when you can’t achieve the same outcome using structural HTML
Common States and Properties
• Properties: Attributes that are essential to the nature of an object or represent a
data value associated with the object
• Think opening and closing an accordion or filter block. Both of these need an aria
state that tells a user whether it is expanded or closed.
• Properties are less likely to change than a State, but they can and should when
appropriate.
• There are a whole lot of states and properties in aria, that judiciously used will
enhance accessibility. They are especially useful in components that are not part of
the inherent browser ecosystem such as a multi-select or auto suggest component.
Color Contrast and Color
Blindness
https://webaim.org/resources/linkcontrastchecker/
https://webaim.org/resources/contrastchecker/
https://contrastchecker.com
https://contrast-ratio.com
http://contrast-finder.tanaguru.com/
https://developer.paciellogroup.com/resources/contrastanalyser/
https://material.io/color/ Color Contrast iOS App
Chrome Plug In
https://colororacle.org/
https://venngage.com/blog/color-blind-friendly-palette/