Accessibility of HTML5 and Rich Internet Applications (Part 2) Hans Hillen Steve Faulkner.

Slides:



Advertisements
Similar presentations
JQuery UI A11Y Tips, Tricks and Pitfalls jQUery UI ARIA Hackathon 2011 Hans Hillen, TPG.
Advertisements

Chapter 3 – Web Design Tables & Page Layout
Chapter 3 Creating a Business Letter with a Letterhead and Table
CIS 1310 – HTML & CSS 6 Layout. CIS 1310 – HTML & CSS Learning Outcomes  Describe & Apply the CSS Box Model  Configure Float with CSS  Designate Positioning.
EXCEL Spreadsheet Basics
Intermediate Level Course. Text Format The text styles, bold, italics, underlining, superscript and subscript, can be easily added to selected text. Text.
Hans Hillen (TPG) Steve Faulkner (TPG) 03 / 15 / 11Accessibility of HTML5 and Rich Internet Applications - CSUN
XP 1 Designing a Web Site with Frames Using Frames to Display Multiple Web Pages Tutorial 5.
XP 1 Working with Cascading Style Sheets Creating a Style for Online Scrapbooks Tutorial 7.
Create a Web Site with Frames
XP Tutorial 5New Perspectives on HTML, XHTML, and DHTML, Comprehensive 1 Designing a Web Site with Frames Using Frames to Display Multiple Web Pages Tutorial.
Hans Hillen (TPG) Steve Faulkner (TPG) 02 / 25 / 13 Accessibility of HTML5 and Rich Internet Applications - CSUN
HTML Overview for Proofreading. HTML layouts are divided into sections, and created in tables separating the images & content sections.
ARIA + HTML5 Steve Faulkner & Hans Hillen. DIVING IN TO SOME HTML5 Details/summary Dialog Spin button slider ARIA rules HTML/ARIA validation Tools.
1 Section 508 Evaluation of EAST (A USPTO network-based proprietary application) Attachment C.
Scripted, Tab Accessible Tree Control Hierarchical view of data via tree control. Keyboard Navigation from initially closed tree to view above with focus.
An Introduction to WAI-ARIA Dan Jackson Web Team Leader City University London.
© 2008 IBM Corporation Emerging Internet Technologies Real World Accessibility with ARIA Becky Gibson Web Accessibility Architect.
Copyright 2007, Information Builders. Slide 1 Maintain & JavaScript: Two Great Tools that Work Great Together Mark Derwin and Mark Rawls Information Builders.
Alternative Views of the Web Jon Gunderson, Ph.D. Division of Rehabilitation-Education Services University of Illinois at Urbana/Champaign.
Tutorial 4: Using CSS for Page Layout. 2 Objectives Session 4.1 Explore CSS layout Compare types of floating layouts Examine code for CSS layouts View.
CO1552 – Web Application Development Lists, Special Characters, and Tables.
Development of Accessible E-documents and Programs for the Visually Impaired WAI-ARIA (V2011)
Using Styles and Style Sheets for Design
Lesson 4: Using HTML5 Markup.  The distinguishing characteristics of HTML5 syntax  The new HTML5 sectioning elements  Adding support for HTML5 elements.
CSS Positioning Creating Special Effects with CSS CS202 Working with Cascading Style Sheets (Chapter 4) CS202 1.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 6 Key Concepts 1 Copyright © Terry Felke-Morris.
CNIT 133 Interactive Web Pags – JavaScript and AJAX JavaScript Environment.
Hans Hillen (TPG) Steve Faulkner (TPG) Karl Groves (TPG) Billy Gregory (TPG)
WELCOME EF 105 Spring EF 105 Computer Methods in Engineering Problem Solving Week 2: FrontPage Introduction to Software Use to create Web Pages.
Website Development with Dreamweaver
Web Accessiblity Carol Gordon SIU Medical Library.
Neal Stublen Course Road Map  Create web page layouts using CSS  Manage CSS  Test website validity  Create navigation menus using.
Adobe Dreamweaver CS3 Revealed CHAPTER FIVE: USING HTML TABLES TO LAY OUT A PAGE.
IC 3 BASICS, Internet and Computing Core Certification Key Applications Lesson 10 Creating and Formatting an Excel Worksheet.
1 Lesson 18 Organizing and Enhancing Worksheets Computer Literacy BASICS: A Comprehensive Guide to IC 3, 3 rd Edition Morrison / Wells.
Word 2010 Vocabulary List 1. Click and Type - A feature that allows you to double-click a blank area of a document to position the cursor in that location,
Accessible DOM scripting with ARIA Léonie Watson
 Remember that HTML is just text  Need to point to pictures  Use the img tag  alt: › screen reader › REQUIRED for this class and to validate.
Week 11 Creating Framed Layouts Objectives Understand the benefits and drawbacks of frames Understand and use frame syntax Customize frame characteristics.
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. word 2010 Chapter 3 Formatting Documents.
Chapter 5 Quick Links Slide 2 Performance Objectives Understanding Framesets and Frames Creating Framesets and Frames Selecting Framesets and Frames Using.
Computer Literacy BASICS: A Comprehensive Guide to IC 3, 5 th Edition Lesson 19 Organizing and Enhancing Worksheets 1 Morrison / Wells / Ruffolo.
Basic Editing Lesson 2.
© 2008 The McGraw-Hill Companies, Inc. All rights reserved. WORD 2007 M I C R O S O F T ® THE PROFESSIONAL APPROACH S E R I E S Lesson 15 Advanced Tables.
McGraw-Hill Career Education© 2008 by the McGraw-Hill Companies, Inc. All Rights Reserved. Office Word 2007 Lab 3 Creating Reports and Tables.
Use CSS to Implement a Reusable Design Selecting a Dreamweaver CSS Starter Layout is the easiest way to create a page with a CSS layout You can access.
Microsoft Access 2000 Presentation 3 Creating Databases Part II (Creating Forms)
Dive into Mobile Guidelines for Testing Native, Hybrid, and Web Apps Susan Hewitt, Accessibility Consultant, Deque Systems Jeanine Lineback, Accessibility.
Aria Roles Informing assistive technology. What are Aria Roles A way of conveying the role or state of content or functionality. Accessible Rich Internet.
1 Lesson 13 Organizing and Enhancing Worksheets Computer Literacy BASICS: A Comprehensive Guide to IC 3, 3 rd Edition Morrison / Wells.
Week 8.  Form controls  Accessibility with ARIA.
20-753: Fundamentals of Web Programming 1 Lecture 6: Advanced HTML Fundamentals of Web Programming Lecture 6: Advanced HTML.
Positioning Objects with CSS and Tables
Microsoft Office 2013 Try It! Chapter 4 Storing Data in Access.
 Add one element at a time  If it doesn’t do what you want, › Delete it › DON’T just keep piling on more items.
XP New Perspectives on Macromedia Dreamweaver MX 2004 Tutorial 6 1 Creating Dynamic Pages.
1 Word Processing Intermediate Using Microsoft Office 2000.
1 Chapter 15 Creating a Presentation. Practical Computer Literacy, 2 nd edition Chapter 15 2 What’s inside and on the CD? In this chapter, you will learn.
JavaScript, Sixth Edition
Creating a Presentation
Positioning Objects with CSS and Tables
Design considerations
Tutorial 6 Creating Dynamic Pages
Benchmark Series Microsoft Word 2016 Level 2
DREAMWEAVER MX 2004 Chapter 3 Working with Tables
Web Development & Design Foundations with H T M L 5
Lesson 19 Organizing and Enhancing Worksheets
Positioning Objects with CSS and Tables
Presentation transcript:

Accessibility of HTML5 and Rich Internet Applications (Part 2) Hans Hillen Steve Faulkner

IN THIS PART: Keyboard and Focus Management Form Validation Screen Reader Mode Conflicts Solutions, Workarounds and Considerations Solutions, Workarounds and Considerations 2

KEYBOARD AND FOCUS MANAGEMENT 3

THE PROBLEM WITH CUSTOM CONTROLS Problem: Images, divs, spans etc. are not standard controls with defined behaviors Not focusable with keyboard Have a default tab order Behavior is unknown Solution: Ideally: Use native focusable HTML controls,,, etc. Or manually define keyboard focus and behavior needs

KEYBOARD ISSUES IN A NUTSHELL Reachability: Moving keyboard focus to a widget Through tab order Native focusable controls or tabindex=“0” Through globally defined shortcut By activating another widget Operability: Interacting with a widget All functionally should be performable through keyboard and mouse input 5

FOCUS & KEYBOARD ACCESSIBILITY To be accessible, ARIA input widgets need focus Use natively focusable elements, such as,, etc. Add 'tabindex' attribute for non focusable elements, such as,, etc. Tabindex="0": Element becomes part of the tab order Tabindex="-1" (Element is not in tab order, but focusable) For composite widgets (menus, trees, grids, etc.), use a "roving tabindex": Every widget should only have 1 stop in the tab order. Dynamically keep track where your widget’s current tab stop (active part) is: Alternative for tabindex: aria-activedescendant=" " Focus remains on outer container AT perceives element with the specified ID as being focused. You must manually highlight this active element, e.g. With CSS 6

KEYBOARD HANDLING Every widget needs to be operable by keyboard. common keystrokes are: Arrow keys Home, end, page up, page down Enter, space ESC Mimic the navigate in the desktop environment ARIA Best Practices: practices/ practices/ Always manage and keep track of your focus. Never let it get lost. 7

SKIPPING MECHANISMS The ability to skip content is crucial for both screen reader and keyboard users Skip links are out of date, out of fashion and often misused But keyboard users still need to be able to skip Other alternatives for skipping: Collapsible sections Consistent shortcuts (e.g. a shortcut that moves focus between panes and dialogs) Custom focus manager that allows the user to move focus into a container to skip its contents 8

FORM VALIDATION 9

ARIA & FORM VALIDATION You can use ARIA to make your form validation easier to manage. aria-required & aria-invalid states Role="alert" or live regions can be used to flag validation errors immediately, but are likely to be disruptive Provide validation feedback both in inline scope and form scope Use validation summaries invalid entries easier to find Use role="group" or Role="alertdialog" to mark up the summary Provide quick access to invalid fields: Link to corresponding invalid controls from summary items Nice to have: provide global shortcuts 10

SOLUTIONS, WORKAROUNDS AND CONSIDERATIONS 11

FALLBACK SOLUTIONS FOR LINK BUTTONS Developers often use links as (icon) buttons Side effect: screen reader will announce them as a link, not a button This can be made accessible by setting role="button" Screen reader announces link as button now, but also provides hint for using a button ("press" space to activate”) Screen reader lies: Links work through the Enter key, Space will scroll down the page To make sure JAWS is not lying, you'll have to manually add a key event handler for the Space key.

SCREEN READER MODE CONFLICTS

VIRTUAL VS NON VIRTUAL MODE Virtual Mode (a.k.a. browse / virtual PC cursor mode) Non-Virtual Mode ( a.k.a. forms / application mode) Default navigation mode for navigating and reading documents, such as PDF documents or web pages. Default navigation mode for desktop applications, interactive web forms, and web applications (i.e. role=“application”). User navigates through the document with a “virtual cursor”, allowing static content (e.g. plain text, images, data tables) to be traversed as well. Only keyboard accessible content (e.g. focusable elements) or content associated with such elements (e.g. through aria- labelledby) can be accessed.aria- labelledby Screen reader provides special shortcuts and features to enhance virtual navigation, e.g. heading navigation or link lists. Arrow keys are used for basic sequential navigation. No special shortcuts or features are available, except what’s provided by the web page’s level of keyboard accessibility (tabbing, keyboard shortcuts, and scripted movement of keyboard focus). Screen reader will intercept user’s key strokes and break custom keyboard behavior, e.g. a custom widget requiring arrow key input won’t work in this mode. Screen reader lets all keystrokes pass through to the web content. Custom widgets will work as intended provided they are keyboard accessible.

ROLE="APPLICATION" Screen readers normally browse in ‘virtual mode’ Navigates a virtual copy of the web page Intercepts all keystrokes for its own navigation (e.g. ‘H’ for heading navigation) For dynamic Web apps, virtual mode may need to be turned off Interactive widgets need to define the keystrokes themselves Content needs to be live, not a virtual copy Automatically switches between virtual and non-virtual mode role=“application” Screen reader switches to non-virtual for these elements Must provide all keyboard navigation when in role=“application” mode Screen readers don’t intercept keystrokes then, so typical functions will not work

ROLE="DOCUMENT" For apps with ‘reading’ or ‘editing’ sections A reading pane in an client Screen reader switches back to virtual mode, standard ‘web page reading’ shortcuts work again Read / edit documents in a web application Banner, complementary, contentinfo, main, navigation, search & form When applied to a container inside an application role, the screen reader switches to virtual mode. 16

EXPLAINING TO USERS HOW RICH INTERNET APPLICATIONS (RIA) WORKS People that depend on assistive technology often: Expect to be able to tab through all interactive elements Expect virtual mode to work Expect web content to be like it was in the late 90's: Simple page loads, no dynamic changes Simple Keyboard navigation: Tab, Enter, some times arrow keys WAI – ARIA is meant for "Application UI's" Requires virtual mode to be disabled Requires custom shortcuts Content can update dynamically 17

EXPLAINING TO USERS HOW RICH INTERNET APPLICATIONS (RIA) WORKS (2) How do you convey this different navigation style to screen reader users? Modern screen readers have "auto-forms" mode (virtual mode is automatically turned off where applicable Screen readers will provide basic instructions for interactions Less experienced users will likely be confused Sighted keyboard users do not get any instructions at all 18

19 A tab list widget: Web 1.0: Tab through every tab in the list Web 2.0: Tab list takes up one tab stop, arrow keys are used for switching Which one is correct? What will the end user expect? EXAMPLE

THE PERFECT DIALOG 20

DIALOG: ROLES & STATES Use role="dialog", combined with: Aria-labelledby (for dialog title) Aria-describedby (for dialog message text)

DIALOG: FOCUS MANAGEMENT When dialog opens, focus should move to first focusable element inside the dialog Focus should "wrap" inside dialog and be contained by it. For modal dialogs: No keyboard access with background content should be possible When the dialog closes, focus should be placed back on a logical element, e.g. the button that triggered the dialog. For modal dialogs: prevent virtual navigation to background using aria-hidden="true" 22

DIALOG: SHORTCUTS If dialog supports moving or resizing, these features must be keyboard accessible For non modal dialogs: provide shortcut to switch between dialog and main page Support closing dialogs using buttons and Escape key 23

24 "WAI-ARIA provides dialog and alertdialog roles that are to be treated as special case application roles. Like application, screen readers will leave the main job of keyboard navigation up the dialog." WAI-ARIA 1.0 Authoring Practices DIALOG QUOTE 1:

25 "When using dialog, all static text must be associated with widgets, groups or panes using the aria-labelledby and aria-describedby properties, otherwise it will not be read by the screen reader when the user navigates to the related widget or group. " WAI-ARIA 1.0 Authoring Practices DIALOG QUOTE 2:

DIALOG PITFALLS According to the ARIA Best Practices document: A dialog is a special type of "application window" All content must be (associated with) keyboard accessible content. Regular static is content not allowed. Virtual navigation by screen readers is not allowed This works for simple dialogs… But not for complex dialog content often found in real life projects, which may have a large amount of static content To force support for virtual navigation, role=“document” can be wrapped around the dialog content. Focus management For dialogs with a large amount of (scrollable) content, the first focusable element may be too far down. Moving focus to it would cause a lot of content to be skipped 26

CODE SAMPLE ORIGINAL DIALOG: 27 For Your Information Close …

CODE SAMPLE MODIFIED DIALOG: 28 Start of dialog For Your Information Close Close … End of dialog

HIDING CONTENT 29

HIDING CONTENT Three types of hiding: 1.Hiding content visually and from AT: 2.Hiding content visually, but not from AT 3.Hiding content from AT, but not visually

1. HIDING CONTENT FROM ALL Display: none; Hides content both visually and from AT products Only works when CSS is supported (by user agent, user, or AT product) Only use to hide content that still ‘makes sense’ E.g. contents of a collapsible section Do not use for content that provides incorrect information E.g. preloaded error messages that are not applicable at the moment, or stale content Instead, this content should be removed from the DOM completely 31

2. HIDING CONTENT VISUALLY Hiding content off-screen will still make it available for screen readers, without it being visible Useful to provide extra information to screen reader users or users that do not support CSS E.g. add hidden headings, screen reader instructions, role & state info for older technology 32

STYLES FOR VISUALLY HIDDEN CONTENT AS USED IN BOOTSTRAP: 33.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

3. HIDING CONTENT FROM SCREEN READERS ONLY Sometimes developers want to hide content from screen readers, e.g.: Duplicate controls Redundant information that was already provided through semantic mark up. Difficult to achieve: Role=“presentation” will remove native role, but content is still visible for AT products Aria-hidden=“true” provides a solution: Not supported well in older technology 34

ARIA-HIDDEN 35 Supported by the latest versions of major browsers and assistive technology. Use with care: only for redundant/decorative content NEVER use directly on focusable elements A Small Font

SCROLLABLE CONTENT 36

SCROLLABLE CONTENT Some widgets use scrolling or animation to "slide" content into view Example: a carousel widget: A long list of items, of which only a few are visible at a time Example: A table that only shows a few columns at a time, and can be scrolled horizontally through "next" and "previous" buttons. Content that slides into view is often not hidden properly, but "clipped" through overflow:hidden styles Content is visually hidden, but still part of the tab order and (unintentionally) reachable to keyboard users 37

SCROLLABLE CONTENT - SOLUTION When content is scrolled out of view, ensure that it's not reachable to keyboard users To do this, the "visibility: hidden" style is often easiest to use: When content is scrolled out of view, set visibility: hidden Before content is about to be scrolled into view, set visibility: visible Use "visibility: hidden" over "display: none" to maintain the content's layout, which is often needed for the scrolling / animation to function correctly 38

TABLES 39

LABELING TABLES still alive and kicking In HTML5 it’s allowed to nest headings Summary attribute obsolete in HTML5 40

HEADING IN CAPTION EXAMPLE 41 Animals Name Age Species...

FIXING INCORRECT GRID STRUCTURE Some developers will use multiple HTML elements to create one single grid. For example: One for the header row, one for the body rows One for every single row Why? Because this is easier to manage, style, position, drag & drop, etc. Screen reader does not perceive one single table, but it sees two ore more separate tables Association between column headers and cells is broken Screen reader's table navigation is broken 42

SUPPORT FOR HIGH CONTRAST MODE 43

SUPPORT FOR HIGH CONTRAST MODE When Windows High Contrast Mode is enabled, the following will happen: Background and foreground colors are overridden Background images are removed Custom user style sheets often apply similar changes UI libraries often uses background images for icons, which means these icons become invisible 44

HIGH CONTRAST MODE – SOLUTIONS? It's possible to detect the effects of high contrast mode or a custom stylesheet using scripting: On page load, create an off screen div element, assign border and background styles to it, and inspect computed styles to see if they are overridden This detection can be used to "fix" issues related to HC mode, e.g.: Unhide hidden text to replace background images Font icons are great for high contrast mode, but: Not supported on all devices Break easily when custom user stylesheet overrides font-family “Invisible font” solution is a promising workaround for this issue 45