Skip to content

Commit

Permalink
[fixed] Remove the default aria role dialog
Browse files Browse the repository at this point in the history
This has several accessibility concerns although well intentioned.

closes reactjs#237
  • Loading branch information
claydiffrient committed Oct 8, 2016
1 parent c8106f2 commit 919daa3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion lib/components/Modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 () {
Expand Down
4 changes: 2 additions & 2 deletions specs/Modal.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
});
Expand Down

0 comments on commit 919daa3

Please sign in to comment.