@@ -46,7 +46,7 @@ $.each([
46
46
}
47
47
] , function ( i , settings ) {
48
48
test ( "state synchronization - after keydown - " + settings . type , function ( ) {
49
- expect ( 4 ) ;
49
+ expect ( 5 ) ;
50
50
51
51
var links ,
52
52
element = $ ( settings . selector ) . selectmenu ( ) ,
@@ -60,12 +60,13 @@ $.each([
60
60
button . simulate ( "keydown" , { keyCode : $ . ui . keyCode . DOWN } ) ;
61
61
equal ( menu . attr ( "aria-activedescendant" ) , links . eq ( element [ 0 ] . selectedIndex ) . attr ( "id" ) , "menu aria-activedescendant" ) ;
62
62
equal ( links . eq ( element [ 0 ] . selectedIndex ) . attr ( "aria-selected" ) , "true" , "selected menu link aria-selected" ) ;
63
+ equal ( button . attr ( "aria-activedescendant" ) , links . eq ( element [ 0 ] . selectedIndex ) . attr ( "id" ) , "button aria-activedescendant" ) ;
63
64
equal ( element . find ( "option:selected" ) . val ( ) , selected . next ( "option" ) . val ( ) , "original select state" ) ;
64
65
equal ( button . text ( ) , selected . next ( "option" ) . text ( ) , "button text" ) ;
65
66
} ) ;
66
67
67
68
test ( "state synchronization - after click - " + settings . type , function ( ) {
68
- expect ( 4 ) ;
69
+ expect ( 5 ) ;
69
70
70
71
var links ,
71
72
element = $ ( settings . selector ) . selectmenu ( ) ,
@@ -80,6 +81,7 @@ $.each([
80
81
menu . find ( "a" ) . last ( ) . simulate ( "mouseover" ) . trigger ( "click" ) ;
81
82
equal ( menu . attr ( "aria-activedescendant" ) , links . eq ( element [ 0 ] . selectedIndex ) . attr ( "id" ) , "menu aria-activedescendant" ) ;
82
83
equal ( links . eq ( element [ 0 ] . selectedIndex ) . attr ( "aria-selected" ) , "true" , "selected menu link aria-selected" ) ;
84
+ equal ( button . attr ( "aria-activedescendant" ) , links . eq ( element [ 0 ] . selectedIndex ) . attr ( "id" ) , "button aria-activedescendant" ) ;
83
85
equal ( element . find ( "option:selected" ) . val ( ) , element . find ( "option" ) . last ( ) . val ( ) , "original select state" ) ;
84
86
equal ( button . text ( ) , element . find ( "option" ) . last ( ) . text ( ) , "button text" ) ;
85
87
} ) ;
0 commit comments