我使用的是 iPhone 6+,并且打开了语音(辅助功能)选项。我在链接单击时打开了退出模式,并将键盘焦点设置在模式上(使用 js)。这一切都很好。但是,焦点旁白并未切换到我的模式,它仍然位于触发链接上。
如何将语音焦点转移到模式上?
这是模态代码
<div class="modal-container" id="{{ modalModel.modalId }}">
<div class="modal-mask" data-ng-click="onMaskClick($event)">
</div>
<div class="modal-body" tabindex="-1" role="dialog" aria-label="{{ modalModel.modalTitle }}">
<div class="modal-body-container">
<h4 class="modal-title heading-4">{{ modalModel.modalTitle }}</h4>
<button type="button" class="modal-close" data-ng-click="closeModal($event)">
<span class="btn-text">close</span>
<span class="icon chrome-blue-x-round"></span>
</button>
<div class="modal-contents">
<div class="modal-contents-wrapper" data-ng-transclude></div>
xxxxxx xxxx
</div>
</div>
</div>
</div>
The modal-body
当模式弹出时,类元素具有焦点。我使用的是 iOS 9。
当模式打开时,我可以通过将键盘焦点放在关闭按钮上来将语音光标集中在模式中。
如果键盘焦点不在键盘可以自然聚焦的元素上,则语音光标将不会在模式内部移动。由于关闭按钮是一个按钮,所以这有效
<button type="button" class="modal-close" data-ng-click="closeModal($event)">
<span class="btn-text">close</span>
<span class="icon chrome-blue-x-round"></span>
</button>
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)