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>
4646 < li > < a href ="button/button.html "> Button</ a > </ li >
4747 < li > < a href ="datepicker/datepicker.html "> Datepicker</ a > </ li >
4848 < li > < a href ="dialog/dialog.html "> Dialog</ a > </ li >
49+ < li > < a href ="menu/menu.html "> Menu</ a > </ li >
4950 < li > < a href ="progressbar/progressbar.html "> Progressbar</ a > </ li >
5051 < li > < a href ="slider/slider.html "> Slider</ a > </ li >
52+ < li > < a href ="spinner/spinner.html "> Spinner</ a > </ li >
5153 < li > < a href ="tabs/tabs.html "> Tabs</ a > </ li >
5254 < li > < a href ="tooltip/tooltip.html "> Tooltip</ a > </ li >
5355</ ul >
Original file line number Diff line number Diff line change 88module ( "menu: core" ) ;
99
1010test ( "accessibility" , function ( ) {
11- expect ( 3 ) ;
11+ expect ( 5 ) ;
1212 var ac = $ ( '#menu1' ) . menu ( ) ;
1313 var item0 = $ ( "li:eq(0) a" ) ;
1414
1515 ok ( ac . hasClass ( "ui-menu ui-widget ui-widget-content ui-corner-all" ) , "menu class" ) ;
1616 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" ) ;
1824} ) ;
1925
2026test ( "items class and role" , function ( ) {
Original file line number Diff line number Diff line change 33 */
44
55var menu_defaults = {
6- disabled : false ,
7- navigationFilter : function ( ) { }
8-
6+ disabled : false
97} ;
108
119commonWidgetTests ( 'menu' , { defaults : menu_defaults } ) ;
Original file line number Diff line number Diff line change @@ -146,7 +146,7 @@ $.widget("ui.menu", {
146146 . end ( ) ;
147147 // need to remove the attribute before adding it for the screenreader to pick up the change
148148 // 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 ) ;
150150 this . _trigger ( "focus" , event , { item : item } ) ;
151151 } ,
152152
You can’t perform that action at this time.
0 commit comments