Making widgets accessible for keyboard navigation is an important part of every widget. Keyboard navigation lets the user control the widget with arrow keys and custom keys.
The foundation of keyboard navigation is the tabIndex attribute. This attribute tells the browser how to navigate through the document.
To enable keyboard navigation on the
accordion, add a TabIndex value to the accordion
container tag, as follows:
<div id="Acc1" class="Accordion" tabIndex="0">
If the tabIndex attribute has a value of zero (0), the browser determines the order. If the tabIndex attribute has a positive integer value, that order value is used.
You can also set custom keys for keyboard navigation. Custom keys are set as arguments of the accordion constructor script:
<script type="text/javascript">
var acc3= new Spry.Widget.Accordion("Acc3", { nextPanelKeyCode: 78 /* n key */, previousPanelKeyCode: 80 /* p key */ });
</script>
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/en_US/Spry/1.4/WS2EE3C3EA-7197-4117-910C-5AB11363A65F.html
Comments
Comments are no longer accepted for Spry 1.4. Spry 1.6 is the current version. To discuss Spry 1.4, please use the Adobe forum.