Categories
articles heading html5 links review table

Response to MSDN Article “Designing Accessibility with HTML5”

This blog is a review/response to the recent MSDN article Designing Accessibility with HTML5 by Rajesh Lal (@irajlal). The article is quite extensive and covers an intro to accessibility and disability, progressive enhancement, ARIA, forms, tables, and more.

I had actually reviewed an early version of this article, but it seems some of my feedback was not incorporated, and there is also some new content in the article. So let’s discuss some of those items and more.

The introduction does an adequate job of covering the four main types of disabilities: hearing, mobility, cognitive, and visual. For reference, here’s the link to the WCAG 2.0 POUR model (perceivable, operable, understandable, robust) as mentioned.

Progressive Enhancement

I was happy that Progressive Enhancement (PE) was mentioned next, early in the article. I firmly believe that semantic markup and PE are essential to a robust and accessible webpage. PE was described fairly well, but then I was disappointed to see example code further down the page which does not use PE. In Figure 9, the form example is missing a URL in the action attribute and contains the following line to submit:

<div><a href="#" onclick="submit()">Send Your Message!</a></div>

This line does not represent proper semantic markup, progressive enhancement, nor the non-JavaScript use case. A better example would be to add a dummy URL in the action attribute, and for the submit button, do this:

<input type="submit" value="Send Your Message!" />

Headings

In Figures 6 and 7, home page sample code, the document outline is broken. The heading order jumps from H2 to H4 so is missing the H3. It also appears that the H4 elements in the aside element are correlated to the last H2, which in incorrect; they are separate topics. To solve, I would insert an H2 heading in the aside element and change the H4 elements to H3. In addition, there is no H1 element.

Figure 11, Markup for a FAQ Page, does indeed provide an ideal heading structure.

A perfect heading structure is not essential, but certainly helps. Especially when the code is an example for other developers.

And for the record, in Figures 6 and 7, the image element for the logo is missing alt text.

JavaScript Insertion

It’s good that the author recommends placing the external JavaScript files at the end of the body (at end of home page section), but remember that you may need to put certain JavaScript at the top, mostly scripts for feature detection such as Modernizr. (This isn’t really accessibility but thought I’d include anyway.)

Fieldset/Legend

In the Contact Form section, I really like that the sample code is using the placeholder attribute correctly. But there’s one issue; the fieldset element is being used but the legend is missing. The spec oddly says legend is optional, but it’s definitely best practice to use it. Otherwise, there’s no reason to use fieldset in the first place as far as I know.

Data Table

In the data table, use of a caption element is great, but I’m perplexed as to why there is a details and summary element within the caption. And I wouldn’t recommend using a strong element with the caption text; use CSS instead. Also, the TH elements should have a scope attribute; it may not be necessary with newer assistive technologies, but makes the code more robust and semantic.

Links, titles, and abbreviations

Towards the end of the article, there’s a section on links and images. I really advocate this advice: Use a CSS background image if your design requires an icon such as “>”.

Just before that, I have issues with the sample text link. Avoid “click here” is good, but then the title attribute contains “click for”. This somewhat of a moot point as the title isn’t needed at all. Traditionally, the title attribute is only needed for additional supplementary information (not required for user). The mighty Steve Faulker, in his article Using HTML title attribute, suggests that title only be used in a couple rare cases.

For images, I would not recommend the title attribute here either (due to lack of support). For even more on that, check out this recent article about title attributes on the RNIB site.

About the link underline, of course I agree that text links (in main content especially) should be underlined. The sample CSS adds the underline, but it’s much better to do this by not removing it in the first place. The underline does not have to be added; it should already be there by default.

The abbreviation example is simple and solid, but there’s more to it than that. Because of poor support, the title attribute doesn’t work typically with the keyboard and some assistive technologies (see links above). Therefore, I strongly suggest that the full text of the acronym or abbreviation is written out when it first appears on each page.

Final Thoughts

I don’t have much to say about the audio/video section; I’m just wondering where the keyboard shortcuts listed for the HTML5 media controls comes from.

It’s great to see that Visual Studio 2012 has ARIA support. I know it’s still a popular application, but I don’t have much experience with it myself.

The MSDN article Designing Accessibility with HTML5 has a lot of good information and tips. But many times, especially with accessibility, the devil is in the details. It is quite a tricky topic and there are many nuances and gray areas. I hope this response has cleared up some of those.

Categories
presentations review

Open Letter to Slideshare

Dear Slideshare,

I have been a user of your service for a few years now. I enjoying sharing slide presentations, following other authors, and having the option to add audio. And last year, your move to HTML5 from Flash was great. But there are some behaviors which are quite poor and have needed improvement for some time now, as outlined below. Note that my experiences are mostly with PowerPoint files.

1. The slide notes are not rendered whatsoever. The notes can often times be very valuable. Here’s a related tweet from Sarah Bourne.

2. In my latest upload, images and text on several slides did not show up. I even edited and re-uploaded the file in an attempt to fix the issue. To resolve the matter, I resorted to posting the slides to Google Drive/Docs, and promoted that URL instead.

3. The auto-generated text transcript is very poor. The transcript is very important, particularly for accessibility. Specific items which can be improvement:

3.1 The owner is unable to edit or delete the generated transcript. Even with a Pro account it is not possible, as tweeted by Derek Featherstone.

3.2 The outline rendering is non-existent. Even when slides have proper bullet and number outlines, the transcript generates no structure, just one big text blurb.

3.3 Alternative text of images not present in transcript. For images in my PPT files, I add alternative text in the appropriate field. That text doesn’t appear in the transcript.

3.4 In the transcript, the footer text in the slide master is output at the end of the content for every single slide! This reduces legibility.

Please improve your application, Slideshare. There are many other slide sharing services people can use (such as SlideSnack and SlideBoom), and the improvements above will surely set you apart from the competition, as well as win over many of us in the accessibility community.

Sincerely,

Dennis E. Lembree
Web Axe author

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!

Categories
articles review

Reponse to Journey to Universal Accessibility–Part 1

I got an error when trying to comment, so here’s my response to the recent article Journey to Universal Accessibility–Part 1 by @Pathbrite. In general, the article is pretty good, but several of the techniques given are outdated.

  • For #3, I say don’t use tabindex; it’s no longer considered good practice as content can be same in code order as visual order. The CSS part is a must (adding focus in addition to hover state). 
  • For #4, it’s important to clarify that page titles (and H1) should be unique for each page.
  • For #5, it’s even better to use the scope attribute on TH elements. Also, the summary attribute is good but hardly ever used correctly; it’s also being made obsolete in HTML5.
  • For #7, I like title attributes, but unfortunately titles aren’t very accessible to all; browsers don’t support the rendering with keyboard use, most screen readers have it off by default,  nor does it help on mobile devices.
  • Lastly, I suggest increasing the text size on your site for better readability/accessibility.
Categories
conference event review

Open Web Camp 4 another success!

Open Web Camp 4 took place last Saturday July 14, 2012. Turned out to be another great event organized by John Foliot (@JohnFoliot) of San Jose, California. This time, OWC was held at PayPal headquarters in San Jose (was held at Stanford the previous three years). Although the event covers different area of web development, several sessions concentrated on accessibility and others included accessibility as part of the content.

After helping with registration, I arrived a few minutes late to “HTML5: All about Web Forms” by Estelle Wyl (@standardista). The talk was a bit rushed, but packed with great information. Next, “Surf a GB with Glenda’s Thumb” was pretty interesting as Glenda Watson-Hyatt (@GlendaWH) demonstrated challenges of using a computer with a motor disability. She also asked attendees to try a web-surfing exercise while simulating a mobile impairment (by using only non-dominant hand with rubber band around fingers).

I regretted missing “Getting Your CSS Under Control” by Jonathan Snook. But instead I attended Denis Boudreau’s very relevant presentation, “Social Media Accessibility: Where Are We Today?“. This session was actually a replacement for Molly Holzschlag’s presentation; she couldn’t make the event due to TSA nonsense.

I finished the conference by attending “Unhiding The Truth Behind Hiding Content for Screen Reader Users” by Victor Tsaran (@vick08) and then a “game changing perspective” talk by Glenda Sims (@GoodWitch), pictured below.

The event was free in the past, and this year there was only a small $10 registration fee; the value is tremendous! In addition to the sessions, a t-shirt and lunch was provided to all attendees. And lunch was enjoyed by many outside in the nice Northern California weather by the pond on the beautiful PayPal campus. A nice time. I look forward to an OWC5 next year.

projected slide: You are an accessibility avenger

Related links: