<?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>Yahoo! Flash (R) Blog &#187; accessibility</title>
	<atom:link href="http://www.yswfblog.com/blog/index.php/category/accessibility/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.yswfblog.com/blog</link>
	<description>News and Articles on Yahoo! Flash Components and Libraries</description>
	<lastBuildDate>Sat, 19 Jun 2010 23:05:10 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Astra Stimulus Package</title>
		<link>http://www.yswfblog.com/blog/2009/04/15/astra-14/</link>
		<comments>http://www.yswfblog.com/blog/2009/04/15/astra-14/#comments</comments>
		<pubDate>Wed, 15 Apr 2009 20:39:59 +0000</pubDate>
		<dc:creator>Alaric Cole</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[accessibility]]></category>

		<guid isPermaLink="false">http://www.yswfblog.com/blog/?p=230</guid>
		<description><![CDATA[We&#8217;re filing late this year but we were determined to get this thing in before midnight. We thought about asking for an extension, but decided the paperwork was too complicated. So here we go, crossing our fingers&#8230;
Astra 1.4 is now ready for direct deposit into your Flash or Flex applications.
New this season is a component [...]]]></description>
			<content:encoded><![CDATA[<p>We&#8217;re filing late this year but we were determined to get this thing in before midnight. We thought about asking for an extension, but decided the paperwork was too complicated. So here we go, crossing our fingers&#8230;</p>
<p>Astra 1.4 is now ready for direct deposit into your Flash or Flex applications.</p>
<p>New this season is a component called Form which will help with those gathering and validating data in Flash. Also notable to mention is that most of Astra is now accessible. We&#8217;ve added a section to each component on <a href="http://developer.yahoo.com/flash/">developer.yahoo.com/flash</a> speaking directly to those trying to get components to work with screen readers. There are also, as always, some nice bug fixes and new features. The full list follows:</p>
<h4>Flash</h4>
<ul>
<li>New Form component and form data manager utility</li>
<li>Carousel:
<ul>
<li>enhanced keyboard navigation</li>
<li>added accessibility</li>
<li>fixed bug: null reference error when setting multiple data providers</li>
</ul>
</li>
<li>Charts:
<ul>
<li>allow for negative values in stacked bar and column charts.</li>
<li>fixed bug in stacked bar and column charts in which markers were sized incorrectly for multiple series.</li>
<li>fixed bug in TimeAxis in which majorUnit was not being calculated correctly.</li>
<li>fixed bug in TimeAxis in which minorUnit was not being calculated.</li>
<li>fixed bug in which <code>hideOverlappingLabels</code> style did not work on the y-axis</li>
<li>refactored origin axes, <code>TimeAxis</code> and <code>NumericAxis</code>, to allow for factoring in the label size when calculating a <code>majorUnit</code>.</li>
<li>added option to <code>CategoryAxis</code> to allow for a more systematic dropping of labels when there is not enough space for all categories on the axis.</li>
<li>fixed bug in which null values break line series.</li>
<li>fixed bug in NumericAxis in which external data was not being casted as a Number.</li>
<li>allow option for rotating text when fonts are not embedded.</li>
<li>fixed bug in which Cartesian Charts, were not being updated when the length of the <code>dataSource</code> was different.</li>
<li>added enhanced styling of series by allowing the specification of fill, border and line color and alpha styles.</li>
<li>added option of styling a highlighted zero gridline when the zero is beyond the origin of a <code>NumericAxis</code>.</li>
</ul>
</li>
<li>Menu:
<ul>
<li>enhanced keyboard navigation</li>
<li>fixed bug in labelField property</li>
<li>added support for non-XML data providers</li>
<li>added beta accessibility implementation</li>
<li>fixed bug where focusing out would not close menus</li>
</ul>
</li>
<li>MenuBar:
<ul>
<li>enhanced keyboard navigation</li>
<li>added beta accessibility implementation</li>
<li>added support for non-XML data providers</li>
<li>added labelField property</li>
<li>added support for disabled menu bar items</li>
</ul>
</li>
<li>Tree:
<ul>
<li>Fixed out-of-bounds index error that appeared under certain conditions.</li>
<li>improved keyboard navigation</li>
<li>added events for opening and closing of nodes</li>
<li>added accessibility implementation</li>
<li>added TreeEvent</li>
</ul>
</li>
<li>AlertManager:
<ul>
<li>fixed issue with keyboard focus on disabled controls</li>
<li>made some properties publicly accessible</li>
<li>added beta accessibility implementation</li>
</ul>
</li>
<li>AudioPlayback:
<ul>
<li>enhanced keyboard navigation &#8211; added keyboard support for volume control</li>
<li>made some properties publicly accessible</li>
<li>added accessibility implementations for subcontrols (volume, current track)</li>
</ul>
</li>
</ul>
<h4>Flex</h4>
<ul>
<li>AutoCompleteManager:
<ul>
<li>Added ability to retrieve specific popup instances and control them</li>
<li>Enhanced algorithm for target resizing and moving</li>
</ul>
</li>
<li>IPv4AddressInput, TimeInput, TimeStepper, DropdownColorPicker:
<ul>
<li>Added accessibility implementation</li>
</ul>
</li>
</ul>
<h4>Utils</h4>
<ul>
<li>Improved performance of layout for very large containers</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.yswfblog.com/blog/2009/04/15/astra-14/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Creating Accessible Components in Flash and Flex (Part 2)</title>
		<link>http://www.yswfblog.com/blog/2009/01/12/creating-accessible-components-in-flash-and-flex-part-2/</link>
		<comments>http://www.yswfblog.com/blog/2009/01/12/creating-accessible-components-in-flash-and-flex-part-2/#comments</comments>
		<pubDate>Mon, 12 Jan 2009 13:54:33 +0000</pubDate>
		<dc:creator>Alaric Cole</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[accessibility]]></category>
		<category><![CDATA[screen reader]]></category>
		<category><![CDATA[usability]]></category>

		<guid isPermaLink="false">http://www.yswfblog.com/blog/?p=114</guid>
		<description><![CDATA[In this article, I&#8217;ll go over the steps needed to enable accessibility for a custom component. While it takes a bit of getting used to, I think you&#8217;ll find that enabling accessibility for your components is not only beneficial to the many users who would like to interact with your component, but helps you to [...]]]></description>
			<content:encoded><![CDATA[<p>In this article, I&#8217;ll go over the steps needed to enable accessibility for a custom component. While it takes a bit of getting used to, I think you&#8217;ll find that enabling accessibility for your components is not only beneficial to the many users who would like to interact with your component, but helps you to fine-tune and further enhance your components in general. To enable use with screen readers, follow these three (simple?) steps:</p>
<ol>
<li>Determine object role</li>
<li>Create the Accessibility Implementation class for component</li>
<li>Add accessibility tie-ins to component class<br />
a) Create a placeholder for the static <code>createAccessibilityImplementation()</code> method<br />
b) Override <code>initializeAccessibility()</code> method<br />
c) (Flex only) Add AccessibilityClass metadata</li>
</ol>
<p><span id="more-114"></span></p>
<h3>Determine object role</h3>
<p>In order for the JAWS screen reader to inform the user about a particular component, it needs to know a few things about the component. Most importantly, it needs to know what the type of the component is. It does this using a predefined set of types, called <a href="http://msdn.microsoft.com/en-us/library/ms696152(VS.85).aspx" target="_blank">Object Roles</a> in <a href="http://msdn.microsoft.com/en-us/library/ms697707(VS.85).aspx" target="_blank">MSAA</a> terminology. These object roles are simply numerical values, standing for control types such as push buttons and list boxes. I like to define them as constants in my accessibility implementations, to make them more identifiable. So the first step is determining the type, which also allows you to see if you need to extend a current accessibility implementation, or start from scratch. The second step is to actually create the implementation (*whew*).</p>
<h3>Create the Accessibility Implementation class</h3>
<p>To create an accessibility implementation, you need to extend from a base implementation class. For Flash components this will extend fl.accessibility.AccImpl or the component’s superclass’s implementation. For Flex components this will extend <code>mx.accessibility.AccImpl</code> or the component’s superclass’s implementation. For instance, with Astra Carousel, I extended <code>fl.accessibilitySelectableListAccImpl</code>, the implementation used for SelectableList; for Astra Charts, I created an implementation from scratch, extending <code>fl.accessibility.AccImpl</code>.</p>
<p>Generally, you can pair the superclass of your implementation with the component&#8217;s superclass. And if one&#8217;s not available, start at AccImpl. The main thing to remember is that, for Flash CS3/CS4 components, you need to create the hooks in your implementation that pair it up with its corresponding component. You do this by creating a static variable and a static method:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #0033ff; font-weight: bold;">private</span> static <span style="color: #6699cc; font-weight: bold;">var</span> accessibilityHooked<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Boolean</span>=hookAccessibility<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
&nbsp;
<span style="color: #0033ff; font-weight: bold;">private</span> static <span style="color: #339966; font-weight: bold;">function</span> hookAccessibility<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Boolean</span>
<span style="color: #000000;">&#123;</span>
     YourComponentClass.createAccessibilityImplementation =
          createAccessibilityImplementation;
     <span style="color: #0033ff; font-weight: bold;">return</span> <span style="color: #0033ff; font-weight: bold;">true</span>;
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>Notice in the hookAccessibility function, that it refers to a static variable of your component&#8217;s class. In order for this to work, you&#8217;ll need to add that static variable to your component&#8217;s class, which we&#8217;ll go over later in this article. Remember that the above code is for Flash CS3/CS4 components only&#8211;Flex will create the necessary hooks itself through the mxmlc compiler.</p>
<p>Once you&#8217;re hooked up, the next task is to actually set the object role you decided on. To do that, you simply set the variable role to that numerical value within the constructor of the implementation class.</p>
<p>Next is the hard part. All implementations will use the following methods to communicate with the screen reader, and you&#8217;ll find you need many of them to make your implementation work. However, you may not need to write custom code for all of them, as you may be able to inherit a perfectly usable method from the superclass:</p>
<p>• accLocation(childID:uint):* &#8211; specifies the bounding box of a child element.<br />
• accSelect(selFlag:uint, childID:uint):void-altering the selection in the component .<br />
• get_accDefaultAction(childID:uint):String-returns the default action of the component or of one of its child elements.<br />
• get_accFocus():uint-returns the unsigned integer ID of the child element, if any, that has child focus within the component.<br />
• get_accName(childID:uint):String-returns the name for the component or for one of its child elements.<br />
• get_accRole(childID:uint):uint-returns the system role for the component or for one of its child elements.<br />
• get_accSelection():Array-returns an array containing the IDs of all child elements that are selected.<br />
• get_accState(childID:uint):uint-returns the current runtime state of the component or of one of its child elements.<br />
• get_accValue(childID:uint):String-returns the runtime value of the component or of one of its child elements.<br />
• getChildIDArray():Array-returns an array containing the unsigned integer IDs of all child elements in the <span>AccessibilityImplementation</span>.<br />
• eventHandler(event:Event):void-Handles events from the master component. This essentially listens for events, and the developer must create a switch statement to call an Accessibility.sendEvent with the appropriate parameters.<br />
• getName(childID:uint):String-returns the name of the accessible component or the name of one of its child elements.<br />
• getState(childID:uint):uint-returns the state of the accessible component.</p>
<p>It’s important to note that there may be a number of other methods that need to be created for such things as telling the screenreader which child items are focused or what items are selected. Read on for some real-world examples of creating these.</p>
<h3>Add accessibility tie-ins to component class</h3>
<p>The last step is telling your component class to use this accessibility implementation. Actually, this is a step you can do on your components before you finalize your implementation class, because it doesn&#8217;t point to the accessibility class by name. Add these few lines of code to your class:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #0033ff; font-weight: bold;">public</span> static <span style="color: #6699cc; font-weight: bold;">var</span> createAccessibilityImplementation<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Function</span>;
&nbsp;
override <span style="color: #0033ff; font-weight: bold;">protected</span> <span style="color: #339966; font-weight: bold;">function</span> initializeAccessibility<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span>
<span style="color: #000000;">&#123;</span>
     <span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>YourComponentClass.createAccessibilityImplementation<span style="color: #000000; font-weight: bold;">!</span>=<span style="color: #0033ff; font-weight: bold;">null</span><span style="color: #000000;">&#41;</span>
          YourComponentClass.createAccessibilityImplementation<span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000000;">&#41;</span>;
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>This tells UIComponent that there may be an implementation in use, and lets your implementation class mix in with its <code>hookAccessibility()</code> method. If you&#8217;re using Flex, it&#8217;s a good idea to add AccessibilityClass metadata in your component class. For example, with <code>mx.controls.Button</code>, the following metadata is added, pointing to the implementation class:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #000000;">&#91;</span>AccessibilityClass<span style="color: #000000;">&#40;</span>implementation=<span style="color: #990000;">&quot;mx.accessibility.ButtonAccImpl&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#93;</span></pre></div></div>

<h3>Examples</h3>
<p>Talking about what you should do is one thing, but giving you a play-by-play of my own development experience should prove more helpful.</p>
<h4>Carousel</h4>
<p>To create an accessibility implementation for Carousel, I determined that, because Carousel extends <span>SelectableList</span>, my accessibility implementation would extend <span>SelectableListAccImpl</span>. This saved some of the grunt work, as a few of the necessary methods were already created for me. Even the role did not need to be set, as there is no specific designation for a carousel in MSAA. Carousel is essentially a list, so I was able to keep its role as <code>ROLE_SYSTEM_LIST</code> (0&#215;00000021 for the numerically-inclined). I did have to override the <code>get_accValue</code> method to return the value of the current item in the Carousel. Also, because a Carousel can be horizontal as well as vertical, I had to override <code>get_accState</code> to return the proper state information whether the Carousel was a vertical or horizontal list.</p>
<h4>Tree</h4>
<p>For Tree, I at first decided to create an accessibility implementation from scratch, probably because I was being stubborn. While Tree extends List, the typical ListAccImple class wasn&#8217;t going to cut it for Tree, which has a very different interaction model. However, I later realized that had to reimplement <code>getChildIDArray</code>, <code>accLocation</code>, and <code>get_accFocus</code>, which were already present and suitable in <span>SelectableListAccImpl</span>. So I decided in the end to extend that. However, there was a lot left to be written for this implementation. Tree, while it inherits from List, has its own designation in MSAA land. It is called, interestingly enough, an Outline control, designated by the constant <code>ROLE_SYSTEM_OUTLINE</code>. So that was the role I gave it. I reworked the <code>get_accValue</code> method to return the value of the current item as well as their location in the tree structure. So when the item is selected, the screen reader will read something like &#8220;Item 4 of 10&#8243;. Other things I had to do with Tree:</p>
<ul>
<li><code>get_accState</code> was overridden to provide additional information about tree items being collapsed or open.</li>
<li><code>get_accDefaultAction</code> had to show additional actions of a node being collapsed or expanded.</li>
<li><code>accDoDefaultAction</code> needed to be reworked in order to open or close the items.</li>
<li><code>getName</code> was overridden to add, like <code>get_accValue</code>, info about the current location of the item in the tree structure.</li>
</ul>
<p>I also found in my development that proper keyboard navigation wasn&#8217;t in place. So I added that in. That&#8217;s the great part about creating these implementations&#8211;it allows you to really test the usability of the component, not to mention helps you to find bugs.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.yswfblog.com/blog/2009/01/12/creating-accessible-components-in-flash-and-flex-part-2/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
