有没有办法在自禁用按钮中不读取“不可用”或“变暗”?
请参阅示例示例
var saveBtn = document.getElementById("saveBtn");
var helper = document.getElementById("helper");
var content = document.getElementById("content");
saveBtn.onclick = function(e) {
saveBtn.setAttribute("disabled", "disabled");
saveBtn.setAttribute("aria-disabled", true);
content.innerHTML = 'Lorem input a lot of stuffs';
helper.innerHTML = "Content added, please read it";
setTimeout(function(){
helper.innerHTML = "";
saveBtn.removeAttribute("disabled");
saveBtn.setAttribute("aria-disabled", false);
}, 5000);
};
- 语音只说:“内容已添加,请阅读”
- NVDA 说:“内容已添加,请阅读。不可用'
我知道它正在发生,因为按钮仍然有焦点。但是,我需要为此找到解决方案,因为我无法修改页面的当前行为。
我正在使用 html 帮助程序来通知转换,如您所见https://stackoverflow.com/a/38137593/3438124。
对不起丑陋的代码,这只是为了模拟我的真实行为。
感谢你们!