Javascript JAWS屏幕阅读器误读确认对话框消息。IE11

Javascript JAWS屏幕阅读器误读确认对话框消息。IE11,javascript,accessibility,internet-explorer-11,jaws-screen-reader,Javascript,Accessibility,Internet Explorer 11,Jaws Screen Reader,我有一个确认对话框,我想让它可以访问。 这是我的HTML: <div class="confirm-dialog row-fluid"> <div class="content" role="dialog" tabindex="0" aria-labelledby="confirm-popup-header" aria-describedby="confirm-popup-subheader"> <h2 id="confirm-popup-header">

我有一个确认对话框,我想让它可以访问。 这是我的HTML:

<div class="confirm-dialog row-fluid">
<div class="content" role="dialog" tabindex="0" aria-labelledby="confirm-popup-header" aria-describedby="confirm-popup-subheader">
   <h2 id="confirm-popup-header">Proceed with an action</h2>
   <h4 id="confirm-popup-subheader">You are about to proceed with an action</h4>
   <div>
       <button class="btn btn-large btn-primary btn-app-secondary">Cancel</button>
       <button class="btn btn-large btn-primary btn-app-primary">Submit</button>
   </div>
</div>
然后在IE11中,当对话框打开时,jaws会像这样读取其内容: 输入-继续执行操作-对话框继续执行即将执行的操作取消提交标题级别2

JAWS首先读取标题,然后读取标题,然后读取其余内容。 这就是问题所在

预期行为: 输入-继续执行操作-对话框您将继续执行操作等


如何实现这一点?

只需从对话框容器元素中删除
标记的aria和
描述的aria,您应该会做得更好。最好的做法是设置tabindex=-1而不是tabindex=0,这样当您在对话框中四处切换时,不会自动返回到容器


您可能已经在这样做了,但是您应该确保使用键盘事件处理程序将焦点保持在对话框内。

谢谢@unobf,但是在我检查了您的解决方案后,jaws行为没有太大变化。另外,jaws读取按钮(与按钮不同)的读取方式如下:No fileupload edit-TAB-Yes fileupload edit
$('.confirm-dialog .content').focus();