For a modal dialog, keep keyboard focus inside until the dialog is dismissed. Otherwise, someone navigating with a keyboard may move into background content and lose track of where they are. section 5.3.2
document.getElementById(“modal_title”).focus()
A dialog heading can receive focus when the modal opens: give it tabindex="-1", then call focus() on it. section 5.3.2

