Skip to content

Commit

Permalink
Restore removing aria-hidden, and not set it false
Browse files Browse the repository at this point in the history
  • Loading branch information
J-Kallunki committed Oct 4, 2018
1 parent 860b952 commit 21abdf8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/material-ui/src/Modal/ModalManager.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ describe('ModalManager', () => {
modalManager.add(modal3, container2);
assert.strictEqual(mountNode2.getAttribute('aria-hidden'), 'true');
modalManager.remove(modal3, container2);
assert.strictEqual(mountNode2.getAttribute('aria-hidden'), 'false');
assert.strictEqual(mountNode2.getAttribute('aria-hidden'), null);
});

it('should remove aria-hidden on siblings', () => {
Expand All @@ -178,7 +178,7 @@ describe('ModalManager', () => {
modalManager.add(modal, container2);
assert.strictEqual(mountNode1.getAttribute('aria-hidden'), 'true');
modalManager.remove(modal, container2);
assert.strictEqual(mountNode1.getAttribute('aria-hidden'), 'false');
assert.strictEqual(mountNode1.getAttribute('aria-hidden'), null);
});
});
});
2 changes: 1 addition & 1 deletion packages/material-ui/src/Modal/manageAriaHidden.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export function ariaHidden(show, node) {
if (show) {
node.setAttribute('aria-hidden', 'true');
} else {
node.setAttribute('aria-hidden', 'false');
node.removeAttribute('aria-hidden');
}
}

Expand Down

0 comments on commit 21abdf8

Please sign in to comment.