File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -21,19 +21,24 @@ test( "markup structure", function() {
21
21
} ) ;
22
22
23
23
test ( "accessibility" , function ( ) {
24
- // TODO: full tests
25
- expect ( 2 ) ;
24
+ expect ( 5 ) ;
26
25
27
26
var tooltipId ,
27
+ tooltip ,
28
28
element = $ ( "#multiple-describedby" ) . tooltip ( ) ;
29
29
30
30
element . tooltip ( "open" ) ;
31
31
tooltipId = element . data ( "ui-tooltip-id" ) ;
32
+ tooltip = $ ( "#" + tooltipId ) ;
33
+ equal ( tooltip . attr ( "role" ) , "tooltip" , "role" ) ;
32
34
equal ( element . attr ( "aria-describedby" ) , "fixture-span " + tooltipId ,
33
35
"multiple describedby when open" ) ;
36
+ // strictEqual to distinguish between .removeAttr( "title" ) and .attr( "title", "" )
37
+ strictEqual ( element . attr ( "title" ) , undefined , "no title when open" ) ;
34
38
element . tooltip ( "close" ) ;
35
39
equal ( element . attr ( "aria-describedby" ) , "fixture-span" ,
36
40
"correct describedby when closed" ) ;
41
+ equal ( element . attr ( "title" ) , "..." , "title restored when closed" ) ;
37
42
} ) ;
38
43
39
44
} ( jQuery ) ) ;
You can’t perform that action at this time.
0 commit comments