2015 年 5 月の Jaws の最新のアップデートでは、IE11 でアラートが 2 回読み込まれる問題が解決されていないようです。IE11 でこの問題を解決するためのトリックがあります。
<div id="AriaAlertReceiver" aria-live="polite"></div>
EmsUtils.showAriaAlert = function(msg) {
var alertDiv = $("#AriaAlertReceiver");
if (alertDiv[0]){
// Set the alert text in a div - it already has aria-live=polite
// This will be actually ignored by IE for now
alertDiv.html(msg);
setTimeout(function () {
// Change the message again after a short time - now IE does detect it
if (zk.ie >= 11) {
alertDiv.html(msg + "!");
}
setTimeout(function () {
// Remove the alert after a short time, so it can be used again later
alertDiv.html("");
}, 1000);
}, 100);
}
}
トリックは、ライブ領域のテキストを 2 倍に設定することです。1 回目は IE11 によって無視されますが、2 回目は変更が検出されます。aria-live=polite で十分なようです。上記の例は、2015 年 5 月以降の Windows 7 で、IE11 と Firefox 37 と Jaws 16 で動作します。