aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2012-07-05 20:49:00 -0400
committerScott González <scott.gonzalez@gmail.com>2012-07-05 20:49:00 -0400
commitc6567ba8800c2ddf0b2b2a18682f670ba77a3a2b (patch)
tree5b6461a630269064fa8e5c576a088f581519c113 /tests
parentab260f70626b89c993467f90f260a461a25d92b3 (diff)
downloadjquery-ui-c6567ba8800c2ddf0b2b2a18682f670ba77a3a2b.tar.gz
jquery-ui-c6567ba8800c2ddf0b2b2a18682f670ba77a3a2b.zip
Tabs tests: Add tests for accessibility of ajax tabs.
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/tabs/tabs_core.js18
1 files changed, 17 insertions, 1 deletions
diff --git a/tests/unit/tabs/tabs_core.js b/tests/unit/tabs/tabs_core.js
index fd9cc7d63..f1a2d72c1 100644
--- a/tests/unit/tabs/tabs_core.js
+++ b/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() {