diff options
author | Richard Worth <rdworth@gmail.com> | 2011-03-15 04:30:36 -0400 |
---|---|---|
committer | Richard Worth <rdworth@gmail.com> | 2011-03-15 04:30:36 -0400 |
commit | 056cab82d8b710953f79cc833b468cb1a24cba9c (patch) | |
tree | a6617caa01e4c94ba9fb2cdbc6ce429188d6c465 /tests/unit/accordion | |
parent | 84257e7f0ae20b81b085f1360c15defdd2b89ea9 (diff) | |
download | jquery-ui-056cab82d8b710953f79cc833b468cb1a24cba9c.tar.gz jquery-ui-056cab82d8b710953f79cc833b468cb1a24cba9c.zip |
Accordion: set aria-selected to true on selected header, false on others. Fixed #7078 - Accordion: Set aria-selected
Diffstat (limited to 'tests/unit/accordion')
-rw-r--r-- | tests/unit/accordion/accordion_core.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/unit/accordion/accordion_core.js b/tests/unit/accordion/accordion_core.js index 24dc0146b..263959851 100644 --- a/tests/unit/accordion/accordion_core.js +++ b/tests/unit/accordion/accordion_core.js @@ -28,7 +28,7 @@ test( "ui-accordion-heading class added to headers anchor", function() { }); test( "accessibility", function () { - expect( 9 ); + expect( 13 ); var ac = $( "#list1" ).accordion().accordion( "option", "active", 1 ); var headers = $( ".ui-accordion-header" ); @@ -39,9 +39,13 @@ test( "accessibility", function () { equals( headers.next().attr( "role" ), "tabpanel", "tabpanel roles" ); equals( headers.eq( 1 ).attr( "aria-expanded" ), "true", "active tab has aria-expanded" ); equals( headers.eq( 0 ).attr( "aria-expanded" ), "false", "inactive tab has aria-expanded" ); + equals( headers.eq( 1 ).attr( "aria-selected" ), "true", "active tab has aria-selected" ); + equals( headers.eq( 0 ).attr( "aria-selected" ), "false", "inactive tab has aria-selected" ); ac.accordion( "option", "active", 0 ); equals( headers.eq( 0 ).attr( "aria-expanded" ), "true", "newly active tab has aria-expanded" ); equals( headers.eq( 1 ).attr( "aria-expanded" ), "false", "newly inactive tab has aria-expanded" ); + equals( headers.eq( 0 ).attr( "aria-selected" ), "true", "active tab has aria-selected" ); + equals( headers.eq( 1 ).attr( "aria-selected" ), "false", "inactive tab has aria-selected" ); }); }( jQuery ) ); |