Categories
book html5 longdesc review video

Book Review: Pro HTML5 Accessibility

Recently I finally made time to read the book Pro HTML5 Accessibility by Joshue O Connor (@joshueoconnor), released in late March 2012 by Apress. Let’s take a look at each chapter.

book cover

Chapter 1, Introduction to HTML5 Accessibility, covers exactly that. First, the differences between HTML5, HTML4, and XHTML are explained. Then the basics of web accessibility and theory are discussed including the four principles of WCAG 2.0 (POUR). Legislation is also discussed including Section 504/508 and ADA (US) and PAS78 and DDA (UK).

Accessibility should enhance your design—not destroy it.

Chapter 2, Understanding Disability and Assistive Technology, describes different types of disability, and goes into more detail about visual impairments. Assistive technology (AT) is explained such as screen readers, screen magnifiers, and switches; the most popular screen readers JAWS, VoiceOver, NVDA are discussed in more detail.

Chapter 3 is about JavaScript and ARIA, and sure covers a lot. Nice to see progressive enhancement (PE) explained first; along with semantic markup, PE is a grounding technique which still many developers do not practice, unfortunately. The chapter then discusses event handler best practices, use of tabindex and no script, and references WCAG2 scripting techniques and failures. The DOJO, jQuery UI, and FLUID JavaScript libraries are mentioned, but surprisingly not YUI.

The next section in this chapter provides great information on ARIA (Accessible Rich Internet Applications) including the explanation of the following important attributes: live region, label/describedby, menu, and landmark roles. An ARIA state and role reference is also included.

Accessible drag-and-drop is mentioned briefly at the end of the chapter, but would have liked to see more on this topic. I guess everything can’t be included! For more on this topic, start with Accessibility & Native Drag and Drop by the HTML5 Doctor.

Chapter 4, API and DOM, is a shorter and a bit dryer chapter, but definitely contains interesting and necessary information. The off-screen model (OSM) and accessibility APIs are defined, and how they work with browsers and AT. Accessibility APIs discussed include MSAA (the “older brother”); IAccessible 2; and the Apple, Webkit, and Linux versions.

Chapter 5 gives explanation and references to new HTML5 semantic elements and attributes. A lengthy list of event handler attributes is provided. The chapter also includes an interesting mapping of new elements against the implied ARIA role. In addition, I like that the importance of headings is explained; this is a very basic and vital practice that if often overlooked. The hgroup element is discussed a fair amount, but the rumor is that it is being dropped from the HTML5 specification.

Chapter 6 is titled Images, Rich Media, Audio, and Video in HTML5. The first half of the chapter alone (about 21 pages) discusses alternative text for images. This lengthy section is great because even though this is a basic requirement, implementing alt text can be quite tricky depending on the how an image is used (or not used) and is often done incorrectly if at all.

It’s great that the author is a supporter of the longdesc attribute which is now made obsolete in HTML5. I also advocate the longdesc attribute which points to an off-page resource; this behavior cannot be replicated with ARIA. Longdesc is not only used much in academia as the book states, but also for government websites and comics. A good example of alt text using describedby is given, but no solution for an external long description. Read more about this in my two-part article Longdesc & Other Long Image Description Solutions.

Although ARIA is great and HTML5 has made advances in many areas, neither currently provides a fully-functional replacement for @longdesc

I would have liked to read more on sprites as this is a popular design technique which causes many accessibility problems. For more on this topic, check out Notes on accessible CSS image sprites by Steve Faulkner.

The second part of Chapter 6 covers HTML5 audio and video. Issues with Flash for video are presented, and then the HTML5 media elements and attributes are covered. I’d like to point out that the autoplay attribute is bad for accessibility and usability as it automatically starts the media on page load and therefore removes control from the user.

A solid video code example is provided for embedding media and creating custom controls. I noticed that the fallback example was not what I expected as it didn’t include Flash nor a simple file download link. For more on this topic, start with Creating Your Own Accessible HTML5 Media Player by Terrill Thompson.

It’s great to see the Track element explained as it’s great for captions, audio description, etc. Although it’s not supported quite yet, many of us are in great anticipation and is definitely worth learning now.

Lastly, Chapter 6 suggests some great media encoding tools and explains the media types and supporting browsers.

Chapter 7, HTML5 and Accessible Data Tables, provides a great explanation and many code examples of basic and complex data tables, including the headers attribute technique. The author disagrees with deprecation of summary attribute, but I do not so much. The summary attribute is often not implemented correctly and is difficult to maintain; the content can be in the table caption or main content; screen readers can give the same information about a table that the summary attribute is originally intended for (an overview of the structure of the data table). But a great alternative method to summary is provided, using aria-describedby, which I do advocate.

In Chapter 8, HTML5 and Accessible Forms, a thorough explanation is given of the basics and complexities of accessible web forms. For form element labels, three techniques are described. I agree with the author in that explicit labeling (for/id) should be used over the implicit (wrapped) method. Or over any other method (such as title or placeholder) for that matter. Also discussed are many of the new HTML5 form elements (output, progress) and input types (tel, email, date, time) including a few details on browser support, or lack thereof.

However, in terms of making your forms more bulletproof and working with older legacy AT, I recommend sticking with the for/id method for now.

Useful tidbits are included such as the inconsistent screen reader support of optgroup element; how to style placeholder attribute for Webkit and Mozilla; and suggests to help the accessibility of the autofocus attribute. Speaking of placeholder, although the book points out that the placeholder attribute “represents a hint”, I had hoped it would more directly state that the placeholder attribute is not a replacement for the label element, as it’s often misused.

Error recovery and form validation is also discussed. The jQuery form validation plugin is mentioned; for details check out Paul Adam’s related article.

In Chapter 9, HTML5, Usability, and User-Centered Design, great information is given, but I wonder a little of how this content fits into the scope of the book. The chapter mostly discusses user testing and the 7 principles of universal design: equitable use; flexibility in use; simple and intuitive; perceptible information; tolerance for error; low physical effort; and size and space for approach and use. In addition to details from the book, you can also check out my article from last year on this topic, Popular Mistakes in Universal Web Design.

Chapter 10 discusses numerous tools and tips for accessibility testing, or “Assessing Your Accessible HTML5 Project”. Some popular tools are mentioned including WAT-C, WAVE, and Colour Contrast Analyser. Other notable tools not mentioned are aViewer, Accessibility Evaluation Toolbar, and Worldspace FireEyes.

In summary, Pro HTML5 Accessibility is a comprehensive and important book for any web developer and web designer. The read was excellent and contains many references and appropriate code examples. I highly recommend it. And now that you’ve read my review, you’re ready to buy the book!

Leave a Reply

Your email address will not be published. Required fields are marked *