Is there any tricks to get aria-live working without role="alert" in firefox on windows? (using 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.
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
? We use aria-live
all the time with great success.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.