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

Commit 84cefb7

Browse files
Aaron GustafsonAaron Gustafson
authored andcommitted
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
1 parent ee26a28 commit 84cefb7

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

CHANGELOG

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
*v0.4.2* (2009-04-20)
2+
3+
* changed the source order for the tabs (so they come before the panels, which will be more helpful in ARIA use)
4+
* changed the keyboard trigger to onkeydown
5+
6+
--
7+
18
*v0.4.1* (2009-04-20)
29

310
* added support for nested elements within a tab

src/TabInterface.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
Function: TabInterface()
33
Author: Aaron Gustafson (aaron at easy-designs dot net)
44
Creation Date: 7 December 2006
5-
Version: 0.4.1
5+
Version: 0.4.2
66
Homepage: http://github.com/easy-designs/tabinterface.js
77
License: MIT License (see MIT-LICENSE)
88
Note: If you change or improve on this script, please let us know by
99
emailing the author (above) with a link to your demo page.
1010
------------------------------------------------------------------------------*/
1111
function TabInterface( el, i ){
1212
// Public Properties
13-
this.Version = '0.4.1'; // version
13+
this.Version = '0.4.2'; // version
1414

1515
// Private Properties
1616
var _i = i; // incrementor
@@ -70,6 +70,7 @@ function TabInterface( el, i ){
7070
_cabinet.innerHTML = '';
7171
removeClassName( _cabinet, 'tabbed' );
7272
addClassName( _cabinet, 'tabbed-on' );
73+
_cabinet.appendChild( _index );
7374
var aLen = arr.length;
7475
for( var k=0; k<aLen; k++ ){
7576
// build the div
@@ -84,7 +85,7 @@ function TabInterface( el, i ){
8485
tab.folder = folder.getAttribute( 'id' );
8586
tab.setAttribute( 'id', tab.folder + '-tab' );
8687
tab.onclick = swap; // set the action
87-
tab.onkeypress = moveFocus; // add the keyboard control
88+
tab.onkeydown = moveFocus; // add the keyboard control
8889
var heading = folder.getElementsByTagName( _tag )[0];
8990
if( heading.getAttribute( 'title' ) ){
9091
tab.innerHTML = heading.getAttribute( 'title' );
@@ -105,7 +106,6 @@ function TabInterface( el, i ){
105106
}
106107
// add the index
107108
addClassName( _index, 'tab-list' );
108-
_cabinet.appendChild( _index );
109109
}
110110
function swap( e )
111111
{

0 commit comments

Comments
 (0)