File tree Expand file tree Collapse file tree 4 files changed +12
-6
lines changed Expand file tree Collapse file tree 4 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -46,8 +46,10 @@ <h2>Widgets</h2>
46
46
< li > < a href ="button/button.html "> Button</ a > </ li >
47
47
< li > < a href ="datepicker/datepicker.html "> Datepicker</ a > </ li >
48
48
< li > < a href ="dialog/dialog.html "> Dialog</ a > </ li >
49
+ < li > < a href ="menu/menu.html "> Menu</ a > </ li >
49
50
< li > < a href ="progressbar/progressbar.html "> Progressbar</ a > </ li >
50
51
< li > < a href ="slider/slider.html "> Slider</ a > </ li >
52
+ < li > < a href ="spinner/spinner.html "> Spinner</ a > </ li >
51
53
< li > < a href ="tabs/tabs.html "> Tabs</ a > </ li >
52
54
< li > < a href ="tooltip/tooltip.html "> Tooltip</ a > </ li >
53
55
</ ul >
Original file line number Diff line number Diff line change 8
8
module ( "menu: core" ) ;
9
9
10
10
test ( "accessibility" , function ( ) {
11
- expect ( 3 ) ;
11
+ expect ( 5 ) ;
12
12
var ac = $ ( '#menu1' ) . menu ( ) ;
13
13
var item0 = $ ( "li:eq(0) a" ) ;
14
14
15
15
ok ( ac . hasClass ( "ui-menu ui-widget ui-widget-content ui-corner-all" ) , "menu class" ) ;
16
16
equals ( ac . attr ( "role" ) , "listbox" , "main role" ) ;
17
- equals ( ac . attr ( "aria-activedescendant" ) , "ui-active-menuitem" , "aria attribute" ) ;
17
+ equals ( ac . attr ( "aria-activedescendant" ) , undefined , "aria attribute not yet active" ) ;
18
+ var item = ac . find ( "li:first" ) . find ( "a" ) . attr ( "id" , "xid" ) . end ( ) ;
19
+ ac . menu ( "activate" , $ . Event ( ) , item ) ;
20
+ equals ( ac . attr ( "aria-activedescendant" ) , "xid" , "aria attribute, id from dom" ) ;
21
+ var item = ac . find ( "li:last" ) ;
22
+ ac . menu ( "activate" , $ . Event ( ) , item ) ;
23
+ equals ( ac . attr ( "aria-activedescendant" ) , "menu1-activedescendant" , "aria attribute, generated id" ) ;
18
24
} ) ;
19
25
20
26
test ( "items class and role" , function ( ) {
Original file line number Diff line number Diff line change 3
3
*/
4
4
5
5
var menu_defaults = {
6
- disabled : false ,
7
- navigationFilter : function ( ) { }
8
-
6
+ disabled : false
9
7
} ;
10
8
11
9
commonWidgetTests ( 'menu' , { defaults : menu_defaults } ) ;
Original file line number Diff line number Diff line change @@ -146,7 +146,7 @@ $.widget("ui.menu", {
146
146
. end ( ) ;
147
147
// need to remove the attribute before adding it for the screenreader to pick up the change
148
148
// see http://groups.google.com/group/jquery-a11y/msg/929e0c1e8c5efc8f
149
- this . element . removeAttr ( "aria-activedescenant " ) . attr ( "aria-activedescenant " , self . itemId ) ;
149
+ this . element . removeAttr ( "aria-activedescendant " ) . attr ( "aria-activedescendant " , self . itemId ) ;
150
150
this . _trigger ( "focus" , event , { item : item } ) ;
151
151
} ,
152
152
You can’t perform that action at this time.
0 commit comments