File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -84,6 +84,26 @@ QUnit.test( "ARIA", function( assert ) {
8484 element . remove ( ) ;
8585} ) ;
8686
87+ QUnit . test ( "aria-modal" , function ( assert ) {
88+ assert . expect ( 3 ) ;
89+
90+ var element = $ ( "<div>" ) . dialog ( ) ,
91+ wrapper = element . dialog ( "option" , "modal" , true ) ;
92+ assert . equal ( wrapper . attr ( "aria-modal" ) , "true" , "aria-modal attribute set to true" ) ;
93+ element . remove ( ) ;
94+
95+ var element = $ ( "<div>" ) . dialog ( ) ,
96+ wrapper = element . dialog ( "option" , "modal" , false ) ;
97+ assert . equal ( wrapper . attr ( "aria-modal" ) , "false" , "aria-modal attribute set to false" ) ;
98+ element . remove ( ) ;
99+
100+ var element = $ ( "<div>" ) . dialog ( ) ;
101+ assert . equal ( element . dialog ( "widget" ) . attr ( "aria-describedby" ) , null , "no aria-modal attribute added" ) ;
102+ element . remove ( ) ;
103+
104+ } ) ;
105+
106+
87107QUnit . test ( "widget method" , function ( assert ) {
88108 assert . expect ( 1 ) ;
89109 var dialog = $ ( "<div>" ) . appendTo ( "#qunit-fixture" ) . dialog ( ) ;
You can’t perform that action at this time.
0 commit comments