Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can escape Modals to reach background using Screen Readers #2575

Closed
darcy-rayner opened this issue Aug 5, 2018 · 1 comment
Closed

Can escape Modals to reach background using Screen Readers #2575

darcy-rayner opened this issue Aug 5, 2018 · 1 comment

Comments

@darcy-rayner
Copy link

darcy-rayner commented Aug 5, 2018

Bug description:

Can escape Modals to reach background using Voice Over/JAWS
Steps,

  1. Turn on Voice Over in System settings on Mac in Chrome/Firefox
  2. Click Launch Demo Modal, click on input element
  3. Press back arrow key until out of Modal and navigate to 'Launch Demo Modal' again. Hit enter
    The Modal is launched on top of the original modal.

Note, I've only tested this in Voice Over, but other screen readers should have the same behaviour on different Operating Systems. For most greenfield desktop browsers, setting aria-modal="true", (introduced in aria 1.1), on the same div with the role="dialog" should fix the issue. For older browsers, the only solution is to set aria-disabled="true" on the root of the background content.

Also, note this is different from the previous issue asking to add a tab trap

More info on aria-modal

Link to minimally-working plunker that reproduces the issue:

Here

Version of Angular, ng-bootstrap, and Bootstrap:

Angular:
Angular 6.0.4

ng-bootstrap:
2.2.2

Bootstrap:
4.1.1

@pkozlowski-opensource pkozlowski-opensource modified the milestones: 3.1.1, 3.2.0, 3.2.1 Aug 24, 2018
@pkozlowski-opensource pkozlowski-opensource modified the milestones: 3.2.1, 3.3.1 Sep 21, 2018
@pkozlowski-opensource pkozlowski-opensource modified the milestones: 3.3.1, 4.0.1 Oct 19, 2018
@maxokorokov maxokorokov modified the milestones: 4.0.1, 4.0.2 Dec 13, 2018
maxokorokov added a commit to maxokorokov/ng-bootstrap that referenced this issue Jan 14, 2019
Add missing 'aria-modal' on the modal window.
Add 'aria-hidden' on all sibling DOM branches from the modal window up to the document body

Fixes ng-bootstrap#2575
maxokorokov added a commit to maxokorokov/ng-bootstrap that referenced this issue Jan 14, 2019
Add missing 'aria-modal' on the modal window.
Add 'aria-hidden' on all sibling DOM branches from the modal window up to the document body

Fixes ng-bootstrap#2575
maxokorokov added a commit to maxokorokov/ng-bootstrap that referenced this issue Jan 14, 2019
Add missing 'aria-modal' on the modal window.
Add 'aria-hidden' on all sibling DOM branches from the modal window up to the document body

Fixes ng-bootstrap#2575
maxokorokov added a commit to maxokorokov/ng-bootstrap that referenced this issue Jan 17, 2019
Add missing 'aria-modal' on the modal window.
Add 'aria-hidden' on all sibling DOM branches from the modal window up to the document body

Fixes ng-bootstrap#2575
@maxokorokov
Copy link
Member

maxokorokov commented Jan 21, 2019

Unfortunately adding aria-modal and hiding all other branches with aria-hidden doesn't fix VoiceOver on a desktop, but I couldn't find any solutions for this. NNDA and JAWS work fine form my tests.

maxokorokov added a commit that referenced this issue Jan 23, 2019
Add missing 'aria-modal' on the modal window.
Add 'aria-hidden' on all sibling DOM branches from the modal window up to the document body

Fixes #2575
Closes #2965
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants