The importance of good semantic markup, useful alternate attributes, and ARIA landmark roles were reinforced by last night’s informative presentation from Aaron Cannon at the League of Front-End Developers group meeting. A web accessibility consultant, totally blind since birth, Aaron discussed and demonstrated using the internet with a screen reader.
ARIA Landmark Roles
One of the biggest problems screen readers have is finding the main content of a web page. The Accessible Rich Internet Application Suite (ARIA) has a broad set of guidelines for improving web accessibility; perhaps the quickest improvement a developer can make is adding a role=”main” attribute to the tag the contains a page’s primary content.
Useful Alternate Attributes
Everyone knows that the “alt” attribute is required for all image tags, but it’s important to remember that it’s there to aid in accessibility. Aaron offered these suggestions:
- Use a blank alt attribute (alt=””) for images that are eye candy or another form of graphic embellishment.
- Describe the function (not the aesthetic) of UI elements.
- Convey the information presented in images containing charts, graphs, etc.
-
The title attribute is usually ignored by screen readers.
- An audience member suggested that it’s probably a more appropriate place for SEO keywords than polluting the alt attribute.
Meaningful, Semantic HTML
Solid, meaningful, semantic HTML is good for a plethora of reasons, including accessibility. While not all OS / browser / screen reader combinations take full advantage of HTML5, support is gradually improving, and websites with proper markup do (or soon will) improve screen reader performance. For instance, screen readers often jump from heading to heading to quickly locate content, just as a sighted user would.
Testing Accessibility
The only way to really test a website’s accessibility is to hand it over to someone who uses a screen reader. Aaron suggested soliciting assistance via email lists frequented by blind users. As an interesting aside, he also mentioned that email lists are much more popular the forums, as most forum platforms have relatively poor accessibility. He also said that offering a $10 iTunes gift card will go a long way in encouraging participation, and, as with any user testing, seek feedback by having participants perform specific tasks.
Keep Writing Good Code
In conclusion, it’s important for developers to produce good markup, use role and alternate attributes correctly, and keep in mind that not every web user has the ability to see the quality of your work with their eyes.
