diff --git a/lib/components/Modal.js b/lib/components/Modal.js index 43401344..3bd28dd5 100644 --- a/lib/components/Modal.js +++ b/lib/components/Modal.js @@ -36,7 +36,8 @@ var Modal = React.createClass({ onRequestClose: React.PropTypes.func, closeTimeoutMS: React.PropTypes.number, ariaHideApp: React.PropTypes.bool, - shouldCloseOnOverlayClick: React.PropTypes.bool + shouldCloseOnOverlayClick: React.PropTypes.bool, + role: React.PropTypes.string }, getDefaultProps: function () { diff --git a/specs/Modal.spec.js b/specs/Modal.spec.js index 66453bd7..31b9a22b 100644 --- a/specs/Modal.spec.js +++ b/specs/Modal.spec.js @@ -58,9 +58,9 @@ describe('Modal', function () { unmountModal(); }); - it('renders the modal content with a dialog aria role ', function () { + it('renders the modal content with a dialog aria role when provided ', function () { var child = 'I am a child of Modal, and he has sent me here...'; - var component = renderModal({isOpen: true}, child); + var component = renderModal({isOpen: true, role: 'dialog'}, child); equal(component.portal.refs.content.getAttribute('role'), 'dialog'); unmountModal(); });