HTML5 and ARIA: Accessibility Benefits and Support
Basic HTML5, ARIA, and Screen Readers

OZeWAI 2011
Nov. 30, 2011

Today's Agenda

Basic HTML5 section elements

  • article
  • aside
  • footer
  • header
  • nav
  • section
HTML5 logo
Basic HTML5 layout with header, then nav, then article with header, sections, and footer. Next to the article is an aside. At bottom is a footer.

WAI-ARIA

W3C Accessible Rich Internet Applications (WAI-ARIA) 1.0. W3C Candidate Recommendation 18 January 2011.

Landmark Roles

“regions of the page intended as navigational landmarks”

Example

<div id="main" role="main">

Document Structure Roles

“structures that organize content in a page”

HTML5 Elements, Implied and Permitted ARIA Roles

HTML5 Element Implied ARIA Role Permitted ARIA Roles
* Not a landmark role
article article* article, document, application, or main
aside complementary note, complementary, or search
footer none contentinfo (one per document)
header none banner (one per document)
nav navigation navigation
section region* alert, alertdialog, application, contentinfo, dialog, document, log, main, marquee, region, search, or status

HTML5 Only Test Case

Representation of HTML5 test page using only HTML elements with no ARIA roles applied.

Refer to the HTML5 Only Test Case.

HTML5 Plus ARIA Test Case

Representation of HTML5 plus ARIA roles test page.

Refer to the HTML5 Plus ARIA Test Case.

How Screen Readers Get Information

Accessiblity APIs

Accessibility APIs

Internet Explorer 6 and 7

Internet Explorer 8 and 9

Accessibility APIs

Firefox in Windows

Safari and the Mac Accessibility API

Linux

MSAA in IE9

IE9 passes an accRole of “text” for the <header> element set with role=“banner”

Screenshot of HTML5 plus ARIA roles test page being tested in IE9 with Accessibility Probe.

MSAA and IAccessible2 in Firefox

MSAA: <header> with role=“banner” gets accRole of “banner”

IA2: role is “header”; “xml-roles” attribute is “banner”

Screenshot of HTML5 plus ARIA roles test page being tested in Firefox with Accessibility Probe.

Safari and the Mac Accessibility API

<header> with role=“banner” gets an AXRoleDescription of “banner”

Screenshot of HTML5 plus ARIA roles test page being tested in Safari with Mac Accessibility Inspector.

Accessibility APIs

Extreme Variability in:

Document Object Model (DOM)

Screen Reader & Landmark Interaction

Navigation by landmark

Reading through the page

ARIA Landmarks List Dialog

Expected Screen Reader Behaviour

HTML5 Only

Expected Screen Reader Behaviour

HTML5 plus ARIA Roles

NVDA 2011.3

HTML5 Only

HTML5 Element NVDA 2011.3
article* No
aside complementary
(FF Only)
footer contentinfo
(FF Only)
header No
nav navigation
(FF Only)
section No

Issues

  • All explicitly identified landmark roles are announced
  • Document structure roles, e.g., article and region, are not announced

NVDA 2011.3

HTML5 Only

NVDA is not using the DOM, but relying on the APIs:

NVDA 2011.3

HTML5 plus ARIA Roles

ARIA Role NVDA 2011.3
application No
article* No
banner Yes
complementary Yes
contentinfo Yes
form No
main Yes
navigation Yes
region* No
search Yes

Issues

  • Doesn't identify application or form landmarks
  • In FF, all footer elements without an ARIA role are still called contentinfo landmarks

NVDA 2011.3

HTML5 plus ARIA Roles

JAWS 12/13

HTML5 Only

HTML5 Element NVDA 2011.3
article* article (IE6+ and FF)
aside complementary
(FF Only)
footer contentinfo
(FF Only)
header No
nav navigation
(IE6+ and FF)
section No

Issues

  • article is not a landmark
  • In FF, every footer is a contentinfo landmark
  • Heading structure is incorrect

JAWS 12/13

HTML5 Only

JAWS 12/13

HTML5 plus ARIA Roles

ARIA Role NVDA 2011.3
application Yes
article* Yes
banner Yes
complementary Yes
contentinfo Yes
form Yes
main Yes
navigation Yes
region* Yes
search Yes

Issues

  • article and region are not landmarks
  • Heading structure is incorrect

New Behaviour in JAWS 13

Video: JAWS 13.0.97 in IE9

HTML5 and ARIA roles

Reading through the page

JAWS 12/13 and HTML5 Outlines

The HTML5 Outline Algorithm

Sectioning Elements: article, aside, nav and section

<h1>Level 1</h1>
<section>
   <h1>Level 2</h1>
   <article>
      <h1>Level 3</h1>
   </article>
</section>
translates to
<h1>Level 1</h1>

   <h2>Level 2</h2>

      <h3>Level 3</h3>


JAWS 12/13 and HTML5 Outlines

The HTML5 Outline Algorithm

This should also work:

<h2>Level 1</h2>
<section>
   <h6>Level 2</h6>
   <article>
      <h4>Level 3</h4>
   </article>
</section>
translates to
<h1>Level 1</h1>

   <h2>Level 2</h2>

      <h3>Level 3</h3>


JAWS 12/13 and HTML5 Outlines

The HTML5 Outline Algorithm

What JAWS 12/13 do:

<h1>Level 1</h1>
<section>
   <h2>Level 2</h2>
   <article>
      <h3>Level 3</h3>
   </article>
</section>
translates to
<h1>Level 1</h1>

   <h3>Level 2</h3>

      <h5>Level 3</h5>


JAWS 12/13 and HTML5 Outlines

For example, in our test page, the h3 nested two sectioning levels deep in our article element becomes an h5.

Screenshot of HTML5 test page showing how JAWS misinterprets heading levels for headings nested in sectioning elements.

For more, read JAWS, IE and Headings in HTML5.

JAWS 10/11

HTML5 <header> bug in Firefox

VoiceOver/Mac OS X Lion

HTML5 Only

HTML5 Element NVDA 2011.3
article* No
aside No
footer No
header No
nav No
section No

Issues

  • Doesn't announce any landmarks

VoiceOver/Mac OS X Lion

HTML5 plus ARIA Roles

ARIA Role NVDA 2011.3
application Yes
article* No
banner Yes
complementary Yes
contentinfo Yes
form No
main Yes
navigation Yes
region* No
search Yes

Issues

  • Doesn't identify form landmarks
  • Doesn't announce the landmark type when navigating by landmark

Features

  • Announces entering and leaving landmark

Video: VoiceOver/Mac OS X Lion in Safari 5

HTML5 and ARIA roles

Accessibility: A Shared Responsibility

Accessibility: A Shared Responsibility

Browser vendors

Accessibility: A Shared Responsibility

Screen Reader vendors

Accessibility: A Shared Responsibility

Developers

Accessibility: A Shared Responsibility

Users

A More Accessible Web

Use HTML5 and ARIA, but...

Thanks!

OZeWAI 2011
Nov. 30, 2011