Skip to content

Commit 919daa3

Browse files
committedOct 8, 2016
[fixed] Remove the default aria role dialog
This has several accessibility concerns although well intentioned. closes #237
1 parent c8106f2 commit 919daa3

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed
 

Diff for: ‎lib/components/Modal.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ var Modal = React.createClass({
3636
onRequestClose: React.PropTypes.func,
3737
closeTimeoutMS: React.PropTypes.number,
3838
ariaHideApp: React.PropTypes.bool,
39-
shouldCloseOnOverlayClick: React.PropTypes.bool
39+
shouldCloseOnOverlayClick: React.PropTypes.bool,
40+
role: React.PropTypes.string
4041
},
4142

4243
getDefaultProps: function () {

Diff for: ‎specs/Modal.spec.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ describe('Modal', function () {
5858
unmountModal();
5959
});
6060

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 () {
6262
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);
6464
equal(component.portal.refs.content.getAttribute('role'), 'dialog');
6565
unmountModal();
6666
});

0 commit comments

Comments
 (0)