自己無効化ボタンで「使用不可」または「淡色表示」を読み取らない方法はありますか?
例を参照してください。
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 は次のように述べています。「コンテンツが追加されました。お読みください。利用できません'
ボタンがまだフォーカスされているために発生していることはわかっています。しかし、ページの現在の動作を変更できないため、その解決策を見つける必要があります。
https://stackoverflow.com/a/38137593/3438124を見ることができるように、遷移を通知するためにhtmlヘルパーを使用しています。
醜いコードで申し訳ありませんが、これは私の実際の動作をシミュレートするためだけのものです。
君たちありがとう!