Skip to content
Permalink
Browse files

Tabs tests: Add tests for accessibility of ajax tabs.

  • Loading branch information
scottgonzalez committed Jul 6, 2012
1 parent ab260f7 commit c6567ba8800c2ddf0b2b2a18682f670ba77a3a2b
Showing with 17 additions and 1 deletion.
  1. +17 −1 tests/unit/tabs/tabs_core.js
@@ -118,8 +118,24 @@ test( "accessibility", function() {
equal( tabs.eq( 2 ).attr( "aria-disabled" ), "true", "disabled tab has aria-disabled=true" );
equal( panels.eq( 2 ).attr( "aria-expanded" ), "false", "inactive panel has aria-expanded=false" );
equal( panels.eq( 2 ).attr( "aria-hidden" ), "true", "inactive panel has aria-hidden=true" );
});

// TODO: aria-live and aria-busy tests for ajax tabs
asyncTest( "accessibility - ajax", function() {
expect( 4 );
var element = $( "#tabs2" ).tabs(),
tab = element.find( ".ui-tabs-nav li" ).eq( 3 ),
panel = $( "#custom-id" );

equal( panel.attr( "aria-live" ), "polite", "remote panel has aria-live" );
equal( panel.attr( "aria-busy" ), null, "does not have aria-busy on init" );
element.tabs( "option", "active", 3 );
equal( panel.attr( "aria-busy" ), "true", "panel has aria-busy during load" );
element.one( "tabsload", function() {
setTimeout(function() {
equal( panel.attr( "aria-busy" ), null, "panel does not have aria-busy after load" );
start();
}, 1 );
});
});

asyncTest( "keyboard support - LEFT, RIGHT, UP, DOWN, HOME, END, SPACE, ENTER", function() {

0 comments on commit c6567ba

Please sign in to comment.
You can’t perform that action at this time.