Prevent background items from receiving focus while modal overlay is covering them?
问题 I am working on making an overlay modal more accessible. It works essentially like this JSFiddle. When you open the modal, the focus doesn't properly go into the modal, and it continues to focus on other (hidden, background) items in the page. You can see in my JSFiddle demo that I have already used aria-controls , aria-owns , aria-haspopup and even aria-flowto . <button aria-controls="two" aria-owns="true" aria-haspopup="true" aria-flowto="two" onclick="toggleTwo();" > TOGGLE DIV #2 </button