Making Flash Accessible and SEO Friendly

Flash has always been a great vehicle for delivering multimedia content on the web. I’m always wowed by its unlimited bounds, but I’m simultaneously disappointed by its poor handling of SEO and accessibility. While the rest of the web has evolved into a rich and standards-based medium, Flash and its developers have concentrated on beefing up the bling. In 2005 Macromedia published Best Practices for Accessible Flash Design, a white paper that did little to address real accessibility needs.

The issue stems from how Flash is referenced within a web page. Traditionally Flash was detected by HTML using either <embed> or <object> tags, however both tags have accessibility and plug-in detection issues, and <embed> is invalid XHTML. These methods can cause some browsers and screen readers to misinterpret or entirely ignore your Flash content.

My favorite solution to this problem has been Bobby van der Sluis’ Unobtrusive Flash Object (UFO), but it was recently deprecated and replaced by Geoff Stearns’ SWFObject 2.0. Like UFO, SWFObject is a DOM script that detects the Flash plug-in and embeds Flash objects. It’s JavaScript API provides an amazing and complete toolset for embedding SWF files and retrieving Flash Player-related information. It has its roots in the web standards community and is designed to support W3C standards-compliant, accessible and search engine friendly web design. The handy JavaScript detection determines whether Flash content or alternative content should be shown and avoids outdated Flash plug-ins break Flash content. The example below illustrates how simple it is to detecting Flash and add alternative content.

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml” lang=”en” xml:lang=”en”>
<head>
<title>SWFObject v2.0 dynamic embed – step 3</title>
<meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-1″ />
<script type=”text/javascript” src=”swfobject.js”></script>

<script type=”text/javascript”>
swfobject.embedSWF(“myContent.swf”, “myContent”, “300″, “120″, “9.0.0″);
</script>

</head>
<body>
<div id=”myContent”>
<p>Alternative content</p>
</div>
</body>
</html>

Also posted in Accessibility, Web Standards, Web Technology | Leave a comment

Microformats

Over the course of four days, I attended roughly twenty panels at SXSW Interactive. The discussions covered everything from online social networks for teens to a primer on the mobile web. One event really stood out for me, but it wasn’t the Mardi Gras atmosphere or the celebrity keynote speakers.

Tantek Çelik (Chief Technologist at Technorati) moderated The Growth and Evolution of Microformats. Microformats are a set of simple, open data formats that standardize the meaning of HTML content. Examples of content that can be used with Microformats include people, organizations, events, addresses and more. Many sites including Google, Upcoming, and Flickr are using microformats, and both Firefox 3 and Internet Explorer 8 will have built-in microformat readers. Until then, microformats can be read through the Operator and Tails Firefox extensions.

Formatting Your Data

Let’s use my contact information as an example where we will use the hCard format (a microformat that represents people, companies, organizations, and places). On my contact page, I posted my name and contact information. If this information is relevant to a user, they may copy it—line by line—to a contact list in Outlook, iCal, or a mobile device. By adding an hCard, this process is automated. The code looks like this:

<div id=”hcard-Brian-Peppler” class=”vcard”>
<a class=”url fn” href=”http://www.brianpeppler.com”>Brian Peppler</a><br />
<a class=”email” href=”mailto:brian@brianpeppler.com”>brian
@brianpeppler.com</a>
<div class=”adr”>
<div class=”street-address”>1514 17th St. NW #101</div>
<span class=”locality”>Washington</span>, <span class=”region”>DC</span>, <span class=”postal-code”>20036</span> <span class=”country-name”>USA</span> </div>
</div>

The result can be formatted in HTML like this:

Brian Peppler

1514 17th St. NW #101

Washington, DC, 20036 USA

Your contact information can also be formatted as a downloadable hCard
through the Technorati Contacts Feed Service.

This looks nice, but what good does it do? Aside from exporting the data to desktop applications, mobile phone browsers visiting this site can place a call to me directly from my microformatted content.

Additional Resources

Check out the Dreamweaver microformat extension and microformats.org help creating your own microformats.

Also posted in Web Technology | Leave a comment