@@ -13,23 +13,23 @@ test("accessibility", function () {
13
13
14
14
expect ( 12 + links . length * 2 ) ;
15
15
16
- equals ( button . attr ( "role" ) , "combobox" , "button link role" ) ;
17
- equals ( button . attr ( "aria-haspopup" ) , "true" , "button link aria-haspopup" ) ;
18
- equals ( button . attr ( "aria-expanded" ) , "false" , "button link aria-expanded" ) ;
19
- equals ( button . attr ( "aria-autocomplete" ) , "list" , "button link aria-autocomplete" ) ;
20
- equals ( button . attr ( "aria-owns" ) , menu . attr ( "id" ) , "button link aria-owns" ) ;
21
- equals ( button . attr ( "tabindex" ) , 0 , "button link tabindex" ) ;
16
+ equal ( button . attr ( "role" ) , "combobox" , "button link role" ) ;
17
+ equal ( button . attr ( "aria-haspopup" ) , "true" , "button link aria-haspopup" ) ;
18
+ equal ( button . attr ( "aria-expanded" ) , "false" , "button link aria-expanded" ) ;
19
+ equal ( button . attr ( "aria-autocomplete" ) , "list" , "button link aria-autocomplete" ) ;
20
+ equal ( button . attr ( "aria-owns" ) , menu . attr ( "id" ) , "button link aria-owns" ) ;
21
+ equal ( button . attr ( "tabindex" ) , 0 , "button link tabindex" ) ;
22
22
23
- equals ( menu . attr ( "role" ) , "listbox" , "menu role" ) ;
24
- equals ( menu . attr ( "aria-labelledby" ) , button . attr ( "id" ) , "menu aria-labelledby" ) ;
25
- equals ( menu . attr ( "aria-hidden" ) , "true" , "menu aria-hidden" ) ;
26
- equals ( menu . attr ( "tabindex" ) , 0 , "menu tabindex" ) ;
27
- equals ( menu . attr ( "aria-activedescendant" ) , links . eq ( element [ 0 ] . selectedIndex ) . attr ( "id" ) , "menu aria-activedescendant" ) ;
23
+ equal ( menu . attr ( "role" ) , "listbox" , "menu role" ) ;
24
+ equal ( menu . attr ( "aria-labelledby" ) , button . attr ( "id" ) , "menu aria-labelledby" ) ;
25
+ equal ( menu . attr ( "aria-hidden" ) , "true" , "menu aria-hidden" ) ;
26
+ equal ( menu . attr ( "tabindex" ) , 0 , "menu tabindex" ) ;
27
+ equal ( menu . attr ( "aria-activedescendant" ) , links . eq ( element [ 0 ] . selectedIndex ) . attr ( "id" ) , "menu aria-activedescendant" ) ;
28
28
$ . each ( links , function ( index ) {
29
- equals ( $ ( this ) . attr ( "role" ) , "option" , "menu link #" + index + " role" ) ;
30
- equals ( $ ( this ) . attr ( "tabindex" ) , - 1 , "menu link #" + index + " tabindex" ) ;
29
+ equal ( $ ( this ) . attr ( "role" ) , "option" , "menu link #" + index + " role" ) ;
30
+ equal ( $ ( this ) . attr ( "tabindex" ) , - 1 , "menu link #" + index + " tabindex" ) ;
31
31
} ) ;
32
- equals ( links . eq ( element [ 0 ] . selectedIndex ) . attr ( "aria-selected" ) , "true" , "selected menu link aria-selected" ) ;
32
+ equal ( links . eq ( element [ 0 ] . selectedIndex ) . attr ( "aria-selected" ) , "true" , "selected menu link aria-selected" ) ;
33
33
} ) ;
34
34
35
35
@@ -55,17 +55,17 @@ $.each([
55
55
var links = menu . find ( "li.ui-menu-item a" ) ;
56
56
57
57
button . simulate ( "keydown" , { keyCode : $ . ui . keyCode . DOWN } ) ;
58
- equals ( menu . attr ( "aria-activedescendant" ) , links . eq ( element [ 0 ] . selectedIndex ) . attr ( "id" ) , "after keydown menu aria-activedescendant" ) ;
59
- equals ( links . eq ( element [ 0 ] . selectedIndex ) . attr ( "aria-selected" ) , "true" , "after keydown selected menu link aria-selected" ) ;
60
- equals ( element . find ( "option:selected" ) . val ( ) , selected . next ( "option" ) . val ( ) , "after keydown original select state" ) ;
61
- equals ( button . text ( ) , selected . next ( "option" ) . text ( ) , "after keydown button text" ) ;
58
+ equal ( menu . attr ( "aria-activedescendant" ) , links . eq ( element [ 0 ] . selectedIndex ) . attr ( "id" ) , "after keydown menu aria-activedescendant" ) ;
59
+ equal ( links . eq ( element [ 0 ] . selectedIndex ) . attr ( "aria-selected" ) , "true" , "after keydown selected menu link aria-selected" ) ;
60
+ equal ( element . find ( "option:selected" ) . val ( ) , selected . next ( "option" ) . val ( ) , "after keydown original select state" ) ;
61
+ equal ( button . text ( ) , selected . next ( "option" ) . text ( ) , "after keydown button text" ) ;
62
62
63
63
button . simulate ( "click" ) ;
64
64
menu . find ( "a" ) . last ( ) . simulate ( "mouseover" ) . trigger ( "click" ) ;
65
- equals ( menu . attr ( "aria-activedescendant" ) , links . eq ( element [ 0 ] . selectedIndex ) . attr ( "id" ) , "after click menu aria-activedescendant" ) ;
66
- equals ( links . eq ( element [ 0 ] . selectedIndex ) . attr ( "aria-selected" ) , "true" , "after click selected menu link aria-selected" ) ;
67
- equals ( element . find ( "option:selected" ) . val ( ) , element . find ( "option" ) . last ( ) . val ( ) , "after click original select state" ) ;
68
- equals ( button . text ( ) , element . find ( "option" ) . last ( ) . text ( ) , "after click button text" ) ;
65
+ equal ( menu . attr ( "aria-activedescendant" ) , links . eq ( element [ 0 ] . selectedIndex ) . attr ( "id" ) , "after click menu aria-activedescendant" ) ;
66
+ equal ( links . eq ( element [ 0 ] . selectedIndex ) . attr ( "aria-selected" ) , "true" , "after click selected menu link aria-selected" ) ;
67
+ equal ( element . find ( "option:selected" ) . val ( ) , element . find ( "option" ) . last ( ) . val ( ) , "after click original select state" ) ;
68
+ equal ( button . text ( ) , element . find ( "option" ) . last ( ) . text ( ) , "after click button text" ) ;
69
69
} ) ;
70
70
} ) ;
71
71
0 commit comments