我正在研究辅助功能。Maven说当Modal弹出时,键盘用户不应该在Modal窗口外交互。我正在使用Bootstrap modal。Bootstrap版本是3。我认为GitHub上有一个关于这个的问题!
下面是Modal的代码片段。
<div class="modal fade in" id="unenrollmentWarningModal" role="dialog" aria-labelledby="myModalLabel" aria-modal="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button class="close" aria-label="Close Dialog" data-dismiss="modal">×</button>
<h2 class="modal-title" id="myModalLabel">Unenrollment Warning!</h2>
<div class="row">
<div class="col-md-6" style="text-align: center;">
<button class="btn btn-danger btn-block declineUnenrollment enrollButton" data-dismiss="modal">Nevermind!</button>
</div>
<div class="col-md-6" style="text-align: center;">
<button class="btn btn-success btn-block acceptUnenrollment enrollButton">I Understand</button>
</div>
</div>
</div>
</div>
</div>
</div>
如何解决此问题?
1条答案
按热度按时间watbbzwu1#
如果我没猜错你的问题,你需要使用tabindex="-1”属性。What's the tabindex="-1" in bootstrap for