Slide 1

Slide 1 text

Accessibility Introduction to WAI ARIA

Slide 2

Slide 2 text

Agenda What is ARIA? Why we need it? Role, State and property Rules Testing

Slide 3

Slide 3 text

Accessibility What is ARIA?

Slide 4

Slide 4 text

What is ARIA? ARIA, stands for Accessible Rich Internet Applications. It is a technology specification that was designed by the Web Accessibility Initiative (WAI) in the W3C and it is now a W3C recommendation. You could think of ARIA as a suite of attributes to be included in your usual HTML code. These additional semantics help Assistive Technologies to identify roles, properties, relationships, and states in your user interfaces.

Slide 5

Slide 5 text

How does ARIA work?

Slide 6

Slide 6 text

Front End practise

Slide 7

Slide 7 text

Why we need ARIA?

Slide 8

Slide 8 text

Why ARIA is needed 1. HTML is non semantic. e.g. div span 2. Unknown functionality of components. e.g. 5 stars rating in Performance 3. Unknown states and properties of components. e.g. slide in out menu 4. Unreported change of dynamic content. e.g. job search filter results 5. Custom widgets with dynamic interactions. e.g. Tabs, Modal, Accordion

Slide 9

Slide 9 text

Example - Tabs No information in the markup to describe the widget's form and function.

Slide 10

Slide 10 text

Example - Tabs - where ARIA comes in ● Roles ● Properties ● States

Slide 11

Slide 11 text

Accessibility Tree

Slide 12

Slide 12 text

Screen reader demo VoiceOver + Safari

Slide 13

Slide 13 text

Role, State and Property

Slide 14

Slide 14 text

Screen reader users can quickly jump to that region of the page. role=”banner” (e.g. header) role=”navigation” (e.g. menu) role=”main” (the main content of the page) role=”complementary” (e.g. a sidebar) role=”contentinfo” ( e.g. footer) role=”search” role=”form” Role - Landmark

Slide 15

Slide 15 text

Landmarks demo

Slide 16

Slide 16 text

Code behind Semantic HTML

Slide 17

Slide 17 text

Role - Widgets Alert, Button, Link, Menu, Tab .... Tab A grouping label providing a mechanism for selecting the tab content that is to be rendered to the user. Tablist A list of elements, which are references to tab pan el ele ments. Tabpanel A container for the resources associated with a tab, where each t ab is contained in a tablist.

Slide 18

Slide 18 text

States ARIA States are more dynamic and are typically updated with JavaScript as a user interacts with UI. Screen readers are notified when these states change, and can announce these changes to users after an interaction takes place.

Slide 19

Slide 19 text

Property ARIA Properties often describe relationships with other elements, and for the most part, do not change once they’re set.

Slide 20

Slide 20 text

Reference

Slide 21

Slide 21 text

ARIA Rules

Slide 22

Slide 22 text

Rules of using ARIA #1 If you can use a native HTML element or attribute with the semantics of behavior you require already built into it, then do so.

Slide 23

Slide 23 text

Rules of using ARIA #2 Don't change native semantics, unless you really have to.

Slide 24

Slide 24 text

Rules of using ARIA #3 All interactive ARIA controls must be usable with the keyboard. All interactive widgets must be scripted to respond to standard keystrokes or keystroke combinations where applicable.

Slide 25

Slide 25 text

Rules of using ARIA #4 Don't use role equals presentation or aria-hidden = true on a visible focusable element. Using either of these on a focusable element will result in some users focusing on 'nothing'.

Slide 26

Slide 26 text

Rules of using ARIA #5 All interactive elements must have an accessible name.

Slide 27

Slide 27 text

Testing Tools

Slide 28

Slide 28 text

Testing with keyboard only

Slide 29

Slide 29 text

Browser addons - Wave

Slide 30

Slide 30 text

Browser addons - ARC

Slide 31

Slide 31 text

Automated A11Y testing A11Y issues can be found at build/test time through CI automation https://github.com/salesforce/sa11y https://github.com/nickcolley/jest-axe

Slide 32

Slide 32 text

Don’t fully rely on those tools

Slide 33

Slide 33 text

Tools - Assistive Technology VoiceOver + Safari JAWS + Internet Explorer/Chrome NVDA + Firefox/Chrome Microsoft Narrator

Slide 34

Slide 34 text

Things to remember ARIA is not changing the DOM ARIA is not changing the visuals ARIA is complement of HTML Screen Readers read markup, not CSS Encourage native semantics and focus on ARIA as gap-fill Test with real Assistive Technology

Slide 35

Slide 35 text

Learning ARIA

Slide 36

Slide 36 text

Learning resources https://www.w3.org/WAI/WCAG21/quickref/ https://a11ysupport.io/ https://romeo.elsevier.com/accessibility_checklist/ https://moritzgiessmann.de/accessibility-cheatsheet/ https://cheatography.com/jreiche/cheat-sheets/wai-aria-1-1/ https://www.accessibilityoz.com/videos/what-is-aria-and-why-use-it/ https://www.udacity.com/course/web-accessibility--ud891 https://developers.google.com/web/fundamentals/accessibility/a11y-for-teams

Slide 37

Slide 37 text

PageUp Design Principle

Slide 38

Slide 38 text

Thanks and Questions