Remove role="document" from the dialog and add aria-modal="true"
Created by: DavidMacDonald
Current Code
<div class="modal" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
Solution code
<div class="modal" tabindex="-1" role="dialog" aria-modal="true">
<div class="modal-dialog" >
Rational
Document role is only necessary if there role="application" on a parent that overrides screen reader short cut keys.
The role="dialog"
doesn't do that, so it's fine without it ... see aria-practices example
https://w3c.github.io/aria-practices/examples/dialog-modal/dialog.html
aria-modal="true"
ensure the screen reader user cannot arrow out of the modal inadvertently and replaces the old technique (not used in bootstrap) of aria-hidden on all background content.