<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Advanced CSS Design Resources - last-child.com &#187; HTML Elements</title>
	<atom:link href="http://www.last-child.com/category/html-elements/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.last-child.com</link>
	<description>CSS Toys for Professional Web Developers</description>
	<lastBuildDate>Mon, 19 Dec 2011 18:30:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>Debugging aria-label on elements</title>
		<link>http://www.last-child.com/debugging-aria-label/</link>
		<comments>http://www.last-child.com/debugging-aria-label/#comments</comments>
		<pubDate>Mon, 19 Dec 2011 18:30:15 +0000</pubDate>
		<dc:creator>Ted</dc:creator>
				<category><![CDATA[Accessibility]]></category>
		<category><![CDATA[ARIA]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Span]]></category>
		<category><![CDATA[aria-label]]></category>
		<category><![CDATA[mobile]]></category>

		<guid isPermaLink="false">http://www.last-child.com/?p=300</guid>
		<description><![CDATA[I recently helped do some testing on the new version Yahoo! Mail for iPads and was stumped by an aria-label not working as expected. It was one of those gotcha moments, when you realize a confusion with a fundamental process. Are you wondering why your aria-label is not being announced? The aria-label attribute is tempting [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.last-child.com/wp-content/uploads/2011/12/forecast-icons.png" alt="Sat, Sun, Mon - Forecast icons" width="89" height="110" class="alignright size-full wp-image-302" />I recently helped do some testing on the new version <a href="http://mail.yahoo.com">Yahoo! Mail</a> for iPads and was stumped by an aria-label not working as expected. It was one of those gotcha moments, when you realize a confusion with a fundamental process. Are you wondering why your aria-label is not being announced?</p>
<p>The aria-label attribute is tempting to use in situations where the visible text is not adequate.  For instance, you may use a background image to represent a value and you&#8217;d like the user to know that value via an aria-label on the parent. </p>
<p>This basic test page will walk through the simple assumption and show how the aria-label is meant to be used.</p>
<h3>Base configuration</h3>
<ul>
<li><a href="/" aria-label="this basic link has an aria label attribute" >basic link</a><br />
<code>&lt;a href=&quot;/&quot; aria-label=&quot;this basic link has an aria label attribute&quot; &gt;basic link&lt;/a&gt;</code></li>
<li><span aria-label="this basic span has an aria label attribute">basic span</span><br />
<code>&lt;span aria-label=&quot;this basic span has an aria label attribute&quot;&gt;basic span&lt;/span&gt;</code></li>
<li><b aria-label="this basic b has an aria label attribute">basic bold</b><br />
<code>&lt;b aria-label=&quot;this basic b has an aria label attribute&quot;&gt;basic bold&lt;/b&gt;</code></li>
</ul>
<h4>Give &lt;span&gt; and &lt;b&gt; tabindex=&quot;0&quot; to place into tab flow</h4>
<p>Span and b tags are not in the native tab flow. I added tabindex=&quot;0&quot; to see if that was the problem. Now that we can give them focus, the aria-label is still ignored.</p>
<ul>
<li><span aria-label="this basic span has an aria label attribute" tabindex="0">basic span</span><br />
<code>&lt;span aria-label=&quot;this basic span has an aria label attribute&quot; tabindex=&quot;0&quot;&gt;basic span&lt;/span&gt;</code></li>
<li><b aria-label="this basic b has an aria label attribute" tabindex="0">basic bold</b><br />
<code>&lt;b aria-label=&quot;this basic b has an aria label attribute&quot; tabindex=&quot;0&quot;&gt;basic bold&lt;/b&gt;</code></li>
</ul>
<h3>What&#8217;s going wrong</h3>
<p><a href="http://yaccessibilityblog.com/library/tag/aria">ARIA</a> is a tool to make our web sites more accessible. It&#8217;s meant to restore semantic structure and act as a bridge between dynamic web sites and assistive technology. ARIA roles, states, and values allow the web developer to give directions to assistive technology to explain how an element should be treated. This is especially true when the element is expected to work in a non-standard method. For instance, <a href="http://yaccessibilityblog.com/library/aria-fix-non-standard-images.html">Flickr uses divs with background images</a> as images to improve animation on mobile devices.</p>
<p>The aria-label attribute allows us to place a label on these elements that have been re-purposed via JavaScript. It&#8217;s not meant to replace the title attribute on generic tags. </p>
<h3>Convert elements with aria</h3>
<p>The following elements now have ARIA roles: button, img, and slider. These ARIA roles announce the new purpose of these elements. Their aria-label attributes are announced, as they are adding information to these faux-elements. </p>
<ul>
<li><a href="/" aria-label="this link is now a button" role="button">basic link</a><br />
<code>&lt;a href=&quot;/&quot; aria-label=&quot;this link is now a button&quot; role=&quot;button&quot;&gt;basic link&lt;/a&gt;</code></li>
<li><span aria-label="this span is now treated as an image." role="img" class="fakeimg" tabindex="0">basic span</span><br />
<code>&lt;span aria-label=&quot;this span is now treated as an image.&quot; role=&quot;img&quot; class=&quot;fakeimg&quot; tabindex=&quot;0&quot;&gt;basic span&lt;/span&gt;</code></li>
<li><b aria-label="this b is now treated as a slider" role="radio" tabindex="0">basic bold</b><br />
<code>&lt;b aria-label=&quot;this b is now treated as a radio button&quot; role=&quot;radio&quot; tabindex=&quot;0&quot;&gt;basic bold&lt;/b&gt;</code></li>
</ul>
<h3>Back to the original problem</h3>
<p><img src="http://www.last-child.com/wp-content/uploads/2011/12/forecast-icons.png" alt="Sat, Sun, Mon - Forecast icons" width="89" height="110" class="alignright size-full wp-image-302" /> In the forecast example, the original idea was to put aria-label on the span that included the text &#8220;Sat&#8221;, &#8220;Sun&#8221;, or &#8220;Mon&#8221;. The aria-label described the weather illustrated in the icon. After realizing this was not working, we realized it was being over-thought. The icons were background images, we just needed to add the desired text to the background image container. </p>
<p>ARIA is a great way to solve problems. However, it wasn&#8217;t meant to replace basic HTML.  Here&#8217;s a proposed solution sans ARIA:</p>
<pre>
<code>
&lt;th scope="row" title=&quot;Saturday&quot;&gt;Sat&lt;/th&gt;
&lt;td class=&quot;cloudy&quot;&gt;&lt;span class=&quot;visuallyhidden&quot;&gt;Cloudy&lt;/span&gt;&lt;/td&gt;
</code>
</pre>
<h3>Resources</h3>
<ul>
<li><a href="http://www.w3.org/TR/wai-aria/roles#textalternativecomputation">ARIA Text Alternative Computation</a></li>
<li><a href="http://www.w3.org/TR/wai-aria/states_and_properties#aria-label">Spec for aria-label</a></li>
<li><a href="http://yaccessibilityblog.com/library/css-clip-hidden-content.html" >Clip your hidden content for better accessibility</a></li>
<li><a href="http://yaccessibilityblog.com/library/dynamic-form-labels-aria.html">Create Dynamic Form Labels with ARIA</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.last-child.com/debugging-aria-label/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Add Pagination to your Yahoo! BOSS search engine</title>
		<link>http://www.last-child.com/pagination-boss-search-engine/</link>
		<comments>http://www.last-child.com/pagination-boss-search-engine/#comments</comments>
		<pubDate>Fri, 12 Sep 2008 15:07:52 +0000</pubDate>
		<dc:creator>Ted</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Unordered List]]></category>
		<category><![CDATA[Yahoo!]]></category>
		<category><![CDATA[YUI]]></category>
		<category><![CDATA[Application programming interface]]></category>
		<category><![CDATA[Cross Site Scripting]]></category>
		<category><![CDATA[Design pattern]]></category>
		<category><![CDATA[Web search engine]]></category>

		<guid isPermaLink="false">http://www.last-child.com/?p=161</guid>
		<description><![CDATA[Yahoo&#8217;s BOSS search API makes it easy for you to create a customized search engine. Yahoo! also has a Design Pattern lLibrary to save time designing your pages. They&#8217;ve put a lot of effort into creating the best user experience for search pagination. Pagination guidelines Here&#8217;s a sample of the Design Library&#8217;s ideas for search [...]]]></description>
			<content:encoded><![CDATA[<p>
<a href="http://developer.yahoo.com/ypatterns/pattern.php?pattern=searchpagination"><img src="http://developer.yahoo.com/ypatterns/images/ysearch-page7.png" alt="Search pagination example"></a><a href="http://developer.yahoo.com/search/boss">Yahoo&#8217;s BOSS search API</a> makes it easy for you to create a customized search engine. Yahoo! also has a <a href="http://developer.yahoo.com/ypatterns/index.php">Design Pattern lLibrary</a> to save time designing your pages. They&#8217;ve put a lot of effort into creating the best user experience for <a href="http://developer.yahoo.com/ypatterns/pattern.php?pattern=searchpagination">search pagination</a>. </p>
<h3>Pagination guidelines</h3>
<p>Here&#8217;s a sample of the Design Library&#8217;s ideas for search pagination.</p>
<blockquote cite="http://developer.yahoo.com/ypatterns/pattern.php?pattern=searchpagination">
<ul>
<li>Display the navigation controls as a row of links.</li>
<li>Present links in the following order: &#8216;Prev&#8217;, page links, &#8216;Next&#8217;.</li>
<li>Display a left arrow after the label &#8216;Prev&#8217;.</li>
<li>Display a right arrow before the label &#8216;Next&#8217;.</li>
<li>Make the arrow(s) clickable.</li>
<li>The page links should contain a maximum set of 10 page links. If fewer pages of results exist, only show page links for the available pages.</li>
<li>When on pages 1-6, the page links should always start at &#8217;1&#8242;.</li>
</ul>
<p><cite><a href="http://developer.yahoo.com/ypatterns/pattern.php?pattern=searchpagination">Search Pagination</a></cite>
</p></blockquote>
<p>The rationale for these rules is also interesting: </p>
<blockquote>
<ul>
<li>Displaying arrow graphics helps differentiate the links and provides larger click targets.</li>
<li>Disabled controls add little value in this context since
<ul>
<li>These links often appear blow the fold.</li>
<li>The first page of results makes up the vast majority of pageviews. Displaying a disabled &#8220;previous&#8221; control on all of these is of little added value.</li>
<li>Although a &#8220;First&#8221; link has value, it competes with the functionality presented in the random-access links. </li>
<li>The &#8220;Last&#8221; link is of little value as the results are sorted by relevance.  This is is also problematic since the total number of results (and therefore, the last result) may not be known. </li>
</ul>
</li>
</ul>
</blockquote>
<h3>Add this pagination style to your search engine</h3>
<p>See the final result on <a href="http://v3ggie.com/">V3GGIE.com</a>: <a href="http://v3ggie.com/recipes/vegetarian+enchiladas.html">Vegetarian Enchiladas Recipes</a></p>
<p>Most <a href="http://php.net/" title="PHP" rel="homepage" class="zem_slink">PHP</a> pagination tutorials assume you are pulling content from a database. <a href="http://ascaniocolonna.com/en/">Ascanio Colonna</a> created a <a href="http://blog.ascaniocolonna.com/?p=12">good tutorial on building pagination</a> with PHP that is agnostic to the data source. I&#8217;ve taken his code and modified it to match the Yahoo Design Pattern. I&#8217;ve also added the suggested <a href="http://developer.yahoo.com/yui/container/module/index.html">YUI Module markup</a> to stay consistent with the <a href="http://developer.yahoo.com/yui/grids/">YUI Grids</a> and any future YUI javascript.</p>
<p>
The pagination.php file includes a function that creates the module. You&#8217;ll need to call this function from your results page with a series of parameters. These are easy to populate from the BOSS interface. It&#8217;s worth noting that I am ignoring the BOSS next/last page nodes in the web service and prefer to build my own urls.</p>
<h3>The Pagination Code</h3>
<p>
Lets&#8217; start by looking at the code inside your results.php file. This will call the pagination function and pass the desired parameters.</p>
<p><code lang="PHP"><br />
if(!empty($searchQuery))<br />
  {<br />
	require '/include/pagination.php';<br />
  if(isset($_REQUEST['page'])) {<br />
	$page = $_REQUEST['page'];<br />
	} else  {<br />
	$page = '1';<br />
	}<br />
	$limit = $count;<br />
	$targetpage = 'results.php';<br />
	$pagestring = '?page=';<br />
	$summary_name = 'articles';<br />
	$placement = 'summary';<br />
	// start pagination<br />
	  echo getPaginationString($page, $totalhits, $limit,  $targetpage, $pagestring, $summary_name, $placement);<br />
 }<br />
</code></p>
<h4>Here&#8217;s what you are working with:</h4>
<dl>
<dt> require &#8216;/include/pagination.php&#8217;</dt>
<dd>Where does the pagination file sit on your server</dd>
<dt>$page logic</dt>
<dd>First look to see if there is page=x in the url. If so, $page = x, if not, you are on page 1.</dd>
<dt>$limit</dt>
<dd>How many results will appear on the page</dd>
<dt>$targetpage</dt>
<dd>what is the name of your results page? index.php, results.php?</dd>
<dt>$pagestring</dt>
<dd>I tried to minimize this to ?p= but couldn&#8217;t track down why it didn&#8217;t work. I&#8217;ve left it at the default ?page=&#8230;</dd>
<dt>$summary_name</dt>
<dd>This is what appears in the text &#8220;xxx (summary_name) results. This is not used in the Yahoo Design Library</dd>
<dt>$placement</dt>
<dd>You&#8217;ll probably want to use summary. This function also allows &#8220;footer&#8221; for a simplified output</dd>
<dt>echo getPaginationString(&#8230;)</dt>
<dd>Send the information to the function and display the results in the page.</dd>
</dl>
<hr />
<h3>Important Update!</h3>
<p>The original code I posted had a serious security flaw. You should never output user&#8217;s input directly into your page. I had something like this href=&#8221;?query=$_REQUEST['query']&#8220;. This allows all sorts of <a href="http://en.wikipedia.org/wiki/Cross-site_scripting" title="Cross-site scripting" rel="wikipedia" class="zem_slink">Cross Site Scripting</a> attacks. You must urlencode any text that comes from a user. This is safe: urlencode($_REQUEST['query']).</p>
<p>I apologize if anyone has used this code, as I wrote it on their site. They should immediately update the logic. -Ted</p>
<hr />
<h3>The pagination function</h3>
<p>
I have streamlined the original code from Asconio, as he was tying into pre-existing facebook styles. This code is for your unique web site. It&#8217;s also worth noting I use rewrite rules to make my search result page urls more friendly, i.e. /corn.html instead of /result.php?q=corn</p>
<p><code lang="PHP"><br />
<?php </p>
<p>//text strings in strings.php</p>
<p>function getPaginationString($page = 1, $totalitems, $limit = 15, $targetpage = '/', $pagestring = '?page=', $summary_name = 'items', $placement = 'summary',$safeQuery)<br />
{</p>
<p>$countnum = '15';</p>
<p>	// inurl or intitle<br />
	// it should only be three digits long, int, inu, or nox anything else could be a vulnerability<br />
	//int=intitle, inu=inurl, nox=no setting<br />
	if (isset($_REQUEST['inx']) &#038;&#038; strlen($_REQUEST['inx']) == 3){<br />
	$inxv = $_REQUEST['inx'];<br />
	}<br />
	else {<br />
	$inxv = '';<br />
	}</p>
<p>	// type of query<br />
	// request type should only be 2 chars, if not we are dealing with an xss attack<br />
	// type options: rc, lo, ve... these represent recipes, local, buzz for insider sites.<br />
	if (!empty($_REQUEST['t']) &#038;&#038; strlen($_REQUEST['t']) <= 2) {<br />
		$tid = $_REQUEST['t'];<br />
	}<br />
	else{<br />
	$tid = 've';}<br />
// count should only be a number. don't allow text for xss protection<br />
if (!empty($_REQUEST['count'])) {<br />
	$countnum = number($_REQUEST['count']);<br />
	$limit = $countnum;<br />
}<br />
	// DEFAULTS<br />
	$adjacents = 10;<br />
	//$targetpage = .'.html';<br />
	// VARS<br />
	if(substr($pagestring, 0, 1) != '?') $pagestring = '?' . $pagestring; // If query string is lacking start, add it<br />
	if(substr($pagestring, strlen($pagestring) - 5) != 'page=') $pagestring .= '&#038;page='; // If query string is lacking page var, add it<br />
	$prev = $page - 1;<br />
	$next = $page + 1;<br />
	$firstpage = 1;<br />
	$lastpage = ceil($totalitems / $limit);<br />
	$fiop = ($limit * $page) - $limit + 1; //# of first item displayed in current page<br />
	$liop = min($limit * $page, $totalitems); //# of last item displayed in current page<br />
	$searchstring = "&amp;t=$tid&amp;inx=$inxv";<br />
	$nicetotal = number_format($totalitems);</p>
<p>	/*<br />
		DRAW PAGINATOR<br />
	*/</p>
<p>	// Give it the right class (the footer paginator has no summary and the current page has a different gfx)<br />
	if($placement == 'summary')<br />
		$type = 'summary';<br />
	else<br />
		$type = 'footer';</p>
<p>	// Draw summary<br />
	if($placement == 'summary')<br />
		$pagination .= "
<div class=\"summary hd\">
<h4>$string_results_page</h4>
</div>
<p>";</p>
<p>	if($lastpage > 1) // Paginator page selection is drawn only if more than 1 pages are there<br />
	{	</p>
<p>		$pagination .= '
<div class="bd">
<ul>';</p>
<p>		// First page selector<br />
		if ($page > 2) </p>
<p>		// Previous page selector<br />
		if ($page > 1)<br />
			$pagination .= "
<li class=\"prevlink\"><a href=\"$safeQuery.html$pagestring$prev$searchstring\">$string_next</a></li>
<p>";	</p>
<p>		// Page selectors<br />
		if ($page < 4)	//not enough pages to bother<br />
		{<br />
			for ($counter = 1; $counter <= min(5, $lastpage); $counter++)<br />
			{<br />
				if ($counter == $page)<br />
					$pagination .= "
<li class=\"current\"><strong>$counter</strong></li>
<p>";<br />
				else<br />
					$pagination .= "
<li><a href=\"$safeQuery.html$pagestring$counter$searchstring\">$counter</a></li>
<p>";<br />
			}<br />
		}<br />
		elseif ($page > $lastpage - 3)<br />
		{<br />
			for($counter = $lastpage - min(5, $lastpage); $counter <= $lastpage; $counter++)<br />
			{<br />
				if ($counter == $page)<br />
					$pagination .= "
<li class=\"current\"><strong>$counter</strong></li>
<p>";<br />
				else<br />
					$pagination .= "
<li><a href=\"$safeQuery.html$pagestring$counter$searchstring\">$counter</a></li>
<p>";<br />
			}<br />
		}<br />
		else<br />
		{<br />
			for($counter = $page - 2; $counter <= $page + 2; $counter++)<br />
			{<br />
				if ($counter == $page)<br />
					$pagination .= "
<li class=\"current\"><strong>$counter</strong></li>
<p>";<br />
				else<br />
					$pagination .= "
<li><a href=\"$safeQuery.html$pagestring$counter$searchstring\">$counter</a></li>
<p>";<br />
			}<br />
		}</p>
<p>		//next button<br />
		if ($page < $lastpage)<br />
			$pagination .= "
<li class=\"nextlink\"><a href=\"$safeQuery.html$pagestring$next$searchstring\">$string_next</a></li>
<p>";</p>
<p>		//last button<br />
		if ($page < $lastpage - 1) </p>
<p>		$pagination .= '</ul>
</div>
<p>';<br />
	}</p>
<p>	$pagination = "
<div class=\"pagelinks \">$pagination</div>
<p>";</p>
<p>	return $pagination;</p>
<p>} ?></p>
<p><?php</p>
<p>//This allows user to easily try the search with different options</p>
<p>// strings are translated defined in separate file for localization<br />
//$string_try_diff_type   = "Try a different type of search";<br />
//$string_try_diff_header = "Didn't find what you were looking for?";<br />
//$string_try_inx         = "Try searching for $safeQuery only in page titles";</p>
<p>function trySomethingelse($safeQuery, $searchQuery, $inx, $tid,$string_try_diff_header, $string_try_diff_type, $string_try_inx, $string_buzz_tab, $string_local_tab,$string_recipes_tab){<br />
if($inx==''){<br />
$tryinx = "
<li><a href=\"/$safeQuery.html?inx=int\">$string_try_inx</a>";<br />
}<br />
$trydiff='';<br />
switch ($tid){<br />
case "rc":<br />
$trydiff = "</p>
<li>$string_try_diff_type <a href=\"/$safeQuery.html?t=lo\">$string_local_tab</a> or<br />
<a href=\"/$safeQuery.html?t=ve\">$string_buzz_tab</a>";<br />
break;<br />
case "lo":<br />
$trydiff = "</p>
<li>$string_try_diff_type <a href=\"/$safeQuery.html?t=rc\">$string_recipes_tab</a> or<br />
<a href=\"/$safeQuery.html?t=ve\">$string_buzz_tab</a>";<br />
break;<br />
default:<br />
$trydiff = "</p>
<li>$string_try_diff_type <a href=\"/$safeQuery.html?t=rc\">$string_recipes_tab</a> or<br />
<a href=\"/$safeQuery.html?t=lo\">$string_local_tab</a>";<br />
}</p>
<p>?></p>
<div class="different mod">
<div class="hd"><?php print $string_try_diff_header ;?></div>
<div class="bd">
<ul>
<?php<br />
print 	$tryinx;<br />
print  	$trydiff;<br />
?></p>
</ul>
</div>
</div>
<p><?php<br />
}<br />
?></p>
<p></code></p>
<p>
I&#8217;ve added a few classes to the final output. The previous and next links have class&#8221;nextlink&#8221; or class=&#8221;prevlink&#8221;. The current page has the number within a strong tag with class=&#8221;current&#8221;. Finally, the parent module has class=&#8221;pagelinks mod&#8221;. This makes it pretty simple to style</p>
<h4>Pagination CSS</h4>
<p>I&#8217;m using the YUI Sam Skin sprite for the tabbed search box. I&#8217;ve added a couple arrows to this sprite for my search pagination. </p>
<p><code lang="CSS"><br />
.pagelinks {<br />
text-align:center;<br />
border:1px solid #ccc;<br />
padding:5px 0 0 0;<br />
}<br />
.pagelinks ul li {<br />
display:inline;<br />
}<br />
.pagelinks ul a, .pagelinks ul strong {<br />
display;block; padding:3px 5px;<br />
}<br />
.pagelinks ul strong {<br />
background-color:green; color:#fff;<br />
}<br />
.pagelinks li.nextlink a,.pagelinks li.prevlink a  {<br />
padding-right:15px; font-size:120%; font-wieght:bold; background:url(/images/sprite.png) no-repeat 100% -1943px;<br />
}<br />
.pagelinks li.prevlink a {<br />
padding-right:0px; padding-left:15px; background-position:0 -1973px;<br />
}<br />
</code></p>
<p>
I am also not a PHP expert and welcome suggestions on improving the code.</p>
<h3>Download files</h3>
<ul>
<li><a href="http://www.last-child.com/pagination.txt">Pagination functionality for a BOSS site (.txt)</a> &#8211; the php code and sample to insert the pagination.</li>
</ul>
<h3>Related articles by Zemanta</h3>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="http://chris.pirillo.com/2008/09/11/are-you-tired-of-the-same-old-search-engine/">Are You Tired of the Same Old Search Engine?</a></li>
<li class="zemanta-article-ul-li"><a href="http://lifehacker.com/5046701/buildasearch-combines-multiple-site-seaches-into-one-box">Buildasearch Combines Multiple Site Seaches into One Box [Search]</a></li>
<li class="zemanta-article-ul-li"><a href="http://www.last-child.com/create-search-yahoo-boss/">Create your own Search Engine with Yahoo! BOSS</a></li>
<li class="zemanta-article-ul-li"><a href="http://blog.programmableweb.com/2008/09/11/5-best-practices-for-mashups/">5 Best Practices for Mashups</a></li>
<li class="zemanta-article-ul-li"><a href="http://blog.programmableweb.com/2008/09/11/5-best-practices-for-mashups/">5 Best Practices for Mashups</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.last-child.com/pagination-boss-search-engine/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Create a tabbed search form with YUI</title>
		<link>http://www.last-child.com/tabbed-search-form-yui/</link>
		<comments>http://www.last-child.com/tabbed-search-form-yui/#comments</comments>
		<pubDate>Tue, 09 Sep 2008 14:00:59 +0000</pubDate>
		<dc:creator>Ted</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Form]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Link]]></category>
		<category><![CDATA[Online Resource]]></category>
		<category><![CDATA[Yahoo!]]></category>
		<category><![CDATA[YUI]]></category>
		<category><![CDATA[Cascading Style Sheets]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.last-child.com/?p=159</guid>
		<description><![CDATA[Yahoo! makes it easy to create an accessible, handsome tabbed interface. I used their Tab View library to create the tabbed search form for V3GGIE.com. While Tab View can create the tabbed content dynamically, I&#8217;m using it to hide/show hard-coded individual forms. Update: I&#8217;ve removed the tabbed interface from V3GGIE.com. This particular use of the [...]]]></description>
			<content:encoded><![CDATA[<p>Yahoo! makes it easy to create an accessible, handsome tabbed interface. I used their Tab View library to create the tabbed search form for <a href="http://v3ggie.com">V3GGIE.com</a>. While Tab View can create the tabbed content dynamically, I&#8217;m using it to hide/show hard-coded individual forms.</p>
<p><ins datetime="2008-09-28T16:10:07+00:00"><strong>Update:</strong> I&#8217;ve removed the tabbed interface from V3GGIE.com. This particular use of the tabbed module seemed to have created some confusion in users. The approach is still valid, just not the way I originally implemented it.</ins><a href="http://v3ggie.com"><img src="http://www.last-child.com/wp-content/uploads/2008/09/v3ggie-form-300x45.png" alt="" class="alignnone size-medium wp-image-160" height="45" width="300"> See the tabbed search form on V3GGIE.com </a></p>
<h3>Step 1. Create the basic HTML code.</h3>
<p>The tabbed code is a simple pattern: </p>
<ol>
<li>Start with a parent div and give it an id and class=&#8221;yui-navset&#8221;.<br />
	  <code lang="HTML">
<div class="yui-g yui-navset" id="v3search"></div>
</li>
<p></code></p>
<li>Create an unordered list inside this div with class=&#8221;yui-nav&#8221;.</li>
<li>Each list includes a deep link to a corresponding div that is also a child of the parent div. The link text in an em tag.<br />
	  <code lang="HTML">
<li><a href="#vesearch"><em>V3GGIE Search</em></a></li>
<p></code></li>
<li>Create a div with class=&#8221;yui-content&#8221; and create a set of content containing divs. Each div has an id.<br />
	  <code lang="HTML"></p>
<div class="yui-content">
<div id="vesearch">...</div>
<div id="losearch">...</div>
<div id="rcsearch">...</div>
</p></div>
<p></code>
	</li>
<li>Insert the Tabview CSS at the top of the page, the Tab View JS at the bottom of the page, create a small js that instantiates the tab-view module.</li>
<li>For easier styling, use the sam_skin CSS package and add class=&#8221;yui-skin-sam&#8221; to the body.</li>
</ol>
<h3>Step 2. Use PHP to make it more interesting</h3>
<p>Each page calls this chunk of code to insert the tabbed form, it also sets a variable ($selected),  determining which tab is selected on page load. I&#8217;m also inserting the last search query into the text input to make it easier on the user. This is easily done by grabbing the query from the Request object. </p>
<p>The finished code: </p>
<p>	<code lang="PHP"></p>
<div class="yui-g yui-navset" id="v3search">
<!--<?php print $selected ;?>--></p>
<ul class="yui-nav">
<li> &gt;<a href="#vesearch"><em>V3GGIE Search</em></a></li>
<li> &gt;<a href="#losearch"><em>Local</em></a></li>
<li> &gt;<a href="#rcsearch"><em>Recipes</em></a></li>
<li> &gt;<a href="#nesearch"><em>News</em></a></li>
<li> &gt;<a href="#blsearch"><em>Blogs</em></a></li>
</ul>
<div class="yui-content">
<div id="vesearch">
<form name="b" action="/results.php" method="get">
   <label for="vquery">Search for Vegetarian information</p>
<input id="vquery" size="50" name="query" value="&lt;?php print $inputtext; ?&gt;" type="text"></label></p>
<input class="searchsubmit" value="Search" type="submit">
   </form>
</p></div>
<div id="losearch">
<form name="b" action="/local/results.php" method="get">
   <label for="lquery">Where do you want to eat?</p>
<input size="50" id="lquery" name="query" value="&lt;?php print $inputtext; ?&gt;" type="text"></label></p>
<input class="searchsubmit" value="Search" type="submit">
<p>Try "San Francisco Pho", "Paris Fromage",  or "92104 tofu"</p>
</p></form>
</p></div>
<div id="rcsearch">
<form name="b" action="/recipes/results.php" method="get">
   <label for="rquery">What are you hungry for?</p>
<input size="50" name="query" id="rquery" value="&lt;?php print $inputtext; ?&gt;" type="text"></label></p>
<input class="searchsubmit" value="Search" type="submit">
<p>Try "corn chowder" or "vegan pizza"</p>
</p></form>
</p></div>
<div id="nesearch">
<form name="b" action="/news/results.php" method="get">
   <label for="nquery">Get Vegetarian news?</p>
<input size="50" id="nquery" name="query" value="&lt;?php print $inputtext; ?&gt;" type="text"></label></p>
<input class="searchsubmit" value="Search" type="submit">
<p>Try "Vegetarian Chinese Olympics"</p>
</p></form>
</p></div>
<div id="blsearch">
<form name="b" action="/blogs/results.php" method="get">
   <label for="bquery">What are the blogs saying?</p>
<input size="50" id="bquery" name="query" value="&lt;?php print $inputtext; ?&gt;" type="text"></label></p>
<input class="searchsubmit" value="Search" type="submit">
<p> Try a subject: "PETA", "Tempeh", or "Paris -Hilton Vegetarian"</p>
</p></form>
</p></div>
</p></div>
</p></div>
<p></code></p>
<p><a href="http://v3ggie.com/search-form.txt">View the source as a text file</a></p>
<h3>The Final Product</h3>
<p>We now have a tabbed module that allows the user to find recipes, news, blogs, and local restaurants from any page. This is an easy introduction to the <a href="http://developer.yahoo.com/YUI/">YUI</a> libraries. However,  I came across the following surprises:</p>
<ul>
<li>The order of the tabs must match the order of the target divs. I moved my tabs around and discovered they were toggling the wrong forms.</li>
<li>The links that generate the tabs need to have em tags surrounding the text</li>
<li>You&#8217;ll need to download the entire <a href="http://sourceforge.net/project/downloading.php?group_id=165715&amp;filename=yui_2.5.2.zip">YUI package</a> to gain access to the CSS and sprites needed for the library. The examples on the YUI site assume relative links to files, you will either need to duplicate that file structure or upload the skin&#8217;s sprite and change the CSS accordingly. </li>
</ul>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles by Zemanta</h6>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="http://woork.blogspot.com/2008/07/navigation-bar-with-tabs-using-css.html">Navigation bar with tabs using CSS and sliding doors effect</a></li>
<li class="zemanta-article-ul-li"><a href="http://ajaxian.com/archives/filament-groups-accessible-extensions">Filament Group&#8217;s Accessible Extensions</a></li>
<li class="zemanta-article-ul-li"><a href="http://www.stylegala.com/news/public200809/4777.htm">jQuery Nested Menu</a></li>
<li class="zemanta-article-ul-li"><a href="http://ajaxian.com/archives/the-lessons-of-css-frameworks">The lessons of CSS frameworks</a></li>
<li class="zemanta-article-ul-li"><a href="http://ajaxian.com/archives/rounded-tabs-with-dijit">Rounded tabs with Dijit</a></li>
<li class="zemanta-article-ul-li"><a href="http://jtame05.wordpress.com/2008/06/16/dynamic-css-yet-another-follow-up/">Dynamic CSS (Yet another follow up)</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.last-child.com/tabbed-search-form-yui/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding style to your rel attributes with CSS</title>
		<link>http://www.last-child.com/rel-attribute-display/</link>
		<comments>http://www.last-child.com/rel-attribute-display/#comments</comments>
		<pubDate>Wed, 25 Jun 2008 15:03:00 +0000</pubDate>
		<dc:creator>Ted</dc:creator>
				<category><![CDATA[attribute selector]]></category>
		<category><![CDATA[background]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[CSS2]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[Image Sprites]]></category>
		<category><![CDATA[Link]]></category>
		<category><![CDATA[microformats]]></category>
		<category><![CDATA[W3C]]></category>
		<category><![CDATA[attribute]]></category>
		<category><![CDATA[Cascading Style Sheets]]></category>
		<category><![CDATA[Data Formats]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[rel]]></category>
		<category><![CDATA[xfn]]></category>

		<guid isPermaLink="false">http://www.last-child.com/?p=153</guid>
		<description><![CDATA[View the finished example: Adding style to your rel link. There&#8217;s a little attribute in HTML links that is starting to get a bit of attention lately. The &#8220;rel&#8221; attribute is a sparsely defined attribute that applies some meta information about a link&#8217;s relationship to other documents. Unfortunately, this information is usually hidden from your [...]]]></description>
			<content:encoded><![CDATA[<p>View the finished example: <a href="/examples/rel-attribute/index.html">Adding style to your rel link</a>.</p>
<p>There&#8217;s a little attribute in HTML links that is starting to get a bit of attention lately. The &#8220;rel&#8221; attribute is a <a href="http://www.w3.org/TR/REC-html40/types.html#type-links">sparsely defined attribute</a> that applies some meta information about a link&#8217;s relationship to other documents. Unfortunately, this information is usually hidden from your users. Let&#8217;s take a light-hearted stab at turning it into a visual element.</p>
<h3>Rel attribute usage</h3>
<p>
While the W3C originally considered the rel attribute to describe the relationship of pages to each other, i.e. next, previous, directory, and start. The attribute has been adopted by the <a href="http://microformats.org">Microformat</a> community for its inherit usefulness. The rel attribute is now used for <a href="http://microformats.org/wiki/rel-tag">tags</a>, <a href="http://gmpg.org/xfn/">to define your relationship to someone</a>, and even to <a href="http://microformats.org/wiki/rel-nofollow">tell search engines not to bother following a link</a>. </p>
<p>
The opportunities to use the rel attribute are seemingly endless. There are more proposals to <a href="http://xen.adactio.com/">define people you don&#8217;t like</a> and <a href="http://microformats.org/wiki/vote-links">links for voting</a>.  </p>
<p>
But all of this flexibility comes at a small price. To remain valid, you need to tell the browser what these new rel values may actually mean. This is handled by <a href="http://microformats.org/wiki/profile-uris">linking to appropriate profiles</a>. Just simply insert the profiles into your head tag. <a href="http://microformats.org/wiki/profile-uris#Combined_Profile">Multiple profiles</a> may throw a validation error, but it&#8217;s ok.  You don&#8217;t need to do this for the standard rel values.</p>
<p><code lang="HTML"><br />
<head profile="http://www.ietf.org/rfc/rfc2731.txt http://www.w3.org/2006/03/hcard"><br />
</code></p>
<p>
We will be using the CSS3 attribute selector functionality to look at the value of the rel attribute and apply some style accordingly. First we&#8217;ll add some padding and a background image to any link that has a rel attribute. We&#8217;ll then use background positioning to display an icon that is appropriate for the link. It&#8217;s a fairly simple hack. </p>
<p>For more information on using attribute selectors, check out my previous posts: </p>
<ul>
<li><a href="/css-attribute-selector/">Progressive enhancement of links using the CSS attribute selector</a></li>
<li><a href="/attribute-selectors-to-provide-language-information/">Attribute selectors to provide language information</a></li>
</ul>
<h3>Sample HTML Code</h3>
<p><code lang="HTML"></p>
<li><a href="http://microformats.org/wiki/rel-nofollow" rel="no-follow">This link is ignored by search engines</a> (rel="no-follow")</li>
<li><a href="http://microformats.org/wiki/rel-tag" rel="tag">A sample tag </a> (rel="tag")</li>
<p></code></p>
<h3>Sample CSS </h3>
<p><code lang="CSS"><br />
a[rel] {padding-left:20px; background:url(rel-sprite.png) no-repeat 0 0; }<br />
a[rel~="help"] {background-position: 0 -350px ;}<br />
a[rel~="license"] {background-position: 0 -1347px ;}<br />
a[rel~="no-follow"] {background-position: 0 -1200px ;}<br />
a[rel~="tag"] {background-position: 0 -47px ;}<br />
</code></p>
<h3>It&#8217;s all fun and games</h3>
<p>
I&#8217;ll be the first to admit this exercise has significant issues. I&#8217;m assuming the following elements are true:</p>
<ol>
<li>All possible rel attribute values are accounted for in my CSS, if not there will be a blank space generated by the first rule</li>
<li>You can only have one relationship defined by XFN. Unfortunately, most people are defined by multiple values, i.e. rel=&#8221;met friend colleague&#8221;. This CSS does not account for multiple values. </li>
</ol>
<p>So, the display of your rel attributes may be a bit off in the edge cases. Keep the spirit light and nobody will say anything&#8230; I hope. Have fun with your rel attributes. They&#8217;re just sitting there waiting to be used. </p>
<p><a href="/examples/rel-attribute/index.html">View the finished rel attribute style example</a>.</p>
<h3>Related Information</h3>
<ul>
<li>Microformats Wiki: <a href="http://microformats.org/wiki/profile-uris#Combined_Profile">Profile URI&#8217;s</a></li>
<li>Microformat: <a href="http://microformats.org/wiki/rel-design-pattern">Rel Design Pattern</a></li>
<li>Microformat: <a href="http://microformats.org/wiki/rel-tag">Tags</a></li>
<li>Microformat: <a href="http://microformats.org/wiki/rel-no-follow">No Follow</a></li>
<li>Microformat: <a href="http://microformats.org/wiki/rel-bookmark">Bookmark</a></li>
<li>Microformat: <a href="http://gmpg.org/xfn/">XFN &#8211; Friends Network</a></li>
<li>Microformat: <a href="http://xen.adactio.com/">XEN &#8211; Enemies Network</a></li>
<li>W3C: <a href="http://www.w3.org/TR/REC-html40/types.html#type-links">Link Types</a></li>
<li><a href="http://www.iconbuffet.com/">Icon Buffet</a> &#8211; The source of most icons used in this example</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.last-child.com/rel-attribute-display/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Progressive enhancement of links using the CSS attribute selector</title>
		<link>http://www.last-child.com/css-attribute-selector/</link>
		<comments>http://www.last-child.com/css-attribute-selector/#comments</comments>
		<pubDate>Wed, 04 Jun 2008 20:13:00 +0000</pubDate>
		<dc:creator>Ted</dc:creator>
				<category><![CDATA[:after]]></category>
		<category><![CDATA[Accessibility]]></category>
		<category><![CDATA[attribute selector]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[CSS2]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[DHTML]]></category>
		<category><![CDATA[Hacks]]></category>
		<category><![CDATA[IE7]]></category>
		<category><![CDATA[IE8]]></category>
		<category><![CDATA[Image Sprites]]></category>
		<category><![CDATA[Link]]></category>
		<category><![CDATA[min-height]]></category>
		<category><![CDATA[Online Resource]]></category>
		<category><![CDATA[W3C]]></category>
		<category><![CDATA[attribute]]></category>
		<category><![CDATA[selector]]></category>

		<guid isPermaLink="false">http://www.last-child.com/?p=152</guid>
		<description><![CDATA[Attribute Selector Test Page We have avoided using CSS3 rules for too long. It&#8217;s been difficult to justify using rules that won&#8217;t work for a significant portion of our audience, Internet Explorer 7 and below. However, Internet Explorer 8 is coming out soon and does work with the features we like. I think it&#8217;s fairly [...]]]></description>
			<content:encoded><![CDATA[<p><a href="/examples/attrib-files/index.html">Attribute Selector Test Page </a></p>
<p>
We have avoided using CSS3 rules for too long. It&#8217;s been difficult to justify using rules that won&#8217;t work for a significant portion of our audience, Internet Explorer 7 and below.  However, Internet Explorer 8 is coming out soon and does work with the features we like. </p>
<p>
 I think it&#8217;s fairly safe to assume IE7 users will upgrade to IE8 within a short time. Those stuck with IE6 for one reason or another will slowly disappear as they are given new computers or their locked down environments are upgraded.</p>
<p>
So, with the future of CSS3 functionality within reach, I&#8217;ve been energized to begin experimenting again.  I&#8217;ll be writing a series of blog posts over the next few months that look at CSS3 functionality as a progressive enhancement. How can we continue to deliver a perfectly fine web site to IE6 and IE7 and mobile phones while enhancing the functionality of more modern browsers and devices?</p>
<h3>Attribute Selectors</h3>
<p>
CSS attribute selectors are the golden ring on the web development merry-go-round. They can be daunting to learn, addictive to use, but then disappointing when you realize they are out of your grasp when you test in Internet Explorer.  We can, however, begin using them to add additional functionality based on your pre-existing, semantic code. Attribute selectors give you power to write CSS that pinpoints the stuff you already code, without having to go back and add classes or ids. I&#8217;ve written previously about <a href="/attribute-selectors-to-provide-language-information/">using attribute selectors to let your users know the language of a site they are about to visit</a>. This trick relies on the rarely used hreflang attribute, which identifies the language of the site targeted in a link.</p>
<p>
There are many other attributes in your HTML, from <a href="http://www.w3.org/TR/html4/struct/tables.html#h-11.4.1">table headers</a>, <a href="http://www.w3.org/TR/REC-html40/struct/objects.html#adef-src-IMG">image src</a>,  <a href="http://www.w3.org/TR/html401/struct/links.html#h-12.1.4">link titles</a>, and <a href="http://www.w3.org/TR/REC-html40/interact/forms.html#h-17.6.1">selected options</a>. Think about all of those juicy attributes just waiting to be targeted. Also think about how you could actually do something useful with them.</p>
<h3>Announce the file type of a link with CSS</h3>
<p>
I once worked for a company that had hundreds of thousands of static HTML pages in their intranet. With no content management system; it was impossible to make global changes. The only thing they shared was a common set of style sheets. Does this sound familiar?  Follow along as we increase your site&#8217;s usability in a less than perfect, but efficient way. </p>
<p>
First off, for accessibility, you need to let users know when a link  will open a file, what type it is, and how large it is. This is best done by adding it to your HTML code:</p>
<p><code lang="HTML"><br />
<a href="foo.pdf" class="pdf">Foo presentation (.pdf, 5kb)</a><br />
</code></p>
<p>That delivers the information to everyone, regardless of their browser.  This, however takes time and is a daunting task for updating legacy code. </p>
<p>
We can, however, use the <a href="http://www.w3.org/TR/2001/CR-css3-selectors-20011113/#attribute-selectors">atttribute selector</a> to target the extension of the link to display the icon and insert the text describing the file type. Here&#8217;s the sample HTML code:</p>
<p><code lang="HTML"></p>
<ul>
<li><a href="foo.zip" >sample zip link</a></li>
<li><a href="foo.pdf" >sample pdf link</a></li>
<li><a href="foo.doc" >sample Word link</a></li>
<li><a href="foo.exe" >sample Executable link</a></li>
<li><a href="foo.png" >sample png image</a></li>
<li><a href="foo.mp3" >sample MP3 file </a></li>
</ul>
<p></code><br />
It&#8217;s a simple list of links for different types of files. We&#8217;ll be looking at the extensions: .zip, .pdf, .doc, .exe, .png, and .mp3. Feel free to extend this list to any extension you so desire. This would be especially helpful for a company that uses proprietary file types within their intranet.</p>
<p>
Now, let&#8217;s look at the CSS:</p>
<p><code lang="CSS"><br />
a[href$="zip"],<br />
a[href$="pdf"],<br />
a[href$="doc"],<br />
a[href$="exe"],<br />
a[href$="png"],<br />
a[href$="mp3"]  {padding-left:20px; background:url(bg-file-icons.png) no-repeat 0 0;}<br />
a[href$="png"]{background-position: 0 -48px;}<br />
a[href$="pdf"] {background-position: 0 -99px;}<br />
a[href$="mp3"]{background-position: 0 -145px;}<br />
a[href$="doc"]{background-position: 0 -199px;}<br />
a[href$="exe"]{background-position: 0 -250px;}</p>
<p>a[href$=".zip"]:after{content: "(.zip file)"; color:#999; margin-left:5px;}<br />
a[href$=".pdf"]:after{content: "(.pdf file)"; color:#999; margin-left:5px;}<br />
a[href$=".doc"]:after{content: "(.doc file)"; color:#999; margin-left:5px;}<br />
a[href$=".exe"]:after{content: "(.exe file)"; color:#999; margin-left:5px;}<br />
a[href$=".mp3"]:after{content: "(.mp3 file)"; color:#999; margin-left:5px;}<br />
a[href$=".png"]:after{content: "(.png file)"; color:#999; margin-left:5px;}<br />
a[href$=".exe"]:after{content: "(.exe file)"; color:#999; margin-left:5px;}<br />
</code></p>
<p><a href="/examples/attrib-files/index.html">See the final test page.</a></p>
<h4>Pattern matching in the attribute selector</h4>
<p>We have some limited &#8220;regular expression&#8221; functionality in CSS3. We can search for an attribute&#8217;s presence and match a pattern within the attribute&#8217;s value.<br />
<a href="http://www.hunlock.com/">Patrick Hunlon</a> has a good summary of the pattern matching: </p>
<blockquote cite="http://www.hunlock.com/blogs/Attach_icons_to_anything_with_CSS">
<ul>
<li>[foo]        &#8212; Has an attribute named &#8220;foo&#8221;</li>
<li>[foo="bar"]  &#8212; Has an attribute named &#8220;foo&#8221; with a value of &#8220;bar&#8221; (&#8220;bar&#8221;)</li>
<li>[foo~="bar"] &#8212; Value has the word &#8220;bar&#8221; in it somewhere (&#8220;blue bar stools&#8221;)</li>
<li>[foo^="bar"] &#8212; Value begins with &#8220;bar&#8221; (&#8220;barstool&#8221;)</li>
<li>[foo$="bar"] &#8212; Value ends with &#8220;bar&#8221; (&#8220;I was at the bar&#8221;)</li>
<li>[foo*="bar"] &#8212; Value has bar somewhere (&#8220;I was looking for barstools&#8221;)  </li>
</ul>
<p><cite><a href="http://www.hunlock.com/blogs/Attach_icons_to_anything_with_CSS">Attach icons to anything with CSS</a></cite>
</p></blockquote>
<p>
The CSS is simply looking to see if the desired extension is at the end of the link href. If so, apply the following styles. </p>
<h4>Adding an icon to the link</h4>
<p>First, we are match any of the desired file extensions.  We then add a background image and some padding on the left side with a bulk rule. Then  the background position on the sprite is adjust for each particular link type. Combining multiple icons into one background image reduces the number of files the user has to download, <a href="http://developer.yahoo.com/performance/rules.html#opt_sprites">making your page faster</a>. This will work with any browser that recognizes attribute selectors, including Internet Explorer 7. However, support for more obscure attributes may be spotty.</p>
<p>
There&#8217;s another peculiarity with pattern matching. Some attributes are case sensitive while others are not. The href attribute is NOT case sensitive, so the above rules will also work if your image name was <em>FOO.ZIP</em>, <em>foo.Zip</em>, or <em>foo.zip</em>.</p>
<h4>Adding the descriptive text</h4>
<p>Now, we are going to add a bit of descriptive text to each link. We can&#8217;t describe the file size, but we can tell the user what type of file it is. This is using the :after(content:) functionality and is supported by Internet Explorer 8 (yeah!!!) but not Internet Explorer 7 and below (boo!!!).<br />
We will also adjust the color and give it a bit of spacing.</p>
<h3>A big step forward with a small chunk of work</h3>
<p>
There you have it. A small chunk of CSS coding has now added substantial usability to your legacy pages. While the CSS version is not as accessible as having the data in the actual link code, it&#8217;s a significant improvement over nothing at all. Further, there&#8217;s no harmful effect on browsers that do not understand the function. You&#8217;ve added information, but haven&#8217;t taken anything away. This is a win in my book. To save some time and effort, you could just download and use this  package of <a href="http://pooliestudios.com/projects/iconize/">CSS and icons</a> from <a href="http://pooliestudios.com">Alexander Kaiser</a>.</p>
<p>
This rather simple example of attribute selectors and pattern matching can open your eyes to many possibilities. There are a number of developers that have been expoloring this potential for the past few years. Take a look at some of these resources for more ideas and have some fun.</p>
<ul>
<li><a href="http://www.w3.org/TR/2001/CR-css3-selectors-20011113/#attribute-selectors">CSS3 &#8211; Atribute Selectors Definition </a> W3C</li>
<li><a href="http://www.456bereastreet.com/archive/200601/css_3_selectors_explained/">CSS 3 Selectors Explained</a></li>
<li><a href="http://www.stuffandnonsense.co.uk/archives/css_a_tribute_to_selectors.html">CSS: A Tribute to Selectors</a></li>
<li><a href="http://developer.yahoo.com/yui/selector/">YUI: Selector Utility</a> Use CSS3 selectors in JavaScript</li>
<li><a href="http://www.cssdrive.com/index.php/forums/viewthread/45/">Dynamic File Type Notations </a></li>
<li><a href="http://www.andybudd.com/archives/2003/09/cool_use_for_css_attribute_selectors/">Cool use for CSS attribute selectors </a> &#8211; Hiding banner ads with CSS</li>
<li><a href="http://www.askthecssguy.com/2006/12/showing_hyperlink_cues_with_cs_1.html">Showing Hyperlink Cues with CSS </a></li>
<li><a href="http://www.askthecssguy.com/2006/12/showing_hyperlink_cues_with_cs_1.html">Showing Hyperlink Cues with CSS </a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.last-child.com/css-attribute-selector/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>UTF-8 compatible accented characters</title>
		<link>http://www.last-child.com/utf-8-compatible-accented-characters/</link>
		<comments>http://www.last-child.com/utf-8-compatible-accented-characters/#comments</comments>
		<pubDate>Mon, 26 May 2008 14:19:47 +0000</pubDate>
		<dc:creator>Ted</dc:creator>
				<category><![CDATA[HTML Elements]]></category>
		<category><![CDATA[Online Resource]]></category>
		<category><![CDATA[Character encodings in HTML]]></category>
		<category><![CDATA[internationalization]]></category>
		<category><![CDATA[localization]]></category>

		<guid isPermaLink="false">http://www.last-child.com/?p=151</guid>
		<description><![CDATA[Sometimes the simplest information is difficult to find. Today I was searching for the HTML entities for French characters. Fortunately, I found the following resource French Encoding and Language Tags from Penn State. Here&#8217;s an example of the information available on the Teaching with Technology site: &#160; Lowercase&#160;Vowels à &#38;agrave;&#160;(225) â &#38;acirc; (226) ä &#38;auml; [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes the simplest information is difficult to find. Today I was searching for the HTML entities for French characters. Fortunately, I found the following resource <a href="http://tlt.its.psu.edu/suggestions/international/bylanguage/french.html#htmlcodes">French Encoding and Language Tags</a> from <a href="http://www.psu.edu/">Penn  State</a>.</p>
<p>Here&#8217;s an example of the information available on the Teaching with Technology site:</p>
<blockquote>
<table class="chart"   cellspacing="0">
<tbody>
<tr>
<td class="colspan2" width="25">&nbsp;</td>
<td class="colspan2"><b>Lowercase&nbsp;Vowels</b></td>
</tr>
<tr>
<th class="serif" scope="row">à </th>
<td><b>&amp;agrave;&nbsp;</b>(225)</td>
</tr>
<tr>
<th class="serif" scope="row">â</th>
<td><b>&amp;acirc;</b> (226)</td>
</tr>
<tr>
<th class="serif" scope="row">ä</th>
<td><b>&amp;auml;</b> (228)</td>
</tr>
<tr>
<th class="serif" scope="row">è</th>
<td><b>&amp;egrave;</b> (232)</td>
</tr>
<tr>
<th class="serif" scope="row">é</th>
<td><b>&amp;eacute;</b> (233)</td>
</tr>
<tr>
<th class="serif" scope="row">ê</th>
<td><b>&amp;ecirc;</b> (234)</td>
</tr>
<tr>
<th class="serif" scope="row">ë</th>
<td><b>&amp;euml;</b> (235)</td>
</tr>
<tr>
<th class="serif" scope="row">î</th>
<td><b>&amp;icirc;</b> (238)</td>
</tr>
<tr>
<th class="serif" scope="row">ï</th>
<td><b>&amp;iuml;</b> (239)</td>
</tr>
<tr>
<th class="serif" scope="row">ô</th>
<td><b>&amp;ocirc; </b>(244)</td>
</tr>
<tr>
<th class="serif" scope="row">œ</th>
<td><b>&amp;oelig;</b> (156)</td>
</tr>
<tr>
<th class="serif" scope="row">ù</th>
<td><b>&amp;ugrave; </b>(250)</td>
</tr>
<tr>
<th scope="row" class="serif"> û</th>
<td><b>&amp;ucirc;</b> (251)</td>
</tr>
<tr>
<th scope="row" class="serif"> ü</th>
<td><b>&amp;uuml;</b> (252)</td>
</tr>
<tr>
<th scope="row" class="serif"> ÿ</th>
<td><b>&amp;yuml;</b> (255)</td>
</tr>
</tbody>
</table>
<p><cite><a href="http://tlt.its.psu.edu/">Teaching and Learning with Technology</a></cite></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.last-child.com/utf-8-compatible-accented-characters/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Use a content delivery network for dirt cheap</title>
		<link>http://www.last-child.com/use-a-content-delivery-network-for-dirt-cheap/</link>
		<comments>http://www.last-child.com/use-a-content-delivery-network-for-dirt-cheap/#comments</comments>
		<pubDate>Sun, 09 Dec 2007 20:07:02 +0000</pubDate>
		<dc:creator>Ted</dc:creator>
				<category><![CDATA[Image]]></category>
		<category><![CDATA[Online Resource]]></category>
		<category><![CDATA[Yahoo!]]></category>
		<category><![CDATA[YUI]]></category>

		<guid isPermaLink="false">http://www.last-child.com/use-a-content-delivery-network-for-dirt-cheap/</guid>
		<description><![CDATA[The Yahoo! exceptional performance team has released a series of best practice rules for making your site perform significantly faster. Fortunately, the majority of fixes can be handled by any developer. #2 however seems a bit outside the budget of most developers&#8230; until now 2: Use a Content Delivery Network Let&#8217;s say you have a [...]]]></description>
			<content:encoded><![CDATA[<p><iframe src="http://rcm.amazon.com/e/cm?t=csstoyslastch-20&#038;o=1&#038;p=8&#038;l=as1&#038;asins=0596529309&#038;fc1=000000&#038;IS2=1&#038;lt1=_blank&#038;lc1=0000FF&#038;bc1=000000&#038;bg1=FFFFFF&#038;f=ifr" style="width:120px;height:240px; float:right;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe><br />
The <a href="http://developer.yahoo.com/performance/">Yahoo! exceptional performance team</a> has released a series of best practice rules for making your site perform significantly faster. Fortunately, the majority of fixes can be handled by any developer. #2 however seems a bit outside the budget of most developers&#8230; until now</p>
<p>2: Use a Content Delivery Network</p>
<p>Let&#8217;s say you have a small site that has a very local audience. Sally down the street doesn&#8217;t notice any problems with slow images. But what if your site is more global?  Will the Sally equivalent in Europe, Asia, India, or the other side of the country have the same experience?  Probably not.  This is why large sites use the Akamai servers. They can cache images and files closer to the user.</p>
<p>The #2 rule by the exceptional performance team tells us to use one of these distributed asset servers.</p>
<blockquote><p>A content delivery network (CDN) is a collection of web servers distributed across multiple locations to deliver content more efficiently to users. The server selected for delivering content to a specific user is typically based on a measure of network proximity. For example, the server with the fewest network hops or the server with the quickest response time is chosen.</p>
<p>Some large Internet companies own their own CDN, but it&#8217;s cost-effective to use a CDN service provider, such as Akamai Technologies, Mirror Image Internet, or Limelight Networks. For start-up companies and private web sites, the cost of a CDN service can be prohibitive, but as your target audience grows larger and becomes more global, a CDN is necessary to achieve fast response times. At Yahoo!, properties that moved static content off their application web servers to a CDN improved end-user response times by 20% or more. Switching to a CDN is a relatively easy code change that will dramatically improve the speed of your web site.<br />
<cite><a href="http://developer.yahoo.com/performance/rules.html#cdn">Best Practices for Speeding Up Your Web Site</a></cite></p></blockquote>
<h3>Doing this cheaply with Amazon</h3>
<p>Amazon&#8217;s Web Services give you this functionality for a very low cost. There S3 service costs most people less than $5/month. This gives you easy acces to your private database and storage. You pay by the size of your files and the total traffic. </p>
<p>You can further increase your site&#8217;s performance by taking advantage of the hosted <a href="http://developer.yahoo.com/yui/">Yahoo! YUI CSS and JavaScript libraries</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.last-child.com/use-a-content-delivery-network-for-dirt-cheap/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Take the pain out of CSS-based layouts</title>
		<link>http://www.last-child.com/take-the-pain-out-of-css-based-layouts/</link>
		<comments>http://www.last-child.com/take-the-pain-out-of-css-based-layouts/#comments</comments>
		<pubDate>Fri, 31 Aug 2007 17:45:03 +0000</pubDate>
		<dc:creator>Ted</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Developers]]></category>
		<category><![CDATA[DHTML]]></category>
		<category><![CDATA[Div]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Online Resource]]></category>
		<category><![CDATA[Standardista]]></category>
		<category><![CDATA[Yahoo!]]></category>
		<category><![CDATA[YUI]]></category>

		<guid isPermaLink="false">http://www.last-child.com/take-the-pain-out-of-css-based-layouts/</guid>
		<description><![CDATA[I hate dealing with CSS-based layouts. Don&#8217;t get me wrong, I&#8217;m not saying I&#8217;d rather use tables. It&#8217;s just that I don&#8217;t relish the idea of fussing with the hacks, negative margins, floats, and more to get the page looking good in all browsers. This problem was solved a few years ago by a series [...]]]></description>
			<content:encoded><![CDATA[<p>I hate dealing with CSS-based layouts. Don&#8217;t get me wrong, I&#8217;m not saying I&#8217;d rather use tables. It&#8217;s just that I don&#8217;t relish the idea of fussing with the hacks, negative margins, floats, and more to get the page looking good in all browsers.</p>
<p>This problem was solved a few years ago by a series of layouts donated to the greater good by wonderful developers. This gave me the ability to ignore layouts and concentrate on semantic, structural markup and using CSS to turn this into a great set of modules on the page. This is the stuff that makes web development fun for me.</p>
<p>Over the years, new layouts came and went and cross-browser layouts developed to a science. It&#8217;s now even easier for you to build a web site layout that is predictable, flexible, and lightweight.  </p>
<h3>The YUI-Grid</h3>
<p>Just because I work at Yahoo!, doesn&#8217;t mean I immediately jumped onto the <a href="http://developer.yahoo.com/yui/grids/">YUI-Grid</a> when it was released. I&#8217;ve built several sites without it since its launch. A developer becomes comfortable with a solution and change hurts. However, I recently began working on a very simple, small gallery site and gave this tool a try.</p>
<p>First, a bit of an explanation on some of the nomenclature. The YUI has laid down the law on some <a href="http://developer.yahoo.com/yui/container/module/index.html">naming conventions</a>, and while it may seem a bit bloated, the resulting hooks allow a site to easily incorporate the YUI JavaScript and CSS. </p>
<p>Each main container div has three children, class=&#8221;hd&#8221; for the header, class=&#8221;bd&#8221; for the body, and class=&#8221;ft&#8221; for the footer. You can delete the hd or ft if they are not needed, but you need to at least have the body element. The main portions of the page use the same naming conventions, although with id instead of class. The header has id=&#8221;hd&#8221;, the body container: id=&#8221;bd&#8221;, and finally the footer has id=&#8221;ft&#8221;.</p>
<h3>YUI flexibility</h3>
<p>Nate Koechley, the man behind the grids, has created a series of rules that let you change the width of your grid, the number of columns, position of columns, and how nested columns divide the avialable space by simply changing a few classes on the parent containers. </p>
<p>It&#8217;s a very powerful set of controls. Here&#8217;s an example of how the classes change the widths of nested divs.</p>
<blockquote cite="http://developer.yahoo.com/yui/grids/"><p>
<img src="http://us.i1.yimg.com/us.yimg.com/i/ydn/yuiweb/img/grids-docs-3.gif" alt="YUI Grid demonstration" /><br />
The standard grid-unit interplay always divides space in two, evenly. To create layouts of more than two units (e.g., three), and to create layouts divided unevenly (e.g., 66% and 33% or 75% and 25%), we employ special grid holders. While &#8220;yui-g&#8221; tells the two children each take up half the space each, &#8220;yui-gc&#8221; tells the first unit to take up two-thirds of the space, and the other unit to take up one-third of the space. Everything else remains the same: units live within grids, and the first of a set must be indicated.<br />
<cite><a href="http://developer.yahoo.com/yui/grids/">Nate Koechley &#8211; Yahoo! UI Library: Grids CSS</a></cite>
</p></blockquote>
<h3>Help?</h3>
<p>Now, if you are like me, your head has begun throbbing after reading the YUI Grid CSS page several times, making notes on how it works, and reading it a few more times before figuring out how to start. The package is complex and yet easy to work with once you dive in. </p>
<p>However, it&#8217;s easy to skip most of the headaches and begin building your site immediately. <a href="http://blog.davglass.com/">Dav Glass</a>, also of the YUI team, created a great <a href="http://developer.yahoo.com/yui/grids/builder/">Grid Builder</a> that makes it sinfully easy to build your complicated layout. Not only does it generate the HTML for your basic page, it also incorporates the full YUI CSS library.</p>
<p>This means you also get the <a href="http://developer.yahoo.com/yui/base/">YUI Base CSS</a>, <a href="http://developer.yahoo.com/yui/reset/">YUI Reset CSS</a>, as well as the excellent <a href="http://developer.yahoo.com/yui/fonts/">YUI Fonts CSS</a>. All of these are combined into one CSS file that has been akamized for faster downloads. This means your final site CSS can focus solely on the things that make it unique. You&#8217;ll be surprised how small your custom files will be when all of these issues have already been dealt with.</p>
<h3>Take it one step further</h3>
<p>I was prompted to write this post after seeing the latest extension of the Grid CSS from the outside. <a href="http://www.wait-till-i.com">Christian Heilmann</a> just published a simple javascript, <a href="http://www.wait-till-i.com/index.php?p=479">Enhancing YUI grids with equal height columns</a>,  that builds on the established nomenclature of the Grid CSS. It&#8217;s a demonstration of the power afforded by a standardized class and id naming convention.</p>
<p>Christian&#8217;s javascript also utilizes the basic YUI Javascript library to take all of your nested divs and make them the same height. So, with the addition of one more js script, you now have complete control of your grid layout and your nested divs are all the same height. </p>
<p>Here&#8217;s how Christian describes the simplicity.</p>
<blockquote cite="http://www.wait-till-i.com/index.php?p=479"><p>
All you need to do is to add YAHOO, YAHOO Dom and YAHOO Event (easiest with the collated <a href="http://developer.yahoo.com/yui/articles/hosting/">yahoo-dom-event package</a>) and the script in the bottom of your document’s body. The script automatically equals all columns in nested grids. If you don’t want all of them to be equal, define only those that need fixing by adding a &#8220;columnfix&#8221;CSS class.<br />
<cite>Christian Heilmann &#8211; <a href="http://www.wait-till-i.com/index.php?p=479">Enhancing YUI grids with equal height columns</a></cite>
</p></blockquote>
<h3>Future flexibility</h3>
<p>This powerful package of YUI CSS and standardized nomenclature for establishing the building blocks and the YUI JavaScript library for building interactions will allow developers to spend more time creating the elements that make their site unique and reduce the cross-browser issues caused by individual mistakes. We&#8217;ll see more extensions from within and outside the YUI developers as the usage becomes more universal. They YUI libraries are not doing the work for me, they&#8217;re just making it a lot more fun and productive.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.last-child.com/take-the-pain-out-of-css-based-layouts/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Class Equals Screen Reader Info</title>
		<link>http://www.last-child.com/class-equals-screen-reader-info/</link>
		<comments>http://www.last-child.com/class-equals-screen-reader-info/#comments</comments>
		<pubDate>Sat, 21 Jul 2007 13:10:09 +0000</pubDate>
		<dc:creator>Ted</dc:creator>
				<category><![CDATA[:absolute]]></category>
		<category><![CDATA[Accessibility]]></category>
		<category><![CDATA[Class]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[position]]></category>
		<category><![CDATA[Table Header]]></category>
		<category><![CDATA[Table Header Scope]]></category>
		<category><![CDATA[Table Summary]]></category>
		<category><![CDATA[Yahoo!]]></category>

		<guid isPermaLink="false">http://www.last-child.com/class-equals-screen-reader-info/</guid>
		<description><![CDATA[I&#8217;ve been using a little CSS trickery to hide content and data from the average user. I hate to mention it too often as it can open pandora&#8217;s box. There was a recent thread on the Microformat&#8217;s discussion list about this very topic. The gist of many programmers is that data worth sharing is data [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been using a little CSS trickery to hide content and data from the average user. I hate to mention it too often as it can open pandora&#8217;s box. There was a recent thread on the Microformat&#8217;s discussion list about this very topic. The gist of many programmers is that data worth sharing is data worth displaying.</p>
<p>However, there are times when your UED provides a design that lacks visual hooks for your screen reader users. A good example may be the ever-popular search form. Most sites will have an input and a button that says &#8220;search&#8221;. The label for this input is nowhere to be found.</p>
<p>The average sighted user can figure out such a simple form but the screen reader needs a bit more help. Here&#8217;s a sound clip of a screen reader trying to use the <a href="http://last-child.com/tests/YahooKids_SearchBar.mp3">search form on Yahoo! Kids (.mp3)</a>. This was further complicated by the missing alt attribute on the image-based submit button.</p>
<p>I&#8217;ve also had to work with table based forms that need some assistance. The table is marked up with appropriate table headers and scopes, but the individual inputs lack labels due to the UED. </p>
<h3>The simple solution</h3>
<p>There are many ways to hide content via CSS. You want to avoid <em>visibility:hidden</em> and <em>display:none</em>. These will also hide it from the screen reader. You could use <em>text-indent:-1000 em</em>. I prefer using <em>position:absolute; <del title="using top could cause pages to jump. just use left" rel="edited 04-24-2008">top:0;</del> left:-1000em;</em>. This hides the label by pushing it off screen yet the screen reader is still able to use it.</p>
<h4>Updated CSS (updated 4/24/2008)</h4>
<p>Adding a top position to your hidden may cause the page to jump when the item is focused. Only use a negative left position and leave the top position out of the equation.</p>
<h3>Samples</h3>
<p>Let&#8217;s look at the <a href="http://last-child.com/tests/sample-consolidate-form.html">complicated table with hidden inputs</a>.  The table is properly coded with summary and scope. However, the table would still be difficult for a screen reader without form labels.  </p>
<p>Here&#8217;s a sample of the HTML code:<br />
<code lang="HTML"></p>
<td>
<label for="cc3_payment" class="srinfo">Creditcard3 Payment</label></p>
<input id="cc3_payment" name="cc3_payment" size="10" value="0" tabindex="10" maxlength="10" type="text">
</td>
<p></code></p>
<p>Here&#8217;s the CSS for the labels</p>
<p><code lang="CSS"><br />
.srinfo {position:absolute; <del>top:0;</del> left:-1000em;}<br />
</code></p>
<h3>Extending the hidden screen reader concept</h3>
<p>I&#8217;ve written earlier about how Yahoo! Tech used a hidden collection of links to <a href="http://www.last-child.com/make-flash-accessible-to-screen-readers-in-transparent-window-mode/">replicate an inaccessible flash movie</a>. In a nutshell: screen readers cannot see a flash movie that has wmode:transparent. To get around this, we duplicated the flash content and moved it off-screen for screen readers and search engines.  </p>
<p>You could also use this technique for providing information specific to screen reader users, such as:<br />
<code lang="HTML"></p>
<p class="srinfo">Please note, this page uses JavaScript to continually update stock information. Look for the link: "disable stock updates" to turn this feature off</p>
<p></code></p>
<h3>Hold the Presses, this isn&#8217;t perfect!</h3>
<p>You can&#8217;t just throw anything off screen for the screen readers. The earlier Yahoo Tech example took about made 6 links invisible yet they were still accessible to keyboard users. So, remember, when you use the <strong>srinfo</strong> class to hide content for screen readers, keep in mind the impact on keyboard users. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.last-child.com/class-equals-screen-reader-info/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
<enclosure url="http://last-child.com/tests/YahooKids_SearchBar.mp3" length="3399296" type="audio/mpeg" />
		</item>
		<item>
		<title>Add accessibility to your AJAX applications</title>
		<link>http://www.last-child.com/add-accessibility-to-your-ajax-applications/</link>
		<comments>http://www.last-child.com/add-accessibility-to-your-ajax-applications/#comments</comments>
		<pubDate>Fri, 19 Jan 2007 18:13:25 +0000</pubDate>
		<dc:creator>Ted</dc:creator>
				<category><![CDATA[Accessibility]]></category>
		<category><![CDATA[AJAX]]></category>
		<category><![CDATA[DHTML]]></category>
		<category><![CDATA[Form Input]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Standardista]]></category>

		<guid isPermaLink="false">http://www.last-child.com/add-accessibility-to-your-ajax-applications/</guid>
		<description><![CDATA[In December, I made a number of predictions for the 2007. I confidently predicted that Gez Lemon would discover a solution to AJAX accessibility issues. Gez had earlier defined the virtual buffer&#8217;s role in JAWS. Understanding the virtual buffer is essential for empowering screen reader users, particularly considering the number of Web 2.0 applications that [...]]]></description>
			<content:encoded><![CDATA[<p>In December, I made a number of <a href="http://www.last-child.com/2007-web-development-predictions/">predictions for the 2007</a>. I confidently predicted that <a href="http://juicystudio.com/">Gez Lemon</a> would discover a solution to AJAX accessibility issues.  Gez had earlier defined the <a href="http://juicystudio.com/article/making-ajax-work-with-screen-readers.php">virtual buffer&#8217;s role in JAWS</a>.</p>
<blockquote cite="http://juicystudio.com/article/improving-ajax-applications-for-jaws-users.php"><p>
Understanding the virtual buffer is essential for empowering screen reader users, particularly considering the number of Web 2.0 applications that depend on Ajax. Screen readers typically take a snapshot of a web page, and place the content in a virtual buffer to allow the user to interact with the content.<br />
<cite>Gez Lemon and Steve Faulkner &#8211; <a href="http://juicystudio.com/article/improving-ajax-applications-for-jaws-users.php">http://juicystudio.com/article/improving-ajax-applications-for-jaws-users.php</a><br />
</cite>
</p></blockquote>
<p>Gez and Steve Faulkner have just released a set of <a href="http://juicystudio.com/article/improving-ajax-applications-for-jaws-users.php#theupdatefunction">javascript functions</a> that refresh the virtual buffer by working with <em>setAttribute</em>. They discovered this function triggers JAWS 7.1+ screen readers to grab a new snapshot of the page. </p>
<p>The scripts are fairly simple. When the page loads, insert a hidden form input. When your AJAX application completes its duties, change the value of that hidden input with the setAttribute function. This setAttribute activity will refresh the buffer and the screen reader will announce the content that has been changed via an AJAX call.</p>
<blockquote cite="http://juicystudio.com/article/improving-ajax-applications-for-jaws-users.php"><p>
The updateBuffer function presented here extends the limited improvements in JAWS 7.1 and later, by providing a mechanism to update the virtual buffer for other interface elements, that works regardless of input device. This means that users of JAWS 7.1 and later do not need to explicitly update the virtual buffer in order to interact with Ajax applications.<br />
<cite>Gez Lemon and Steve Faulkner</cite>
</p></blockquote>
<p>As I also predicted, I believe the <a href="http://developer.yahoo.com/yui/connection/">YUI Connection Manager </a> will incorporate this type of functionality. This will give enhanced accessibility to thousands of web sites instantaneously.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.last-child.com/add-accessibility-to-your-ajax-applications/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

