The document discusses the importance of web accessibility, highlighting that a significant portion of the global population has disabilities that hinder their online experience. It introduces WAI-ARIA (Web Accessibility Initiative - Accessible Rich Internet Applications) as a solution to improve accessibility for dynamic content and widgets by providing semantic roles, states, and properties. Key rules for using WAI-ARIA effectively are outlined, emphasizing the necessity of native HTML elements and keyboard accessibility for interactive components.
An introduction to WAI-ARIA and its relevance to web accessibility, presented at Global Accessibility Awareness Day in May 2017.
Tim Berners-Lee emphasizes universal access. 1 billion people have disabilities, and 54% of adults have some form of disability.
People with disabilities control $200B in disposable income, highlighting the importance of accessible web design for businesses.
Older Baby Boomers experience accessibility barriers, with 90% of websites being inaccessible and common barriers including inadequate markup and poor color contrast.
The need for keyboard input in web applications to enhance accessibility for users with disabilities.
Accessibility leads to a larger customer base, efficient code, improved maintenance, device compatibility, faster loading, and social responsibility.
Discusses the limitations of HTML for dynamic content and the problems Assistive Technologies face, establishing the need for WAI-ARIA.
How ARIA improves web access for assistive technologies, including defining roles and properties for custom widgets.
Explains common ARIA roles and best practices for using HTML elements, ensuring accessibility and semantic clarity.
Key rules for ARIA usage, emphasizing the importance of accessibility names and appropriate markup without compromising native semantics.
The document outlines important ARIA attributes like aria-live and guidelines for effective usage and testing of ARIA elements.
Recommendations for using ARIA cautiously, relying on native HTML elements, and summarizing key points before concluding the presentation.
Credits to contributors, bibliography, and links to various resources related to web accessibility.
Explores various ARIA value types, including states represented as true/false, and discusses tabindex for programmatic focus in navigation.
“The power ofthe 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
4.
> 1 BPeoplehave a disability in the World*
Hearing impaired: 360M / Vision impaired: 285M / Cognitive: 194M
Physical impairment: 13M / Other (Depression, Alcohol, Dementia): 148M
source: http://www.who.int/mediacentre/factsheets/fs352/en/
5.
54%Have some formof disability
The Myth of Minority
Source: PEW internet project
… a problem...
HTML has a very limited set of interface controls and interactions.
Built-in tags without semantically describe these kinds of widgets, using generic
elements such as <div> and <span>
19.
...
Dynamic content ona web page can be particularly problematic for users who,
for whatever reason, are unable to view the screen.
JavaScript provides us many things including:
Dynamic interactions, i.e.: drag and drop, resizing, hide and show, open and
shut, switch views etc.
Widgets and components, i.e.: modals, in-page tabs, date pickers, page
loaders, sliders etc.
20.
... at theend the root cause is:
a lot of dynamic interactions and widgets are problematic for Assistive
Technologies (i.e.: screen reader)
21.
… an problematicexample ...
<ol>
<li id="ch1Tab">
<a href="#ch1Panel">Chapter 1</a>
</li>
<li id="ch2Tab">
<a href="#ch2Panel">Chapter 2</a>
</li>
<li id="quizTab">
<a href="#quizPanel">Quiz</a>
</li>
</ol>
<div>
<div id="ch1Panel">
Chapter 1 content goes here
</div>
<div id="ch2Panel">
Chapter 2 content goes here
</div>
<div id="quizPanel">
Quiz content goes here
</div>
</div>
Tabs widget without ARIA labeling:
no information in the markup to describe the widget's form and function.
22.
Look & Feelproblems
Widgets built this way are rarely keyboard accessible.
The role of the widget, what it does, is not available to assistive technology.
States and properties of the widget are not available to assistive technology.
Updates, and discovery of the updates are not reported to assistive
technology.
23.
… and theproblem continuing ...
Users might recognize it visually, but
there are no machine-readable
semantics for an assistive
technology.
24.
That’s where ARIA
comesin.
Web Accessibility Initiative - Accessible Rich Internet Applications
It helps with dynamic content and advanced user interface controls developed
with Ajax, HTML, JavaScript, and related technologies.
25.
WAI-ARIA
“WAI-ARIA is aspecification that
provides a means of describing
roles, states, and properties for
custom widgets so that they are
recognisable and usable by
assistive technology users.
WAI-ARIA also provides a
mechanism to ensure that users of
assistive technologies are aware of
updates in the application.”
Gez Lemon
on Dev.Opera.com
August 1st, 2008
26.
ARIA role=“*” (mostcommon)
http://w3c.github.io/aria-in-html/#aria-roles
the value of role have the priority on
native value
The values are standard and
automatically translated by the
assistive technology.
From W3C page:
The roles defined in this specification include a
collection of document landmarks and the WAI-
ARIA role taxonomy.
Rule #1
If youcan use a native HTML element
or attribute with the semantics and
behaviour you require already built in,
instead of re-purposing an element
and adding an ARIA role, state or
property to make it accessible, then
do so.
31.
Rule #2
Do notchange native semantics,
unless you really have to.
For example: Developer wants to
build a heading that's a button.
Do not:
<h1 role=button>heading button</h1>
Do:
<h1><button>heading button</button></h1>
or
<h1>
<span role=button>heading
button</span>
</h1>
32.
Rule #3
All interactiveARIA controls must be usable
with the keyboard.
If you create a widget that a user can click or
tap or drag or drop or slide or scroll, a user must
also be able to navigate to the widget and
perform an equivalent action using the
keyboard.
All interactive widgets must be scripted to
respond to standard key strokes or key stroke
combinations where applicable.
For example, if using role=button the element must
be able to receive focus and a user must be able to
activate the action associated with the element using
both the enter (on WIN OS) or return (MAC OS) and
the space key.
33.
Rule #4
Do notuse role="presentation" or aria-
hidden="true" on a visible focusable element .
Using either of these on a visible focusable
element will result in some users focusing on
“nothing”.
If an interactive element cannot be seen or
interacted with, then you can apply aria-hidden.
Do not:
<button role="presentation">press
me</button>
or not:
<button aria-hidden="true">press me</button>
Do
button {visibility:hidden}
<button aria-hidden="true">press me</button>
If an interactive element is hidden using display:none, it will also be removed from the accessibility tree,
which makes the addition of aria-hidden="true" unnecessary.
34.
Rule #5
All interactiveelements must have an
accessible name.
An interactive element only has an accessible
name when its Accessibility API accessible
name (or equivalent) property has a value.
For example, the first input type=text in the code
example aside has a visible label 'user name' ,
but no accessible name:
Do not:
User name <input type="text">
Or
<label>User name</label>
<input type="text">
Do:
<label>User name <input type="text">
</label>
<label for="userName">User
name</label>
<input type="text" id="userName">
aria-live
Dynamic information, couldcreate two
problems:
1. screen reader don’t understand when a
content is loaded
2. screen reader can focus only one part of
the document, the risk of missing the
update is high
Attribute aria-live notify the screen reader when
the content is updated.
Use it for any page regions need to be updated
after the first load
use attribute aria-live on any HTML element, i.e.:
<div aria-live=”off”>
<!--content-->
</div>
38.
aria-live’s values:
off (default):
Updatesto the region will not be presented to the user unless the assistive technology is currently
focused on that region. For info not critical to use
polite:
(Background change) Assistive technologies SHOULD announce updates at the next graceful
opportunity, such as at the end of speaking the current sentence or when the user pauses typing.
assertive:
This information has the highest priority and assistive technologies SHOULD notify the user
immediately. Because an interruption may disorient users or cause them to not complete their
current task, authors SHOULD NOT use the assertive value unless the interruption is imperative.
https://www.w3.org/TR/wai-aria/states_and_properties#aria-live
aria-labelledby
The aria-labelledby attributecontains the
element IDs of labels in objects such as input
elements, widgets, and groups. The attribute
establishes relationships between objects and their
labels.
Assistive technology, such as screen readers, use
this attribute to catalog the objects in a document so
that users can navigate between them. Without an
element ID, the assistive technology cannot catalog
the object.
The aria-describedby attribute is used to indicate
the IDs of the elements that describe the object. It is
used to establish a relationship between widgets or
groups and text that described them. This is very
similar to aria-labelledby: a label describes the
essence of an object, while a description provides
more information that the user might need.
When user agents compute the accessible name property of elements that have both an aria-
labelledby attribute and an aria-label attribute, the user agents give precedence to aria-
labelledby.
aria-describedby
42.
aria-labelledby & aria-describedby
<divrole="applicaton" aria-labelledby="calendar" aria-describedby="info">
<h1 id="calendar">Calendar<h1>
<p id="info">
This calendar shows the game schedule for the Boston Red Sox.
</p>
<div role="grid">
...
</div>
</div>
43.
Insert aria-* byinline or script
If the ARIA role or aria-* attribute does not
rely on scripting to provide interaction
behaviour, then it is safe to include the ARIA
markup inline
Web app not JS based: inline
Wep app JS based: load by script but
suggested inline
Web app with JS interaction: inline, and
modify by script
http://w3c.github.io/aria-in-html/#inline
<li role=treeitem aria-expanded=false
When the user opens the section, it is changed
to this using JavaScript :
<li role=treeitem aria-expanded=true
ARIA’s values
true/false
tristate
(value representingtrue or false, with an intermediate "mixed" value. Default value is "false" unless otherwise specified)
true/false/undefined
(value representing true or false, with a default "undefined" value indicating the state or property is not relevant)
ID refrence
ID reference list
integer
string
token
(one of a limited set of allowed values)
token list
0 - 32767positivevalues in order to have
a keyboard user can navigate in the element
Suggestion: don’t use it, if your markup is correct, probably you don’t need it