@@ -254,6 +254,7 @@ return /******/ (function(modules) { // webpackBootstrap
254254 ariaHideApp : _propTypes2 . default . bool ,
255255 shouldCloseOnOverlayClick : _propTypes2 . default . bool ,
256256 parentSelector : _propTypes2 . default . func ,
257+ aria : _propTypes2 . default . object ,
257258 role : _propTypes2 . default . string ,
258259 contentLabel : _propTypes2 . default . string . isRequired
259260 } ;
@@ -1384,6 +1385,13 @@ return /******/ (function(modules) { // webpackBootstrap
13841385 return typeof additional === 'string' && additional ? className + ' ' + additional : className ;
13851386 } ;
13861387
1388+ _this . ariaAttributes = function ( items ) {
1389+ return Object . keys ( items ) . reduce ( function ( acc , name ) {
1390+ acc [ 'aria-' + name ] = items [ name ] ;
1391+ return acc ;
1392+ } , { } ) ;
1393+ } ;
1394+
13871395 _this . state = {
13881396 afterOpen : false ,
13891397 beforeClose : false
@@ -1490,15 +1498,16 @@ return /******/ (function(modules) { // webpackBootstrap
14901498 onClick : this . handleOverlayOnClick } ,
14911499 _react2 . default . createElement (
14921500 'div' ,
1493- {
1501+ _extends ( {
14941502 ref : this . setContentRef ,
14951503 style : _extends ( { } , contentStyles , this . props . style . content ) ,
14961504 className : this . buildClassName ( 'content' , className ) ,
14971505 tabIndex : '-1' ,
14981506 onKeyDown : this . handleKeyDown ,
14991507 onClick : this . handleContentOnClick ,
15001508 role : this . props . role ,
1501- 'aria-label' : this . props . contentLabel } ,
1509+ 'aria-label' : this . props . contentLabel
1510+ } , this . ariaAttributes ( this . props . aria || { } ) ) ,
15021511 this . props . children
15031512 )
15041513 ) ;
@@ -1535,6 +1544,7 @@ return /******/ (function(modules) { // webpackBootstrap
15351544 shouldCloseOnOverlayClick : _propTypes . PropTypes . bool ,
15361545 role : _propTypes . PropTypes . string ,
15371546 contentLabel : _propTypes . PropTypes . string ,
1547+ aria : _propTypes . PropTypes . object ,
15381548 children : _propTypes . PropTypes . node
15391549 } ;
15401550 exports . default = ModalPortal ;
0 commit comments