File tree 2 files changed +4
-3
lines changed
2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,8 @@ var Modal = React.createClass({
36
36
onRequestClose : React . PropTypes . func ,
37
37
closeTimeoutMS : React . PropTypes . number ,
38
38
ariaHideApp : React . PropTypes . bool ,
39
- shouldCloseOnOverlayClick : React . PropTypes . bool
39
+ shouldCloseOnOverlayClick : React . PropTypes . bool ,
40
+ role : React . PropTypes . string
40
41
} ,
41
42
42
43
getDefaultProps : function ( ) {
Original file line number Diff line number Diff line change @@ -58,9 +58,9 @@ describe('Modal', function () {
58
58
unmountModal ( ) ;
59
59
} ) ;
60
60
61
- it ( 'renders the modal content with a dialog aria role ' , function ( ) {
61
+ it ( 'renders the modal content with a dialog aria role when provided ' , function ( ) {
62
62
var child = 'I am a child of Modal, and he has sent me here...' ;
63
- var component = renderModal ( { isOpen : true } , child ) ;
63
+ var component = renderModal ( { isOpen : true , role : 'dialog' } , child ) ;
64
64
equal ( component . portal . refs . content . getAttribute ( 'role' ) , 'dialog' ) ;
65
65
unmountModal ( ) ;
66
66
} ) ;
You can’t perform that action at this time.
0 commit comments