Skip to content
This repository was archived by the owner on Jul 3, 2024. It is now read-only.

Commit

Permalink
changed the source order for the tabs (so they come before the panels…
Browse files Browse the repository at this point in the history
…, which will be more helpful in ARIA use)

changed the keyboard trigger to onkeydown
  • Loading branch information
Aaron Gustafson authored and Aaron Gustafson committed Apr 20, 2009
1 parent ee26a28 commit 84cefb7
Showing 2 changed files with 11 additions and 4 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
*v0.4.2* (2009-04-20)

* changed the source order for the tabs (so they come before the panels, which will be more helpful in ARIA use)
* changed the keyboard trigger to onkeydown

--

*v0.4.1* (2009-04-20)

* added support for nested elements within a tab
8 changes: 4 additions & 4 deletions src/TabInterface.js
Original file line number Diff line number Diff line change
@@ -2,15 +2,15 @@
Function: TabInterface()
Author: Aaron Gustafson (aaron at easy-designs dot net)
Creation Date: 7 December 2006
Version: 0.4.1
Version: 0.4.2
Homepage: http://github.com/easy-designs/tabinterface.js
License: MIT License (see MIT-LICENSE)
Note: If you change or improve on this script, please let us know by
emailing the author (above) with a link to your demo page.
------------------------------------------------------------------------------*/
function TabInterface( el, i ){
// Public Properties
this.Version = '0.4.1'; // version
this.Version = '0.4.2'; // version

// Private Properties
var _i = i; // incrementor
@@ -70,6 +70,7 @@ function TabInterface( el, i ){
_cabinet.innerHTML = '';
removeClassName( _cabinet, 'tabbed' );
addClassName( _cabinet, 'tabbed-on' );
_cabinet.appendChild( _index );
var aLen = arr.length;
for( var k=0; k<aLen; k++ ){
// build the div
@@ -84,7 +85,7 @@ function TabInterface( el, i ){
tab.folder = folder.getAttribute( 'id' );
tab.setAttribute( 'id', tab.folder + '-tab' );
tab.onclick = swap; // set the action
tab.onkeypress = moveFocus; // add the keyboard control
tab.onkeydown = moveFocus; // add the keyboard control
var heading = folder.getElementsByTagName( _tag )[0];
if( heading.getAttribute( 'title' ) ){
tab.innerHTML = heading.getAttribute( 'title' );
@@ -105,7 +106,6 @@ function TabInterface( el, i ){
}
// add the index
addClassName( _index, 'tab-list' );
_cabinet.appendChild( _index );
}
function swap( e )
{

0 comments on commit 84cefb7

Please sign in to comment.