简体   繁体   English

在Firefox上,有没有aria = live =“ assertive”没有role =“ alert”的方法吗?

[英]Is there any way for aria-live=“assertive” without role=“alert” on Firefox?

Is there any tricks to get aria-live working without role="alert" in firefox on windows? 在Windows的Firefox中,有没有任何技巧可以使aria在不使用role =“ alert”的情况下正常工作? (using JAWS). (使用JAWS)。 It seems to only work with role="alert" which announces "Alert" before each message in the live area which is unfortunately ruining my browser game experience on firefox. 它似乎只能与role =“ alert”一起使用,后者在活动区域​​中的每条消息之前都会宣布“ Alert”,这不幸地破坏了我在firefox上的浏览器游戏体验。

Thanks anyone who tries 谢谢任何尝试的人

 $(document).ready(function() { $("#controls").delegate("a", "click", function() { $("#alert-div").empty().append(" "); var text = $(this).attr("data-test"); window.setTimeout(function(){ $("#alert-div").empty().append(text); }, 500); }); }); 
 <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <div id="alert-div" aria-live="polite" aria-atomic="true"> </div> <div id="controls"> <a href="javascript:;" data-test="Say this message">A</a> <a href="javascript:;" data-test="A different message">B</a> </div> 

Have you tried starting out simple and just have aria-live=polite and leave off the role and aria-atomic ? 您是否尝试过从简单开始,只拥有aria-live=polite并放弃rolearia-atomic We use aria-live all the time with great success. 我们一直使用aria-live取得了巨大的成功。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM