<?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>TimKadlec.com &#187; ARIA</title>
	<atom:link href="http://timkadlec.com/tag/aria/feed/" rel="self" type="application/rss+xml" />
	<link>http://timkadlec.com</link>
	<description>A Wisconsin based web developer writing about the web.</description>
	<lastBuildDate>Wed, 25 Jan 2012 15:39:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Getting Started With ARIA</title>
		<link>http://timkadlec.com/2008/03/getting-started-with-aria/</link>
		<comments>http://timkadlec.com/2008/03/getting-started-with-aria/#comments</comments>
		<pubDate>Fri, 21 Mar 2008 03:00:00 +0000</pubDate>
		<dc:creator>Tim Kadlec</dc:creator>
				<category><![CDATA[Accessibility]]></category>
		<category><![CDATA[accessibility]]></category>
		<category><![CDATA[ARIA]]></category>

		<guid isPermaLink="false">http://localhost/1969/12/getting-started-with-aria/</guid>
		<description><![CDATA[Finding purely static websites today is becoming harder and harder. The line between website and web application blurs more and more as clients want more interactivity and real-time interaction on their site. This rich experience raises accessibility concerns though.]]></description>
			<content:encoded><![CDATA[<p>Finding purely static websites today is becoming harder and harder. The line between website and web application blurs more and more as clients want more interactivity and real-time interaction on their site. This rich experience raises accessibility concerns though.</p>
<p>To create a lot of these dynamic interfaces, we often have to use (X)HTML elements outside of their semantic meaning. For example, navigation is marked up using list-items. That is all fine and well for a sighted visitor&#8230;we can see that the list is meant to be navigation. However, to a non-sighted user who is relying on a screen reader to determine the usage of elements on a site, it is difficult at best to determine that the list is used as a navigation structure.</p>
<p>That is where Accessible Rich Internet Applications (ARIA) come into play. ARIA offers attributes that we can use to add semantic meaning to elements. One of those is the role attribute.</p>
<h2>Add Some Information</h2>
<p>Roles provide information on what an object in the page is and help to make markup semantic, usable,  and accessible. Using our previous example of a list used for navigation, by providing the role attribute, we can help the user agent to understand that the list is being used for navigation.</p>
<p><code><br />
</code></p>
<p><code></p>
<ul class="code">
<li>&lt;ul role="navigation"&gt;...&lt;/ul&gt;</li>
</ul>
<p></code></p>
<p>Likewise, we can tell the user agent if a paragraph is being used as a button:</p>
<p><code><br />
</code></p>
<p><code></p>
<ul class="code">
<li>&lt;p role="button"&gt;...&lt;/p&gt;</li>
</ul>
<p></code></p>
<p>There are many different WAI roles to utilize. Nine of them where imported from the XHTML Role Attribute Module:</p>
<ol class="reg">
<li><code>banner</code> &#8211; typically an advertisement at the top of a page</li>
<li><code>contentinfo</code> &#8211; information about the content in a page, for example, footnotes or copyright information</li>
<li><code>definition</code> &#8211; the definition of a term</li>
<li><code>main</code> &#8211; the main content of a page</li>
<li><code>navigation</code> &#8211; a set of links suitable for using to navigate a site</li>
<li><code>note</code> &#8211; adds support to main content</li>
<li><code>search</code> &#8211; search section of a site, typically a form.</li>
<li><code>secondary</code> &#8211; a unique section of site</li>
<li><code>seealso</code> &#8211; contains content relevant to main content</li>
</ol>
<p>The ARIA 1.0 specification also includes support for many more roles set down in the ARIA Role taxonomy. These include roles like <code>button</code>, <code>checkbox</code>, <code>textbox</code> and <code>tree</code>. There are many available there, so I am not going to try and show them all here For that you can take a look at the <a href="http://www.w3.org/TR/wai-aria/" target="_blank">ARIA working draft</a>.</p>
<h2>Now For Some Meaning</h2>
<p>In addition to the information provided by the role attribute, we can further add meaning about the state and relationship of elements with states and properties. Unlike roles, which are static, states and properties may change. For example, one state that is available is <code>checked</code>, which as you may guess is used with an element that has a role of <code>checkbox</code>. When a <code>checkbox</code> is unchecked the <code>checked</code> state is false. When the <code>checkbox</code> is checked, the <code>checked</code> state should change to true.</p>
<p>Using states and properties is rather easy to do:</p>
<p><code><br />
</code></p>
<p><code></p>
<ol class="code">
<li>&lt;input type="text" name="email" aria-required="true"/&gt;</li>
<li>&lt;li aria-checked="true" tabindex="0" role="checkbox&gt;&gt;My Item&lt;/li&gt;</li>
</ol>
<p></code></p>
<p>As you can see, you just append the name of the state or property with an &#8216;aria-a&#8217; prefix.</p>
<h2>Add Some Style</h2>
<p>In browsers that support attribute selectors in CSS, we can even use our new roles, states and properties to provide different visual effects to reflect an elements meaning. For example, we can target all items on a page that have an <code>aria-required</code> state with this:</p>
<p><code><br />
</code></p>
<p><code></p>
<ul class="code">
<li>*[aria-required="true"] { background: yellow;}</li>
</ul>
<p></code></p>
<p>In addition, some states have pseudo-classes that can be used to reflect the changes in state. Consider a list-item that is tagged with an aria-checked state. Using the <code>:before</code> pseudo-class, we can provide a different image with each state change. (Note: this example is used in the <a href="http://www.w3.org/TR/wai-aria/" target="_blank">W3C Working Draft</a>)</p>
<p><code><br />
</code></p>
<p><code></p>
<ol class="code">
<li>*[aria-checked=true]:before {content:   url('checked.gif')}</li>
<li>*[aria-checked=false]:before {content:  url('unchecked.gif')}</li>
</ol>
<p></code></p>
<p>There is a lot of value in using ARIA. It helps to give meaning to the usage of an element on a page, greatly increasing the accessibility of a site. It&#8217;s very easy to use, and doesn&#8217;t break in browsers that don&#8217;t support it. If you want to learn more about ARIA and how to start implementing it, I highly recommend checking out the <a href="http://www.w3.org/WAI/intro/aria" target="_blank">W3C&#8217;s overview</a> on the topic.</p>
]]></content:encoded>
			<wfw:commentRss>http://timkadlec.com/2008/03/getting-started-with-aria/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

