diff options
author | Mike Sherov <mike.sherov@gmail.com> | 2013-03-11 21:28:51 -0400 |
---|---|---|
committer | Mike Sherov <mike.sherov@gmail.com> | 2013-03-11 22:08:21 -0400 |
commit | 4d67f4f34908a50ef88f95df4103ee001b777e45 (patch) | |
tree | e14cd5bcc22a960ab65db9bd6567f9b8638ce272 /tests/unit/autocomplete | |
parent | 4f95a0f396965e91982f1b5e67da814bb6640ce1 (diff) | |
download | jquery-ui-4d67f4f34908a50ef88f95df4103ee001b777e45.tar.gz jquery-ui-4d67f4f34908a50ef88f95df4103ee001b777e45.zip |
Widget: Stop setting ui-state-disabled and aria by default on setting disabled option.
Fixes #5973 - Resizable: disabled should not have the ui-state-disabled class or aria attribute aria-disabled
Fixes #5974 - Draggable: disabled should not have the ui-state-disabled class or aria attribute aria-disabled
Fixes #6039 - Droppable : disabled should not have ui-state-disabled
Diffstat (limited to 'tests/unit/autocomplete')
-rw-r--r-- | tests/unit/autocomplete/autocomplete_options.js | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/unit/autocomplete/autocomplete_options.js b/tests/unit/autocomplete/autocomplete_options.js index 9f0bd2d43..c98f2c28e 100644 --- a/tests/unit/autocomplete/autocomplete_options.js +++ b/tests/unit/autocomplete/autocomplete_options.js @@ -88,17 +88,20 @@ asyncTest( "delay", function() { }); asyncTest( "disabled", function() { - expect( 2 ); + expect( 5 ); var element = $( "#autocomplete" ).autocomplete({ source: data, - delay: 0, - disabled: true + delay: 0 }), - menu = element.autocomplete( "widget" ); + menu = element.autocomplete( "disable" ).autocomplete( "widget" ); element.val( "ja" ).keydown(); ok( menu.is( ":hidden" ) ); + ok( !element.is( ".ui-state-disabled" ), "element doesn't get ui-state-disabled" ); + ok( !element.attr( "aria-disabled" ), "element doesn't get aria-disabled" ); + ok( menu.is( ".ui-autocomplete-disabled" ), "element gets ui-autocomplete-disabled" ); + setTimeout(function() { ok( menu.is( ":hidden" ) ); start(); |