dougludlow / ng2-bs3-modal

Angular Bootstrap 3 Modal Component
http://dougludlow.github.io/ng2-bs3-modal/
ISC License
261 stars 133 forks source link

Using swipe Gestures on Modal in both android & ios devices screen reader reads body content #248

Open sripalreddyadamala opened 6 years ago

sripalreddyadamala commented 6 years ago

Hi,

I am using ng2-bs3-modal@^0.13.0 modal component in one of our projects.

On using swipe gesture on mobile devices screen reader should read elements form modal but now screen reader is reading content below the modal. Could you please able to add aria-hidden=true on body when modal is opened and aria hidden=false on modal element so that body content will be hidden to accessibility api.

Expected behavior – Focus should be inside the modal since we are not using aria hidden on both modal and body focus is getting on to body.

This is critical interaction for AX users. Appreciate any support you can provide with regards to this.

dougludlow commented 6 years ago

Hi @sripalreddyadamala, that's a great idea. I've been a bit busy lately. If you want to submit a pull request that would probably ensure quicker turnaround time.

sripalreddyadamala commented 6 years ago

Hi @sripalreddyadamala, that's a great idea. I've been a bit busy lately. If you want to submit a pull request that would probably ensure quicker turnaround time.

tried working on it but i do not have any luck on it could you please add that piece of code.

sripalreddyadamala commented 6 years ago

can you please add aria-modal="true" in next release version this will fix above issue. Aria 2.1 added this attribute so that background body content will be hidden to AX users once modal is triggered. This should also include role="dialog" so that it willl work fine.